Skip to content

Commit 27f8f8b

Browse files
authored
feat(seer): Allow subscribing to seer webhooks on f/e (#96223)
Shows a seer type to subscribe to on the integrations creation page + guards it via feature flag. <img width="988" height="342" alt="CleanShot 2025-07-31 at 04 01 56@2x" src="https://github.com/user-attachments/assets/3ce135cb-4895-4dd5-97f9-3283ac48b98d" /> <img width="964" height="386" alt="CleanShot 2025-07-31 at 04 02 20@2x" src="https://github.com/user-attachments/assets/011d0b80-b6b3-4118-a6cb-e3bfa4fb04fc" />
1 parent fdcd37d commit 27f8f8b

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

static/app/types/integrations.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ export type AppOrProviderOrPlugin =
544544
/**
545545
* Webhooks and servicehooks
546546
*/
547-
export type WebhookEvent = 'issue' | 'error' | 'comment';
547+
export type WebhookEvent = 'issue' | 'error' | 'comment' | 'seer';
548548

549549
export type ServiceHook = {
550550
dateCreated: string;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
export const EVENT_CHOICES = ['issue', 'error', 'comment'] as const;
1+
export const EVENT_CHOICES = ['issue', 'error', 'comment', 'seer'] as const;
22

33
export const PERMISSIONS_MAP = {
44
issue: 'Event',
55
error: 'Event',
66
comment: 'Event',
7+
seer: 'Event',
78
} as const;

static/app/views/settings/organizationDeveloperSettings/resourceSubscriptions.spec.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ describe('Resource Subscriptions', function () {
2323
</Form>
2424
);
2525

26-
expect(screen.getAllByRole('checkbox')).toHaveLength(3);
26+
expect(screen.getAllByRole('checkbox')).toHaveLength(4);
2727
expect(screen.getByRole('checkbox', {name: 'issue'})).toBeDisabled();
2828
expect(screen.getByRole('checkbox', {name: 'error'})).toBeDisabled();
2929
expect(screen.getByRole('checkbox', {name: 'comment'})).toBeDisabled();
30+
expect(screen.getByRole('checkbox', {name: 'seer'})).toBeDisabled();
3031
});
3132

3233
it('updates events state when new permissions props is passed', function () {

static/app/views/settings/organizationDeveloperSettings/subscriptionBox.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ function SubscriptionBox({
4444
message = t(
4545
'Your organization does not have access to the error subscription resource.'
4646
);
47+
} else if (resource === 'seer' && !features.includes('seer-webhooks')) {
48+
disabled = true;
49+
message = t("Your organization can't subscribe to seer events just yet.");
4750
}
4851

4952
if (webhookDisabled) {
@@ -54,6 +57,7 @@ function SubscriptionBox({
5457
issue: `created, resolved, assigned, archived, unresolved`,
5558
error: 'created',
5659
comment: 'created, edited, deleted',
60+
seer: 'root_cause_started, root_cause_completed, solution_started, solution_completed, coding_started, coding_completed, pr_created',
5761
};
5862

5963
return (

0 commit comments

Comments
 (0)