Repository navigation
feat(notifications): Add out-of-credits notifications for Seer Autofix and Agent #130500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alexsohn1126
merged 11 commits into
master
from
alexsohn/cw-2325-autofix-out-of-credits-notification
Nov 13, 2026
+360
−0
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fea7e45
feat(notifications): Add an out-of-credits notification for Seer Autofix
alexsohn1126 1c9d942
feat(notifications): Add an out-of-credits notification for Seer Agent
alexsohn1126 e8eb56b
feat(notifications): Link out-of-credits Slack replies to billing
alexsohn1126 568005e
ref(notifications): Update Seer out-of-credits Slack copy
alexsohn1126 0fe8b6e
ref(notifications): Always show the next autofix step in Slack
alexsohn1126 3077054
ref(notifications): Drop started from the autofix out-of-credits noti…
alexsohn1126 6812862
ref(notifications): Use auto-reload wording in out-of-credits copy
alexsohn1126 ff33b28
feat(notifications): Vary out-of-credits copy by billing access and a…
alexsohn1126 0a76152
ref(notifications): Trim comments on the out-of-credits templates
alexsohn1126 c24565a
feat(notifications): Add a Contact Admin button to member out-of-cred…
alexsohn1126 82e3156
ref(notifications): Build the out-of-credits button in one place
alexsohn1126 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
23 changes: 23 additions & 0 deletions
23
tests/sentry/integrations/slack/webhooks/actions/test_seer_request_credits.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| from sentry.integrations.slack.message_builder.routing import encode_action_id | ||
| from sentry.integrations.slack.message_builder.types import SlackAction | ||
| from tests.sentry.integrations.slack.webhooks.actions import BaseEventTest | ||
|
|
||
|
|
||
| class SeerRequestCreditsTest(BaseEventTest): | ||
| def test_click_is_acknowledged(self) -> None: | ||
| resp = self.post_webhook_block_kit( | ||
| action_data=[ | ||
| { | ||
| "type": "button", | ||
| "action_id": encode_action_id( | ||
| action=SlackAction.SEER_REQUEST_CREDITS, | ||
| organization_id=self.organization.id, | ||
| project_id=None, | ||
| ), | ||
| "text": {"type": "plain_text", "text": "Contact Admin"}, | ||
| } | ||
| ] | ||
| ) | ||
|
|
||
| assert resp.status_code == 200, resp.content | ||
| assert resp.content == b"" |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update this once the request top-up/request credits page has been implemented, as well as the button text below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be for people with or without billing permission? For billing permission users, the top up modal can be opened from the billing overview you've linked; for regular members, we can call this auto-reload request endpoint: https://github.com/getsentry/getsentry/blob/master/getsentry/api/seer_top_up_request.py
and maybe change the button copy accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, I'll need to make some changes in the template so we can render different copies based on who triggered the action. Thanks!