gruntwork-io / git-xargs

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
https://blog.gruntwork.io/introducing-git-xargs-an-open-source-tool-to-update-multiple-github-repos-753f9f3675ec
Apache License 2.0
935 stars 62 forks source link

fix: Use the repo default branch as base when opening a PR #23

Closed jphuynh closed 3 years ago

jphuynh commented 3 years ago

Encountered that issue when running git-xargs and trying to create a PR on a repository that uses main as default branch.

jphuynh commented 3 years ago

I couldn't get the value to be assigned to a const string but I'm not a golang expert :) FWIW I don't think it's really necessary but I could be wrong.

jphuynh commented 3 years ago

I was thinking about this and is there a specific reason why you decided to lift the changes out of band into the other PR https://github.com/gruntwork-io/git-xargs/pull/20?

They are very unrelated. I think this one could be merged without the other and make everything more readable.

zackproser commented 3 years ago

@jphuynh I originally wasn't seeing this in the diff where you instantiated the repoDefaultBranch variable. Must have been tired - so that was why I ported the core of your logic over to the PR I expected to merged imminently.

Regardless - many thanks for fixing this!