Skip to content

feat(integrations): accept GitHub issue and pull request URLs - #124305

Merged
betegon merged 4 commits into
masterfrom
bt/issue-link-github-urls
Sep 15, 2026
Merged

betegon merged 4 commits into
masterfrom
bt/issue-link-github-urls

Conversation

@betegon

@betegon betegon commented Sep 14, 2026

Copy link
Copy Markdown
Member

Accept GitHub issue and pull request URLs in the existing issue-linking PUT, including GitHub Enterprise. Supports canonical issue and PR URLs and the /files, /changes, /commits, and /checks PR tabs. Resolve the URL to the repository and issue number using the selected installation, and verify that the repository is active and belongs to that installation and organization.

Links remain neutral references; a pull request URL does not resolve the Sentry issue.

Uses the shared URL-linking support merged in #124067. This diff contains only the GitHub/GitHub Enterprise implementation and tests.

Validation: 51 tests passed across the issue-integration endpoint and GitHub/GitHub Enterprise issue integrations, including successful PUTs for an issue, a PR changes-tab URL, and an Enterprise PR. Targeted mypy, prek, and diff checks passed.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 14, 2026
@sentry

sentry Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
- - - - - - ✅ 503 uploaded

Base commit 960cae8bf106c6544ae58f4a9ed7966f5ead6be0 did not produce snapshots to compare against. Did its snapshot job fail? Try rebasing this branch on a commit with a successful snapshot job.

⚙️ sentry-frontend Snapshot Settings

betegon added a commit that referenced this pull request Sep 14, 2026
…24067)

The issue-linking PUT now accepts a full Jira or Jira Server URL in
`externalIssue`, using the selected installation to resolve it before
running the existing linking flow. This lets API callers submit the same
URLs users paste into the issue selector.

Reuses `parse_jira_issue_key()` from #123389, which previously handled
search/autocomplete. The origin calculation is shared with URL
validation while the existing search parser keeps its accepted inputs
and full-text fallback. Direct linking rejects invalid URLs and URLs
from another installation.

This PR contains the shared PUT support and Jira/Jira Server only. Other
providers are split into separate PRs based on this branch. Existing
identifier payloads and neutral reference semantics are preserved;
linking does not resolve the Sentry issue.

Provider follow-ups: GitHub/GitHub Enterprise #124305, GitLab #124306,
Bitbucket #124307, and Azure DevOps #124308.

Validation: 50 shared issue integration and linking endpoint tests
passed, covering identifiers, URLs, malformed URL rejection, and
positive URL parsing cases. Targeted mypy, prek, and diff checks passed.
Base automatically changed from bt/issue-link-urls to master September 14, 2026 19:35
@betegon
betegon force-pushed the bt/issue-link-github-urls branch from c3eac25 to 0f4ded1 Compare September 14, 2026 19:41
@betegon
betegon marked this pull request as ready for review September 14, 2026 19:49
@betegon
betegon requested review from a team as code owners September 14, 2026 19:49

@cursor cursor Bot left a comment

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.

Stale Bugbot comment from a previous run.

Comment thread src/sentry/integrations/github/issues.py

@cursor cursor Bot left a comment

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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 67318ff. Configure here.

Comment thread src/sentry/integrations/github/issues.py
@betegon
betegon requested a review from cvxluo September 14, 2026 20:58
@betegon
betegon requested review from a team as code owners September 14, 2026 21:15

@cvxluo cvxluo left a comment

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.

will we also want this for github enterprise?

@betegon

betegon commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

@cvxluo we already support GHE from this PR, both use GitHubIssuesSpec which is what I modified here and why we have tests for GHE!

@betegon
betegon merged commit aa50db9 into master Sep 15, 2026
66 of 67 checks passed
@betegon
betegon deleted the bt/issue-link-github-urls branch September 15, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants