Skip to content

Commit

Permalink
Use email for Github Actions bot (#7)
Browse files Browse the repository at this point in the history
Our company's tooling retrieves a list of commits for each pull request
and checks whether the commit's author has signed a Contributor License
Agreement. It filters bot accounts by checking the `type` property for
the string ["Bot"]. However, commits made using the GITHUB_ACTIONS token
are showing up as `type` "User". This is [WAD], however. The workaround
is to use the bot's ID to prefix the email address.

See: actions/checkout/#1184

["Bot"]: https://github.com/salesforce/dr-cla/blob/290a3a1d/app/utils/GitHub.scala#L515-L519
[WAD]: https://github.com/orgs/community/discussions/26560#discussioncomment-3252337
  • Loading branch information
jstvz committed Aug 11, 2023
1 parent 88340b9 commit c1d58fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update_python_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
- name: Commit changes and open PR
run: |
export WEEK="w$(date +%V)"
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git switch -c "dependency-updates-$WEEK"
git add requirements/*.txt
git commit -m "$WEEK dependency updates (automated)"
Expand Down

0 comments on commit c1d58fc

Please sign in to comment.