-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workingpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
Describe the bug
When using a GH_TOKEN environment variable to authenticate, gh pr create --web opens a badly formatted URL.
gh version 2.0.0 (2021-08-23)
macOS - M1 processor
Steps to reproduce the behavior
With GH_TOKEN:
- export GH_TOKEN
- Push changes to a new branch
gh pr create --webopens a URL in the wrong format -https://github.com///compare/...ORG_NAME%3ABRANCH-NAME?body=&expand=1
With HTTP/SSH:
- Without GH_TOKEN configured, sign in using
gh auth login - Push changes to a new branch
gh pr create --webopens a URL in the correct format -https://github.com/ORG_NAME/REPO_NAME/compare/main...BRANCH_NAME?body=&expand=1
Expected vs actual behavior
I would expect the behaviour to be the same regardless of how the user is authenticated
Logs
When authenticated with GH_TOKEN:
> gh pr create --web
Opening github.com///compare/...ORG_NAME:BRANCH_NAME in your browser.
When authenticated with HTTP/SSH:
> gh pr create --web
Opening github.com/ORG_NAME/REPO_NAME/compare/main...BRANCH_NAME in your browser.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic