fix(github): resolve #2009/#1932 semantic conflict on App private key source#2041
Conversation
…om SecretsStore Two green PRs conflicted semantically: #2009 moved the GitHub App private key from config.yaml into SecretsStore, while #1932 landed a test helper still stubbing the key on config and returning None for every secret, so _get_token found neither a PAT nor an App key and the repo endpoint 401'd on dev. - routes/github.py: the explicit-installation branch passed the removed cfg.github_app_private_key to get_installation_token; use the SecretsStore-fetched private_key like the default branch does. - tests: _build_app_with_app_config now serves the PAT under github_token and the App key under github-app-private-key via a name-keyed secrets mock, matching the post-#2009 contract.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughGitHub App installation-token generation now uses the private key from SecretsStore-backed app state. GitHub route tests update their mocks to provide both the personal token and app private key through the secrets interface. ChangesGitHub App token resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by hy3:free · Input: 36.6K · Output: 1.6K · Cached: 101.4K |
Dev is red: test_repo_endpoint_still_uses_app_token fails 401 at the #1932 merge commit. Root cause is a semantic conflict between two individually green PRs: #2009 moved the App private key from config to SecretsStore; #1932 landed with a test helper still stubbing the key on config and a route branch still reading cfg.github_app_private_key.
Fixes:
Verified locally: tests/test_routes_github.py + tests/test_github_app.py 31/31 pass on 3.12.
Process note: #1932 was merged on a green computed before #2009 changed its base; pitfall 14 in docs/contributor-pitfalls.md (#2040) gets a follow-up line about stale-base greens.
Summary by CodeRabbit