File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ # Merge open PRs from sagemath/sage labeled "blocker".
3
+ GH=" gh -R sagemath/sage"
4
+ PRs=" $( $GH pr list --label " p: blocker / 1" --json number --jq ' .[].number' ) "
5
+ if [ -z " $PRs " ]; then
6
+ echo ' Nothing to do: Found no open PRs with "blocker" status.'
7
+ else
8
+ echo " Found PRs: " $PRs
9
+ export GIT_AUTHOR_NAME=" ci-sage workflow"
10
+ export GIT_AUTHOR_EMAIL=
" [email protected] "
11
+ export GIT_COMMITTER_NAME=" $GIT_AUTHOR_NAME "
12
+ export GIT_COMMITTER_EMAIL=" $GIT_AUTHOR_EMAIL "
13
+ git commit -q -m " Uncommitted changes" --no-allow-empty -a
14
+ git tag -f test_head
15
+ for a in $PRs ; do
16
+ echo " ::group::Merging PR #$a "
17
+ $GH pr checkout $a
18
+ git checkout -q test_head
19
+ if git merge --no-edit -q FETCH_HEAD; then
20
+ echo " ::endgroup::"
21
+ echo " Merged #$a "
22
+ else
23
+ echo " ::endgroup::"
24
+ echo " Failure merging #$a , resetting"
25
+ git reset --hard
26
+ fi
27
+ done
28
+ fi
You can’t perform that action at this time.
0 commit comments