fix(github): gracefully handle GitHub App agent assignment 403 - #4167
Merged
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4167 +/- ##
==========================================
- Coverage 93.73% 93.72% -0.02%
==========================================
Files 387 387
Lines 36304 36309 +5
Branches 13298 13300 +2
==========================================
+ Hits 34031 34032 +1
- Misses 1617 1621 +4
Partials 656 656
🚀 New features to boost your workflow:
|
Contributor
|
Gittensory is closing this pull request on the maintainer's behalf (CI is failing (codecov/patch); No linked issue detected; Maintainer requires a linked issue). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
24 tasks
loopover-orb Bot
pushed a commit
that referenced
this pull request
Jul 11, 2026
… guard (#4999) (#5038) ensurePullRequestAssignee already catches GitHub's "Assigning agents is not supported with GitHub App installation tokens" 403 and degrades to applied:false (shipped in #4167, deployed) -- 198 Sentry events, all predating that fix, zero since. What was missing was a regression test for the catch itself: the branch sat at 0% coverage, so a future refactor could silently break the fallback (or start swallowing unrelated errors) with nothing to catch it.
24 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses issue GITTENSORY-1G by modifying
ensurePullRequestAssigneeto gracefully handle attempts to assign bot accounts using GitHub App installation tokens. Previously, such attempts resulted in anHttpError(403) because GitHub's API explicitly disallows assigning agents with installation tokens. The fix now catches this specificHttpError(status 403 with the message "Assigning agents is not supported") and returns{ applied: false }instead of re-throwing. This allows the callingperformActioninagent-action-executor.tsto correctly trigger its existing fallback mechanism, which creates aby:{login}label when an assignee cannot be applied.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Closes GITTENSORY-1G
Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Required for visible UI, frontend, docs, or extension changes. Attach GitHub-hosted JPG/JPEG or PNG screenshots here; SVG screenshots are not accepted as review evidence. Use a compact table/grid of clickable thumbnails with a short state/title such as "Loaded state", "Empty state", "Error state", "Mobile layout", or "PR sidebar". Prefer annotated screenshots with a colored box, outline, arrow, or highlighter showing what changed. Recordings can be supplemental, but screenshots are still expected for visual review. Do not commit review-only screenshots, recordings, or
docs/review-evidence/**files.<a href="FULL_URL.png"><img src="FULL_URL.png" alt="Loaded state" width="240"></a>Notes
Fixes GITTENSORY-1G