Title: Enhancement: Allow `gh stack link` to parse PR URLs, not just PR numbers · Issue #115 · github/gh-stack · GitHub
Open Graph Title: Enhancement: Allow `gh stack link` to parse PR URLs, not just PR numbers · Issue #115 · github/gh-stack
X Title: Enhancement: Allow `gh stack link` to parse PR URLs, not just PR numbers · Issue #115 · github/gh-stack
Description: Currently, running gh stack link only parses PR numbers from user input, and attempts to use a PR URL (as opposed to a branch name) are currently interpreted as branch names. This is potentially confusing, as the documentation says you c...
Open Graph Description: Currently, running gh stack link only parses PR numbers from user input, and attempts to use a PR URL (as opposed to a branch name) are currently interpreted as branch names. This is potentially co...
X Description: Currently, running gh stack link only parses PR numbers from user input, and attempts to use a PR URL (as opposed to a branch name) are currently interpreted as branch names. This is potentially co...
Opengraph URL: https://github.com/github/gh-stack/issues/115
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Enhancement: Allow `gh stack link` to parse PR URLs, not just PR numbers","articleBody":"Currently, running `gh stack link` only parses PR numbers from user input, and attempts to use a PR URL (as opposed to a branch name) are currently interpreted as branch names. This is potentially confusing, as the documentation says you can specify PRs to link, but does not clarify that URLs are unsupported.\n\n**Proposal**\n- Enhance `gh stack link` to also parse GitHub PR URLs, in addition to PR numbers.\n- If a PR URL is detected in the input, extract and use the PR number to complete the linking operation as expected.\n- This will allow a more intuitive workflow for users who copy/paste PR links from GitHub’s interface.\n\n**Context**\nA user reported confusion when inputting a PR URL to `gh stack link`, as the tool interpreted it as a branch rather than as a PR. Improving the URL parsing would help align functionality with user expectations and documentation.\n\n[View original Slack conversation](https://github.slack.com/archives/C09M2GA1KQX/p1780682143254649?thread_ts=1780682143.254649\u0026cid=C09M2GA1KQX)","author":{"url":"https://github.com/skarim","@type":"Person","name":"skarim"},"datePublished":"2026-06-05T19:18:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/115/gh-stack/issues/115"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:704b2483-670b-b3a2-3128-5a4ff1c5d460 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9BF6:ECB07:2626D3:3319F1:6A503CE8 |
| html-safe-nonce | 28891589cd4e12abe24520629641ccf92ebee10be97dc69345e6e2cd0671cf4c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QkY2OkVDQjA3OjI2MjZEMzozMzE5RjE6NkE1MDNDRTgiLCJ2aXNpdG9yX2lkIjoiOTEwMDM1MTc3NTcxMDM5NTYyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 195867acbf3dac18d67c8d1bf783c9c3dff6c6a71d2c5d6d914842a5f0748f38 |
| hovercard-subject-tag | issue:4599493412 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/gh-stack/115/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0ed7f2aa0ea3164a2d39d19b134cb728431c502750b6534c835a5b80c0ddc0c4/github/gh-stack/issues/115 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0ed7f2aa0ea3164a2d39d19b134cb728431c502750b6534c835a5b80c0ddc0c4/github/gh-stack/issues/115 |
| og:image:alt | Currently, running gh stack link only parses PR numbers from user input, and attempts to use a PR URL (as opposed to a branch name) are currently interpreted as branch names. This is potentially co... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | skarim |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/github/gh-stack git https://github.com/github/gh-stack.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 1151630728 |
| octolytics-dimension-repository_nwo | github/gh-stack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1151630728 |
| octolytics-dimension-repository_network_root_nwo | github/gh-stack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d90666eaf032b7eb8975a378efe38e37f4ebb96c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width