Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add biased language check to gh actions #3282

Closed
wants to merge 4 commits into from
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/biased-lang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Detecting Biased Language
on:
pull_request:
branches:
- main
jobs:
biased_lang:
runs-on: ubuntu-latest
name: Detecting Biased Language
steps:
- uses: actions/checkout@v2
- id: pink-panther
uses: splunk/pink-panther@main
continue-on-error: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this cause the workflow to be considered successful even if there is biased language? Don't we want it to fail?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems fine as an interim step, particularly if it checks the entire repository and not just changed files. Would give us notice and time to start addressing the issues. Hard to know how it works, though, since the code the action actually uses doesn't appear to be in the action repo.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some repo's can contain a slew of biased terms which can take quite a while to replace, so we didn't want this job to fail the workflow. Instead, we've added an error annotation as shown in the attached photo to notify users there are biased terms in the repo, but allow the workflow to continue.

As for the code itself, this is hosted in our internal Gitlab instance where we test, build, and publish for use in both GitLab CI and GitHub Actions. The image is essentially a Python script utilizing RipGrep to search through the repo for a list of biased terms Splunk defines, and outputs a summary in JSON format which is visible in the job.

Screen Shot 2021-05-10 at 11 10 23 AM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image is essentially a Python script utilizing RipGrep to search through the repo for a list of biased terms Splunk defines

Yet another reason it would be nice for the code executed by the action to be publicly available. I'm not sure it's up to Splunk to define what is considered appropriate language for this project. I don't think this is a debate that needs to happen now, but I would like to be able to view the list of terms and have an opportunity to provide input on them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely understandable. Let me circle back with the team and see what we're able to share publicly. As for the biased terms we are searching for currently, the list is short (only 4 terms) which you can also view in the JSON output during the job, shown here

with:
token: ${{secrets.GITHUB_TOKEN}}