@@ -352,13 +352,13 @@ sentry issue link my-org/FRONT-123 https://github.com/example/app/issues/42 --js
352352` --dry-run ` discovers the integration and prepares the link without submitting a
353353write. The provider validates the remote issue when the link is submitted.
354354An existing matching link succeeds with ` changed: false ` . A Sentry App that
355- already links this issue to a different resource must be unlinked in Sentry first.
355+ already links this issue to a different resource must be unlinked first.
356356App callbacks must return the exact supplied URL; use the issue URL copied from
357357the tracker, including its title suffix. A mismatch fails without saving the link.
358358
359359GitHub and GitHub Enterprise pull requests are stored as external references.
360360Their ` /pull/NUMBER ` and ` /issues/NUMBER ` URLs identify the same resource for
361- duplicate detection. Linking a PR does not mark it as a fix or
361+ duplicate detection and unlinking . Linking a PR does not mark it as a fix or
362362resolve the Sentry issue.
363363
364364This command does not create a tracker issue or link a commit. Existing
@@ -372,3 +372,33 @@ OAuth login. If an older OAuth session lacks the
372372requested scopes, the CLI offers reauthorization after a permission error.
373373Use ` sentry auth login ` to request the current default scopes. Environment tokens must
374374be updated separately.
375+
376+ ### Unlink an external issue
377+
378+ Remove an association without deleting either issue:
379+
380+ ``` bash
381+ sentry issue unlink FRONT-123 https://github.com/example/app/issues/42
382+ sentry issue unlink FRONT-123 https://github.com/example/app/pull/43 --yes
383+ sentry issue unlink my-org/FRONT-123 https://example.atlassian.net/browse/APP-42 --yes
384+ sentry issue unlink FRONT-123 https://linear.app/example/issue/APP-42/fix-error --dry-run
385+ ```
386+
387+ Use ` --yes ` for non-interactive execution. ` --dry-run ` shows whether the link
388+ exists without removing it. If the association is already absent, the command
389+ succeeds with ` changed: false ` .
390+
391+ Unlink matches the URL against stored associations and sends Sentry's internal
392+ link ID to the existing DELETE endpoint. It does not require fetching the ticket
393+ from the remote tracker, so a deleted remote ticket can still be unlinked.
394+ For a custom Sentry App, select it with ` --app <slug> ` ; unlink does not require
395+ the app to expose a link form. Use ` --integration <id> ` to disambiguate native
396+ integration links.
397+
398+ #### Unlink permissions
399+
400+ Unlink requires ** ` event:write ` and access to the Sentry project** ; ` event:admin `
401+ is also accepted. The organization's “Let Members Delete Events” setting does
402+ not restrict unlinking on updated Sentry versions.
403+
404+ Granting a token more scopes does not override project-access policy.
0 commit comments