Closed zackproser closed 3 years ago
Hello,
your tool was exactly what I was looking for, sadly I got the same error:
[git-xargs] DEBU[2021-04-22T14:10:51+02:00] Local repository worktree no longer clean, will stage and add new files and commit changes Repo=room-management-example Found untracked file new-file.md. Adding to stage
[git-xargs] DEBU[2021-04-22T14:10:53+02:00] Successfully pushed local branch to remote origin Repo=room-management-example
[git-xargs] DEBU[2021-04-22T14:10:54+02:00] Error opening Pull request Base=master Body="Testing git-xargs" Error="POST https://api.github.com/repos/<org>/room-management-example/pulls: 422 Validation Failed [{Resource:PullRequest Field:base Code:invalid Message:}]" Head=refs/heads/testing-git-xargs
[git-xargs] DEBU[2021-04-22T14:10:54+02:00] Error encountered while processing repo Error="POST https://api.github.com/repos/<org>/room-management-example/pulls: 422 Validation Failed [{Resource:PullRequest Field:base Code:invalid Message:}]" Repo name=room-management-example
Looked into your source and found master
as base branch. We already use main
as default branch. Maybe thats the problem?
Can you make the default branch configurable?
Proposal: Add the branch to the repo string in the repo file like:
gruntwork-io/infrastructure-as-code-training/tree/main
gruntwork-io/infrastructure-live-acme/tree/some-other-branch
This way you could use different base-branches for every repository and the user can copy the url from his browser. Maybe you could ignore https://github.com in the beginning, then the user could just navigate to the branch and copy an paste the url.
Hello,
your tool was exactly what I was looking for, sadly I got the same error:
[git-xargs] DEBU[2021-04-22T14:10:51+02:00] Local repository worktree no longer clean, will stage and add new files and commit changes Repo=room-management-example Found untracked file new-file.md. Adding to stage [git-xargs] DEBU[2021-04-22T14:10:53+02:00] Successfully pushed local branch to remote origin Repo=room-management-example [git-xargs] DEBU[2021-04-22T14:10:54+02:00] Error opening Pull request Base=master Body="Testing git-xargs" Error="POST https://api.github.com/repos/<org>/room-management-example/pulls: 422 Validation Failed [{Resource:PullRequest Field:base Code:invalid Message:}]" Head=refs/heads/testing-git-xargs [git-xargs] DEBU[2021-04-22T14:10:54+02:00] Error encountered while processing repo Error="POST https://api.github.com/repos/<org>/room-management-example/pulls: 422 Validation Failed [{Resource:PullRequest Field:base Code:invalid Message:}]" Repo name=room-management-example
Looked into your source and found
master
as base branch. We already usemain
as default branch. Maybe thats the problem? Can you make the default branch configurable?Proposal: Add the branch to the repo string in the repo file like:
gruntwork-io/infrastructure-as-code-training/tree/main gruntwork-io/infrastructure-live-acme/tree/some-other-branch
This way you could use different base-branches for every repository and the user can copy the url from his browser. Maybe you could ignore https://github.com in the beginning, then the user could just navigate to the branch and copy an paste the url.
Thanks for the detailed report! Yes, making the base branch configurable is a pretty quick change. I'll look at it as soon as I can.
Just realised that a few people have reported that. I had a stab at it to support the default branch https://github.com/gruntwork-io/git-xargs/pull/23
Not fully configurable but should help with most cases I believe. What do you think @zackproser?
Just realised that a few people have reported that. I had a stab at it to support the default branch #23
Not fully configurable but should help with most cases I believe. What do you think @zackproser?
This would help in my case
This should have been fixed in https://github.com/gruntwork-io/git-xargs/pull/23 thanks to @jphuynh !
Thank you, that was fast. My test was successful
Thank you, that was fast. My test was successful
Awesome - so happy to hear it!