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

git-xargs should open PRs even if it did not commit any changes #39

Open radicarl opened 3 years ago

radicarl commented 3 years ago

I think, git-xargs should always open PRs even if the given command did not change anything locally or if the push returns already up-to-date. The reason why I use your great tool, is that I want to merge some changes in to my main-branch. I don't care if the tool does these changes, commit them and push them to the branch I passed to the tool, or if these changes already exists in the remote branch, as long as a PR is opened so I can merge my changes into main.

brikis98 commented 3 years ago

Thanks for opening the issue. This does seem like the right behavior. I'm not going to be able to get to this soon, but a PR to fix this is very welcome.

radicarl commented 3 years ago

Hey, sadly I don't speak go. The Issue is not urgent for me, so I can wait.

radicarl commented 1 year ago

Hello again,

I am now in a situation again, where it would be great, if the PR would be opened even if the push did not change anything. I changed over 100 repositories, sadly after less then 50 PRs the max numbers of PR retries where reached. So now I have to either remove the branches or open all PRs by hand.

radicarl commented 1 year ago

Workaround: add the following commands at the top of the script which git-xargs executes to do the changes:

git push -d origin <branchname>
git checkout main
git branch -D <branchname>
git checkout -b <branchname>

Make sure exists in none of your repos before. Otherwise it will be lost.