Draft
Conversation
Resolve Sentry share URLs (e.g., https://{org}.sentry.io/share/issue/{id}/)
by threading support through the URL parsing, argument parsing, and issue
resolution pipeline.
Two-step resolution: call the public share API endpoint to get the numeric
group ID, then fetch full details via the authenticated API.
Changes:
- Add shareId field and matchSharePath() to sentry-url-parser.ts
- Add "share" variant to ParsedIssueArg in arg-parsing.ts
- Add getSharedIssue() API function (public endpoint, no auth)
- Add resolveShareIssue() and "share" case in issue resolution
- Make org optional on ParsedSentryUrl (share URLs may lack org)
- Guard org access in event/view.ts for type safety
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Contributor
|
Contributor
Codecov Results 📊✅ 134 passed | Total: 134 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 89.13%. Project has 1597 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 95.32% 95.31% -0.01%
==========================================
Files 232 232 —
Lines 33951 34037 +86
Branches 0 0 —
==========================================
+ Hits 32361 32440 +79
- Misses 1590 1597 +7
- Partials 0 0 —Generated by Codecov Action |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
https://{org}.sentry.io/share/issue/{shareId}/now work withsentry issue view,explain, andplansentry.io, self-hosted, and region subdomain share URLsHow it works
sentry-url-parser.ts): NewmatchSharePath()+ share branch inmatchSubdomainOrg()recognize/share/issue/{shareId}/pathsarg-parsing.ts): New"share"variant inParsedIssueArgcarriesshareId, optionalorg, andbaseUrlapi/issues.ts):getSharedIssue()calls the publicGET /api/0/shared/issues/{shareId}/endpoint (no auth needed) to get thegroupIDissue/utils.ts):resolveShareIssue()fetches groupID via share API, then uses the authenticated API for full issue details with proper region routingType change
ParsedSentryUrl.orgis now optional since share URLs on bare domains lack org context. Guards added inissueArgFromUrl(),orgProjectFromUrl(), andevent/view.ts.