feat(pr iteration): add github app permission nudge to autofix drawer#119059
Conversation
logic for commenting on autofix PRs during PR iteration when tool calls fail potentially due to out of date github app permissions logic for passing "warnings" back from group ai autofix GET endpoint specifically for failed tool calls potentially due to out of date github app permissions
|
🚨 Warning: This pull request contains Frontend and Backend changes! It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently. Have questions? Please ask in the |
📊 Type Coverage Diff✅ no issues found |
alexsohn1126
left a comment
There was a problem hiding this comment.
i only looked at the frontend files (assuming other python files are for #119052), everything looks good other than a couple of pointers!
| const WarningsWrapper = styled('div')` | ||
| padding: ${p => p.theme.space.md} 24px 0; | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: ${p => p.theme.space.md}; | ||
| `; |
There was a problem hiding this comment.
For this I think you can use <Alert.Container> or just use <Flex gap="md" [...]>
| const configurationUrl = `/settings/${organization.slug}/integrations/github/?tab=configurations`; | ||
|
|
||
| return ( | ||
| <LinkButton href={configurationUrl} variant="primary" size="xs"> |
There was a problem hiding this comment.
in devenvs we have the org slug after the domain name but in SaaS we have it in the domain name (e.g. my-org.sentry.io)
i asked claude and seems like changing LinkButton href=[...] to LinkButton to=[...] works? worth double-checking 👀
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e88e2ca. Configure here.
| }); | ||
|
|
||
| if (!warnings.length || isDismissed) { | ||
| return null; |
There was a problem hiding this comment.
Dismissal hides subsequent permission warnings
Medium Severity
AutofixWarnings stores dismissal for seven days under a fixed key per org and issue, and returns nothing whenever isDismissed is true. After the user dismisses once, later github_app_permissions warnings from polling (extra repos or a new failure after warnings cleared) stay hidden until expiry, so the nudge can miss active permission problems.
Reviewed by Cursor Bugbot for commit e88e2ca. Configure here.


deps on #119052
creates a alert at the top of the autofix drawer if autofix endpoint returns
github_app_permissionwarningson clicking "update permissions" button, it will open a modal to confirm
if there are multiple installations clicking the button in the modal will take the
user to the github configuration page (in a future change we'll add buttons to update permissions for each installation on that page)
if there's only one installation to update, clicking the button will take the user directly to the github update permissions page
alert in autofix drawer
modal after clicking "update permissions"