github-repo-automation
github-repo-automation copied to clipboard
Allow reverts to be supported (or documented)
Currently, in order to revert any changes made I had to go through the following command:
repo apply --branch name --message header --comment body "git revert --no-commit \$(git log --grep=\"for text you need\" --pretty=format:\"%H\"); git reset"
it took a bit of time to figure out that if you simply only do git reverts, the repo tool looks for changes to make through git status and thus does not work naturally with the way that git revert works, hence that's why I had to add ;git reset. Can this be supported through like repo revert "insert query to match commit"?
If not, having the above documented somewhere could also be great for other folks wishing to do a massive revert.
Thanks for reporting this issue, Dan.
I don't know the repo tool well. To help me understand, could you describe in these terms:
- What you did.
- What you expected to happen.
- What actually happened.
Thanks!
Hey Jeff!
- Currently we don't support
git revertthrough the repo tool features, so I've went around to userepo applytool and used itsexecfeature to usegit revertcommands through the repositories to successfully revert specific commits. - I would like this to be supported through a command lets say called
repo revertrather than having to weave my way around - I've also tried using
repo execbut it doesn't automatically create PRs for you so I've had to userepo apply ...as shown above but with a minor tweak so that it complies with howrepo applyexpects your git branch status to be in. More specifically,git revertnaturally goes into committed changes,repo applytool expects changes to not be committed yet, thus an additional tweak is required. I don't think anything should change forrepo applyfunction, but support forrepo revertwould be great!