fix: use bot user ID for proper avatar attribution in commits#7491
fix: use bot user ID for proper avatar attribution in commits#7491paulbalaji merged 1 commit intomainfrom
Conversation
GitHub requires the bot user ID (not app ID) in the commit email
to properly display the GitHub App's avatar. This adds an API call
to fetch the bot user ID before configuring git.
Format change:
- Before: {APP_ID}+{app-slug}[bot]@users.noreply.github.com
- After: {BOT_USER_ID}+{app-slug}[bot]@users.noreply.github.com
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
📝 WalkthroughWalkthroughTwo GitHub Actions release workflows were updated to fetch the bot user ID from the GitHub API after token generation, then use that ID to construct the git config email for commits, replacing the previous approach of using the app ID secret directly. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes These are straightforward workflow configuration changes with a consistent pattern applied across two files. The modifications follow a clear, repeatable template: fetch user ID, wire it into git config. No complex logic or branching—just tying a new data source into existing setup steps.
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/rust-release.yml (1)
186-189: Implementation looks solid, but consider one minor consistency tweak.The inline bot user ID retrieval works correctly and solves the avatar attribution problem. The pattern mirrors the release.yml approach, though structured differently (inline vs. separate step). One small thing: release.yml explicitly sets
GH_TOKENin the env, while this file relies onGITHUB_TOKEN. Both work—gh cli will useGITHUB_TOKENas a fallback—but making it explicit (like in release.yml) would improve clarity for future maintainers.Consider adding
GH_TOKENto the env for consistency:- name: Create or update release PR env: GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} + GH_TOKEN: ${{ steps.generate-token.outputs.token }} NEW_VERSION: ${{ steps.next_version.outputs.new_version }}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/release.yml(1 hunks).github/workflows/rust-release.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (46)
- GitHub Check: cli-evm-e2e-matrix (warp-send)
- GitHub Check: cli-evm-e2e-matrix (warp-extend-config)
- GitHub Check: cli-evm-e2e-matrix (warp-read)
- GitHub Check: cli-evm-e2e-matrix (warp-deploy-2)
- GitHub Check: cli-evm-e2e-matrix (warp-extend-basic)
- GitHub Check: cli-evm-e2e-matrix (warp-rebalancer)
- GitHub Check: cli-evm-e2e-matrix (warp-deploy-1)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-1)
- GitHub Check: cli-evm-e2e-matrix (warp-extend-recovery)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-ism-updates)
- GitHub Check: cli-evm-e2e-matrix (warp-check-3)
- GitHub Check: cli-evm-e2e-matrix (warp-check-5)
- GitHub Check: cli-evm-e2e-matrix (warp-check-2)
- GitHub Check: cli-evm-e2e-matrix (warp-check-1)
- GitHub Check: cli-evm-e2e-matrix (warp-check-4)
- GitHub Check: cli-evm-e2e-matrix (warp-bridge-1)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-submitters)
- GitHub Check: cli-evm-e2e-matrix (warp-apply-2)
- GitHub Check: cli-evm-e2e-matrix (relay)
- GitHub Check: cli-evm-e2e-matrix (warp-bridge-2)
- GitHub Check: cli-evm-e2e-matrix (core-deploy)
- GitHub Check: cli-evm-e2e-matrix (core-apply)
- GitHub Check: env-test-matrix (testnet4, sepolia, core)
- GitHub Check: cli-evm-e2e-matrix (core-check)
- GitHub Check: env-test-matrix (mainnet3, arbitrum, core)
- GitHub Check: env-test-matrix (mainnet3, optimism, core)
- GitHub Check: env-test-matrix (mainnet3, inevm, core)
- GitHub Check: env-test-matrix (mainnet3, ethereum, core)
- GitHub Check: env-test-matrix (mainnet3, inevm, igp)
- GitHub Check: cosmos-sdk-e2e-run
- GitHub Check: cli-radix-e2e-matrix (warp-deploy)
- GitHub Check: cli-radix-e2e-matrix (warp-apply-route-extension)
- GitHub Check: cli-radix-e2e-matrix (warp-apply-ownership-updates)
- GitHub Check: cli-cosmos-e2e-matrix (warp-read)
- GitHub Check: cli-cross-chain-e2e-matrix (warp-deploy)
- GitHub Check: cli-cosmos-e2e-matrix (warp-deploy)
- GitHub Check: cli-cosmos-e2e-matrix (core-read)
- GitHub Check: cli-radix-e2e-matrix (core-deploy)
- GitHub Check: cli-cosmos-e2e-matrix (core-deploy)
- GitHub Check: cli-cross-chain-e2e-matrix (warp-apply)
- GitHub Check: cli-cosmos-e2e-matrix (core-check)
- GitHub Check: cli-cosmos-e2e-matrix (core-apply)
- GitHub Check: e2e-matrix (evm)
- GitHub Check: lint-rs
- GitHub Check: lander-coverage
- GitHub Check: test-rs
🔇 Additional comments (1)
.github/workflows/release.yml (1)
65-74: Spot-on approach to fetch the bot user ID for proper avatar attribution.The implementation is sound—fetching the bot user ID from the GitHub API and using it in the git config email follows GitHub's requirements for displaying the app's custom avatar. The GH_TOKEN is properly wired from the generated app token, and the output is correctly captured for use in the subsequent git config step.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7491 +/- ##
============================
============================
🚀 New features to boost your workflow:
|
Summary
Problem
GitHub requires the bot user ID (not app ID) in the commit email to properly display the GitHub App's avatar.
Before:
{APP_ID}+{app-slug}[bot]@users.noreply.github.comAfter:
{BOT_USER_ID}+{app-slug}[bot]@users.noreply.github.comTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.