Skip to content

gh pr create: Support Git's @{push} revision syntax for determining head ref #10513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
b61b229
doc: fix PullRequestRefs comment
BagToad Feb 24, 2025
a8d01c7
feat: support `@{push}` revision syntax
BagToad Feb 25, 2025
6db9048
refactor: Refactor pr create
BagToad Feb 26, 2025
dc48625
test(pr create): test --head=<remote>:<branch>
BagToad Feb 27, 2025
cd67c2e
test(pr create): AT assert head repo and head ref
BagToad Feb 27, 2025
84a35ca
refactor: rename IsPushEnabled for clarity
BagToad Feb 27, 2025
1848beb
test(pr create): unset gh-resolved
BagToad Feb 28, 2025
10e3949
refactor(pr create): use prRefs.GetPRHeadLabel()
BagToad Feb 28, 2025
a5fe37f
test(pr create): add AT for remote:branch syntax
BagToad Feb 28, 2025
c3087cd
refactor(pr create): Refactor NewCreateContext
BagToad Mar 5, 2025
178fb40
refactor(pr create): Use PrRefs in CreateContext
BagToad Mar 5, 2025
c0c5d91
refactor(pr create): use GetPRHeadLabel()
BagToad Mar 5, 2025
f50dac5
docs(pr create): fix <repo_name>:<branch> desc.
BagToad Mar 5, 2025
9f1cb0c
refactor(pr create): simplify head remote logic
BagToad Mar 5, 2025
cf58910
refactor(pr create): named headRefName var
BagToad Mar 5, 2025
911079c
docs(pr create): add comments
BagToad Mar 5, 2025
ba6e2ec
test(pr create): skip tests that create forks
BagToad Mar 5, 2025
9b96e6c
doc(pr create): fix typo in test comments
BagToad Mar 6, 2025
da235b1
tests(pr create): remove irrelevant comments
BagToad Mar 6, 2025
1ce3d99
test(pr create): add logical spacing between operations
BagToad Mar 10, 2025
bab7dc6
test(pr create): update repo owner names in tests
BagToad Mar 10, 2025
54da786
fix(pr create): update error handling
BagToad Mar 10, 2025
e999976
refactor(pr create): add PullRequestRefs `HasHead`
BagToad Mar 10, 2025
d524cbd
docs(pr create): clarify comment on head branch syntax
BagToad Mar 10, 2025
e9e57f3
doc(pr create): fix typo in comments
BagToad Mar 10, 2025
6dae35b
test(finder): change assert to require
BagToad Mar 11, 2025
041f02c
docs(pr create): standard <user>:<branch> syntax
BagToad Mar 11, 2025
7bb5d71
doc(pr create): improve head repo resolution comments
BagToad Mar 11, 2025
15ea861
docs(pr create): help text, doc user:branch syntax
BagToad Mar 11, 2025
81d00a3
fix(pr create): use existing local variables
BagToad Mar 11, 2025
188e138
test(pr create): add AT for no local repo
BagToad Mar 11, 2025
bf7bf99
fix(pr create & stubs): handle exitcode in stubs
BagToad Mar 12, 2025
0611d9d
test(pr create): fix user:branch syntax AT
BagToad Mar 12, 2025
76de5f0
test(pr finder): run test in parallel
BagToad Mar 12, 2025
6004fc2
fix(pr create): use curly brace for vars in AT
BagToad Mar 12, 2025
bdfec50
fix(pr create): use REPO var in AT
BagToad Mar 12, 2025
339e1a2
docs(pr create): add link for user:branch syntax
BagToad Mar 12, 2025
028caa3
docs(pr create): clarify BaseRepo type in submitPR
BagToad Mar 12, 2025
ebd147b
Use verbose upstream setting
williammartin Mar 13, 2025
a9dbda6
Rework ref usage when finding and creating PRs
williammartin Apr 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(pr create): clarify comment on head branch syntax
  • Loading branch information
BagToad committed Apr 15, 2025
commit d524cbddc255cc454469d84d861da5a72f38500c
2 changes: 1 addition & 1 deletion pkg/cmd/pr/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ func NewCreateContext(opts *CreateOptions) (*CreateContext, error) {
promptForHeadRepo = false
targetHeadBranch = opts.HeadBranch
// If the --head provided contains a colon, that means
// this is <repo_name>:<branch> syntax.
// this is <owner>:<branch> syntax.
if idx := strings.IndexRune(opts.HeadBranch, ':'); idx >= 0 {
targetHeadRepoOwner = opts.HeadBranch[:idx]
targetHeadBranch = opts.HeadBranch[idx+1:]
Expand Down