Skip to content

Instantly share code, notes, and snippets.

@op-ct
Created October 1, 2016 02:16
Show Gist options
  • Save op-ct/73e5dd4e6e23faf3646839b136292a35 to your computer and use it in GitHub Desktop.
Save op-ct/73e5dd4e6e23faf3646839b136292a35 to your computer and use it in GitHub Desktop.
Mass CR in Gerrit
# references:
# - https://www.mediawiki.org/wiki/Gerrit/Advanced_usage#How_to_review_and_merge_code_via_command_line
# - https://gist.github.com/Rud5G/5604323
# get review numbers
ssh [email protected] -p 29418 gerrit query 'is:open project:^simp/.* message:SIMP-1450.*' | egrep '^ number' | cut -d\ -f4- > CHANGES_NUMBERS
# CR -1 patchset 1 in all reviews
for i in `cat CHANGES_NUMBERS`; do echo == $i; ssh [email protected] -p 29418 gerrit review --code-review -1 --message \"Hold off on merging until we properly bound the deps for the existing 4.3.X/5.2.X Forge modules\" $i,1; sleep 1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment