DEV Community

Cover image for Using GitHub Actions to Battle Racism (or at least contribute to the process)!
Fiewor John
Fiewor John

Posted on

Using GitHub Actions to Battle Racism (or at least contribute to the process)!

Introduction

GitHub Actions are event-driven workflows which are very useful for automating processes in software development lifecycle. They're even more awesome because they're located where all the fun stuff happens - GitHub! This takes resolving of issues, collaboration and deployment to a whole other level and makes it even easier too.

To learn more about GitHub actions and how you can begin to utilise them, check their easy-to-follow documentation

My Workflow

During Hacktoberfest, I created two greeting bots and one stale bot for IBM's Call for Code for Racial Justice Open Source projects.
Basically, the greeting bots greet new contributors to the project with a message.

name: Greetings

on: [pull_request, issues]

jobs:
  greeting:
    runs-on: ubuntu-latest
    steps:
       ...
       issue-message: 'Thank you so much for contributing to our work!'
       pr-message: 'Thank you for your contribution! Someone will review it ASAP.'
Enter fullscreen mode Exit fullscreen mode

The stale bot marks issues stale after a particular number of days. You might be wondering why this would be useful. Well, it helps notify contributors of issues that have been unattended to for too long and hence prioritize such issues.

name: Mark stale issues and pull requests

on: 
  schedule:
    - cron: "0 0 * * *"

jobs:
  stale:

    runs-on: ubuntu-latest

    steps:
      - uses: actions/stale@v1
        ....
          stale-issue-message: ':wave: Hi! This issue has been marked stale due to inactivity. If no further activity occurs within the next 7 days, it will automatically be closed.'
          ...
          stale-issue-label: 'stale'
          exempt-issue-label: 'keep-open'
          remove-stale-when-updated: true
          stale-issue-label: 'Stale'
          stale-pr-label: 'Stale'
          labels-to-add-when-unstale: 'help-wanted'
          days-before-stale: 60
          days-before-close: 7
Enter fullscreen mode Exit fullscreen mode

These GitHub Action Bots are being used in two Call For Code for Racial Justice Projects

  • Truth Loop - a solution that helps communities simply understand the policies, regulations and legislation that will impact them the most and allows them to share their experiences around how policies have impacted them or how proposed policies could impact them using short video testimonials.

  • TakeTwo-Marker-ChromeExtension which is 'a plugin to facilitate the capture and categorization of words and phrases that could be racially biased through a browser.'

    Submission Category:

  • Maintainer Must-Haves - since it makes the lives of open source maintainers easier.

Link to Code

Stale Bot
https://github.com/Call-for-Code-for-Racial-Justice/Truth-Loop/pull/211/files

Greeting Bot
TakeTwo-Marker-ChromeExtension
https://github.com/Call-for-Code-for-Racial-Justice/TakeTwo-Marker-ChromeExtension/pull/29/files

Truth Loop
https://github.com/Call-for-Code-for-Racial-Justice/Truth-Loop/pull/195/files

Additional Resources / Info

Top comments (0)