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 revert
through the repo tool features, so I've went around to userepo apply
tool and used itsexec
feature to usegit revert
commands through the repositories to successfully revert specific commits. - I would like this to be supported through a command lets say called
repo revert
rather than having to weave my way around - I've also tried using
repo exec
but 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 apply
expects your git branch status to be in. More specifically,git revert
naturally goes into committed changes,repo apply
tool expects changes to not be committed yet, thus an additional tweak is required. I don't think anything should change forrepo apply
function, but support forrepo revert
would be great!