Skip to content

fix(ci): set explicit commit author for update-binaries job#457

Merged
philprime merged 2 commits intomasterfrom
fix/update-deps-commit-author
Mar 31, 2026
Merged

fix(ci): set explicit commit author for update-binaries job#457
philprime merged 2 commits intomasterfrom
fix/update-deps-commit-author

Conversation

@philprime
Copy link
Copy Markdown
Member

@philprime philprime commented Mar 27, 2026

The stefanzweifel/git-auto-commit-action in the update-binaries job
defaults commit_author to ${{ github.actor }}. For scheduled workflow
runs, GitHub resolves github.actor to a former org member (brustolin),
causing the "bump bundled binaries" commit to be attributed to them
instead of the GitHub App.

This sets explicit commit_author, commit_user_name, and
commit_user_email using the GitHub App identity from the
actions/create-github-app-token output (app-slug), following
GitHub's bot email convention ({APP_ID}+{SLUG}[bot]@users.noreply.github.com).

#skip-changelog

The git-auto-commit-action defaults commit_author to github.actor,
which on scheduled runs resolves to a former org member. Use the
GitHub App identity instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@philprime philprime enabled auto-merge (squash) March 27, 2026 13:51
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: App ID used instead of bot user ID in email
    • Added a step that fetches the [bot] machine user ID via gh api users/{slug}%5Bbot%5D and uses that ID in the noreply email instead of the GitHub App ID.

Create PR

Or push these changes by commenting:

@cursor push b9348db254
Preview (b9348db254)
diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml
--- a/.github/workflows/update-deps.yml
+++ b/.github/workflows/update-deps.yml
@@ -58,11 +58,18 @@
           token: ${{ steps.app_token.outputs.token }}
       - name: Download latest binaries.
         run: script/sentry-cli-download.sh
+      - name: Resolve bot user ID for noreply email
+        id: bot_user
+        env:
+          GH_TOKEN: ${{ steps.app_token.outputs.token }}
+        run: |
+          BOT_ID=$(gh api "users/${{ steps.app_token.outputs.app-slug }}%5Bbot%5D" --jq .id)
+          echo "id=${BOT_ID}" >> "${GITHUB_OUTPUT}"
       - name: Commit latest binaries.
         uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
         with:
           branch: ${{ needs.update-cli.outputs.prBranch }}
           commit_message: bump bundled binaries
-          commit_author: "${{ steps.app_token.outputs.app-slug }}[bot] <${{ vars.SENTRY_FASTLANE_PLUGIN_UPDATER_GITHUB_APP_ID }}+${{ steps.app_token.outputs.app-slug }}[bot]@users.noreply.github.com>"
+          commit_author: "${{ steps.app_token.outputs.app-slug }}[bot] <${{ steps.bot_user.outputs.id }}+${{ steps.app_token.outputs.app-slug }}[bot]@users.noreply.github.com>"
           commit_user_name: "${{ steps.app_token.outputs.app-slug }}[bot]"
-          commit_user_email: "${{ vars.SENTRY_FASTLANE_PLUGIN_UPDATER_GITHUB_APP_ID }}+${{ steps.app_token.outputs.app-slug }}[bot]@users.noreply.github.com"
+          commit_user_email: "${{ steps.bot_user.outputs.id }}+${{ steps.app_token.outputs.app-slug }}[bot]@users.noreply.github.com"

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Copy link
Copy Markdown
Contributor

@itaybre itaybre left a comment

Choose a reason for hiding this comment

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

LGTM

The noreply address must use the machine user's numeric ID from the
Users API, not the GitHub App ID, so commits link to the bot account.

Applied via @cursor push command
@philprime philprime merged commit f59515d into master Mar 31, 2026
17 checks passed
@philprime philprime deleted the fix/update-deps-commit-author branch March 31, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants