Created
August 26, 2019 13:07
-
-
Save tyrcho/494597d7c0f27b79d2b41eb1621dab57 to your computer and use it in GitHub Desktop.
Rebase on source branch all open MR for a user in a group
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
curl \ | |
--header "PRIVATE-TOKEN: $GITLAB_PAT" \ | |
"https://gitlab.com/api/v4/groups/$GROUP_ID/merge_requests?state=opened&scope=all&author_id=$AUTHOR_ID" \ | |
| jq -r '.[] | "\(.project_id) \(.iid)"' \ | |
| while read -r projectid mrid; do | |
curl -X PUT --header "PRIVATE-TOKEN: $GITLAB_PAT" "https://gitlab.com/api/v4/projects/$projectid/merge_requests/$mrid/rebase" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment