Created
June 17, 2023 15:05
-
-
Save pcdavid/8c6f0da4600df5fcbd1295d20e101c2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export USER=pdavid | |
export SERVER=git.eclipse.org | |
export PROJECT_SHORT=sirius | |
export PROJECT_FULL=sirius/org.eclipse.sirius | |
ssh -p 29418 "$USER@$SERVER" gerrit query --format JSON --current-patch-set --no-limit status:open "project:$PROJECT_FULL" | \ | |
tee -a "~/${PROJECT_SHORT}-open-changes.json" | \ | |
jq -r '. | select(has("number")) | ("git fetch ssh://pdavid@git.eclipse.org:29418/sirius/org.eclipse.sirius " + .currentPatchSet.ref + " && git branch change/" + (.number | tostring) + "/" + (.currentPatchSet.number | tostring) + " FETCH_HEAD")' | \ | |
while read fetchCmd; do sh -c "$fetchCmd"; sleep 10; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment