From 4b0d97a6a5ff6a259b7c9df81066ab2d55e9e291 Mon Sep 17 00:00:00 2001 From: James Estevez Date: Thu, 10 Aug 2023 15:27:42 -0700 Subject: [PATCH] Use email for Github Actions bot 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 --- .github/workflows/update_python_dependencies.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_python_dependencies.yml b/.github/workflows/update_python_dependencies.yml index a9f38b9..5ef6693 100644 --- a/.github/workflows/update_python_dependencies.yml +++ b/.github/workflows/update_python_dependencies.yml @@ -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)"