Skip to content

ref(integrations): Remove legacy GitHub/GitLab feature toggles from detail view#113924

Merged
evanpurkhiser merged 1 commit intomasterfrom
evanpurkhiser/ref-integrations-remove-legacy-github-gitlab-feature-toggles-from-detail-view
Apr 29, 2026
Merged

ref(integrations): Remove legacy GitHub/GitLab feature toggles from detail view#113924
evanpurkhiser merged 1 commit intomasterfrom
evanpurkhiser/ref-integrations-remove-legacy-github-gitlab-feature-toggles-from-detail-view

Conversation

@evanpurkhiser
Copy link
Copy Markdown
Member

@evanpurkhiser evanpurkhiser commented Apr 24, 2026

Part of Phase 3 of VDY-110. The PR-comment and missing-member toggles are now exposed in the per-install integration configuration form via the standard JSONForm descriptors (landed in the prior backend commit, #113923). Drop the custom github/gitlab features tab on the integration detail page so the two code paths don't compete.

The slack case in the same switch stays — slack alert-thread flags are an out-of-scope anti-pattern tracked separately.

Ref: VDY-113: Phase 3: Move SCM settings UI to per-install integration config

Migration phases

  • ● Phase 1 — Backfill existing OIs: #113841 (merged)
  • ● Phase 1 — Backfill cross-silo fix: #113908
  • ● Phase 1 — Dual-write SCM toggles: #113842
  • ● Phase 2 — Read from OI config behind flag: #113864
  • ● Phase 3 — Expose toggles in per-install UI: #113923
  • ○ Phase 3 — Remove legacy detail-view toggles (frontend): (This PR)
  • ○ Phase 3 — Drop SCM toggle fields from PUT endpoint: upcoming
  • ○ Phase 4 — Remove legacy code paths: upcoming

@evanpurkhiser evanpurkhiser requested a review from TkDodo April 24, 2026 15:53
@evanpurkhiser evanpurkhiser requested a review from a team as a code owner April 24, 2026 15:53
@evanpurkhiser evanpurkhiser requested a review from a team April 24, 2026 15:53
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 24, 2026

Copy link
Copy Markdown
Member

@jaydgoss jaydgoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be feat flagged?

@evanpurkhiser
Copy link
Copy Markdown
Member Author

Should this be feat flagged?

No need, we'll make the configurations available in both places and then just remove this one after it's merged.

I just merged #113923 so once that goes out we can merge this

…etail view

Part of Phase 3 of VDY-110. The PR-comment and missing-member toggles
are now exposed in the per-install integration configuration form via
the standard JSONForm descriptors (landed in the prior backend commit).
Drop the custom github/gitlab features tab on the integration detail
page so the two code paths don't compete.

The slack case in the same switch stays — slack alert-thread flags are
an out-of-scope anti-pattern tracked separately.

Fixes: [VDY-113](https://linear.app/getsentry/issue/VDY-113/phase-3-move-scm-settings-ui-to-per-install-integration-config)
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-integrations-remove-legacy-github-gitlab-feature-toggles-from-detail-view branch from d9872b9 to 7d306f4 Compare April 29, 2026 20:47
Comment on lines 435 to 440
const isDisabled = !hasOrgWrite || !hasIntegration;

switch (provider?.key) {
case 'github':
return (
<FieldGroup>
<AutoSaveForm
name="githubPRBot"
schema={githubFeaturesSchema}
initialValue={organization.githubPRBot}
mutationOptions={orgMutationOptions}
>
{field => (
<field.Layout.Row
label={t('Enable Comments on Suspect Pull Requests')}
hintText={
hasIntegration
? t(
'Allow Sentry to comment on recent pull requests suspected of causing issues.'
)
: t('You must have a GitHub integration to enable this feature.')
}
>
<field.Switch
checked={field.state.value}
onChange={field.handleChange}
disabled={isDisabled}
aria-label={t('Enable Comments on Suspect Pull Requests')}
/>
</field.Layout.Row>
)}
</AutoSaveForm>
<AutoSaveForm
name="githubNudgeInvite"
schema={githubFeaturesSchema}
initialValue={organization.githubNudgeInvite}
mutationOptions={orgMutationOptions}
>
{field => (
<field.Layout.Row
label={t('Enable Missing Member Detection')}
hintText={
hasIntegration
? t(
'Allow Sentry to detect users committing to your GitHub repositories that are not part of your Sentry organization..'
)
: t('You must have a GitHub integration to enable this feature.')
}
>
<field.Switch
checked={field.state.value}
onChange={field.handleChange}
disabled={isDisabled}
aria-label={t('Enable Missing Member Detection')}
/>
</field.Layout.Row>
)}
</AutoSaveForm>
</FieldGroup>
);
case 'gitlab':
return (
<FieldGroup>
<AutoSaveForm
name="gitlabPRBot"
schema={gitlabFeaturesSchema}
initialValue={organization.gitlabPRBot}
mutationOptions={orgMutationOptions}
>
{field => (
<field.Layout.Row
label={t('Enable Comments on Suspect Pull Requests')}
hintText={
hasIntegration
? t(
'Allow Sentry to comment on recent pull requests suspected of causing issues.'
)
: t('You must have a GitLab integration to enable this feature.')
}
>
<field.Switch
checked={field.state.value}
onChange={field.handleChange}
disabled={isDisabled}
aria-label={t('Enable Comments on Suspect Pull Requests')}
/>
</field.Layout.Row>
)}
</AutoSaveForm>
</FieldGroup>
);
case 'slack':
return (
<FieldGroup>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Navigating to a GitHub/GitLab integration page with a stale ?tab=features URL parameter results in a blank content area because the tab is no longer valid.
Severity: MEDIUM

Suggested Fix

In the useIntegrationTabs hook, before setting the active tab from location.query.tab, validate that the tab exists in the list of available tabs. If it doesn't, fall back to a default valid tab (e.g., the first one) to prevent rendering a blank state.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location:
static/app/views/settings/organizationIntegrations/integrationDetailedView.tsx#L435-L440

Potential issue: If a user navigates to a GitHub or GitLab integration detail page using
a URL with the `?tab=features` parameter (e.g., from a bookmark), the content area will
be blank. The `useIntegrationTabs` hook sets `activeTab` to 'features' from the URL
without validating it against the available tabs for the integration. Since the
'features' tab is no longer available for GitHub/GitLab, no tab appears selected, and
the `renderFeatures()` function's default case returns `null`, leading to an empty view.
This is a regression, as this URL was previously valid.

Did we get this right? 👍 / 👎 to inform future reviews.

@evanpurkhiser evanpurkhiser merged commit 45f9234 into master Apr 29, 2026
67 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-integrations-remove-legacy-github-gitlab-feature-toggles-from-detail-view branch April 29, 2026 22:14
evanpurkhiser added a commit that referenced this pull request Apr 29, 2026
…ils endpoint (#113925)

Part of Phase 3 of VDY-110. The `githubPRBot` / `githubNudgeInvite` /
`gitlabPRBot` fields on `PUT /organizations/{slug}/` backed the legacy
integration-detail UI that was removed in the prior commit
([#113924](#113924)). Every
install's toggles now live on `OrganizationIntegration.config` and are
edited through the per-integration config endpoint.

- Remove the three entries from `ORG_OPTIONS` so the endpoint no longer
writes to `OrganizationOption` for them.
- Drop the three `BooleanField` declarations on `OrganizationSerializer`
and the `@extend_schema` docs so the OpenAPI spec stops advertising
fields the backend no longer accepts.
- Drop the (now unused) `GITHUB_COMMENT_BOT_DEFAULT` /
`GITLAB_COMMENT_BOT_DEFAULT` imports.

`PUT` bodies that still include these fields are silently dropped (DRF
unknown-field default). The derived read-side fields on the response
continue to exist — the missing-member invite banner still reads
`githubNudgeInvite` — and will be audited/removed in Phase 4.

Ref: [VDY-113: Phase 3: Move SCM settings UI to per-install integration
config](https://linear.app/getsentry/issue/VDY-113/phase-3-move-scm-settings-ui-to-per-install-integration-config)
cleptric pushed a commit that referenced this pull request May 5, 2026
…etail view (#113924)

Part of Phase 3 of VDY-110. The PR-comment and missing-member toggles
are now exposed in the per-install integration configuration form via
the standard JSONForm descriptors (landed in the prior backend commit,
[#113923](#113923)). Drop the
custom github/gitlab features tab on the integration detail page so the
two code paths don't compete.

The slack case in the same switch stays — slack alert-thread flags are
an out-of-scope anti-pattern tracked separately.

Ref: [VDY-113: Phase 3: Move SCM settings UI to per-install integration
config](https://linear.app/getsentry/issue/VDY-113/phase-3-move-scm-settings-ui-to-per-install-integration-config)
cleptric pushed a commit that referenced this pull request May 5, 2026
…ils endpoint (#113925)

Part of Phase 3 of VDY-110. The `githubPRBot` / `githubNudgeInvite` /
`gitlabPRBot` fields on `PUT /organizations/{slug}/` backed the legacy
integration-detail UI that was removed in the prior commit
([#113924](#113924)). Every
install's toggles now live on `OrganizationIntegration.config` and are
edited through the per-integration config endpoint.

- Remove the three entries from `ORG_OPTIONS` so the endpoint no longer
writes to `OrganizationOption` for them.
- Drop the three `BooleanField` declarations on `OrganizationSerializer`
and the `@extend_schema` docs so the OpenAPI spec stops advertising
fields the backend no longer accepts.
- Drop the (now unused) `GITHUB_COMMENT_BOT_DEFAULT` /
`GITLAB_COMMENT_BOT_DEFAULT` imports.

`PUT` bodies that still include these fields are silently dropped (DRF
unknown-field default). The derived read-side fields on the response
continue to exist — the missing-member invite banner still reads
`githubNudgeInvite` — and will be audited/removed in Phase 4.

Ref: [VDY-113: Phase 3: Move SCM settings UI to per-install integration
config](https://linear.app/getsentry/issue/VDY-113/phase-3-move-scm-settings-ui-to-per-install-integration-config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants