-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Closed
Changes from 3 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
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