Skip to content

Enhancement: Allow gh stack link to parse PR URLs, not just PR numbers #115

@skarim

Description

@skarim

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 link to 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.

View original Slack conversation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions