Skip to content

gh browse hashtag issue #6095

@LangLangBart

Description

@LangLangBart

Describe the bug

gh browse is generating the wrong link when the provided Issue/PR number has a hashtag.

❯ gh --version
gh version 2.14.4 (2022-08-10)

Urgency: low

Steps to reproduce the behavior

  1. enter the first command, it will not take you to your desired destination.
❯ gh browse '#8' -R cli/cli -n
https://github.com/cli/cli/tree/trunk/%238
❯ gh browse '8' -R cli/cli -n
https://github.com/cli/cli/issues/8

# gh issue/pr view ... work correctly.
❯ gh issue view '#8' -wR cli/cli
Opening github.com/cli/cli/pull/8 in your browser.
❯ gh issue view '8' -wR cli/cli
Opening github.com/cli/cli/pull/8 in your browser.
❯ gh pr view '#8' -wR cli/cli
Opening github.com/cli/cli/pull/8 in your browser.
❯ gh pr view '8' -wR cli/cli
Opening github.com/cli/cli/pull/8 in your browser.

Expected vs actual behavior

gh browse '#8' -R cli/cli should behave like gh browse '8' -R cli/cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions welcomepriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions