gh-stack
gh-stack copied to clipboard
Enhancement: Allow `gh stack link` to parse PR URLs, not just PR numbers
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.
Proposal
- Enhance
gh stack linkto also parse GitHub PR URLs, in addition to PR numbers. - If a PR URL is detected in the input, extract and use the PR number to complete the linking operation as expected.
- This will allow a more intuitive workflow for users who copy/paste PR links from GitHub’s interface.
Context
A 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.