File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
# Merge open PRs from sagemath/sage labeled "blocker".
3
- GH=" gh -R sagemath/sage"
3
+ REPO=" sagemath/sage"
4
+ GH=" gh -R $REPO "
4
5
PRs=" $( $GH pr list --label " p: blocker / 1" --json number --jq ' .[].number' ) "
5
6
if [ -z " $PRs " ]; then
6
7
echo ' Nothing to do: Found no open PRs with "blocker" status.'
13
14
git commit -q -m " Uncommitted changes" --no-allow-empty -a
14
15
git tag -f test_head
15
16
for a in $PRs ; do
16
- echo " ::group::Merging PR #$a "
17
- $GH pr checkout $a
17
+ echo " ::group::Merging PR https://github.com/$REPO /pull/$a "
18
+ $GH pr checkout -b pr-$a $a
19
+ git fetch --unshallow --all
18
20
git checkout -q test_head
19
- if git merge --no-edit -q FETCH_HEAD ; then
21
+ if git merge --no-edit -q pr- $a ; then
20
22
echo " ::endgroup::"
21
23
echo " Merged #$a "
22
24
else
25
27
git reset --hard
26
28
fi
27
29
done
30
+ git log test_head..HEAD
28
31
fi
You can’t perform that action at this time.
0 commit comments