Improve merge_pr_with_label

This commit is contained in:
Laurent Rineau 2021-10-29 17:06:12 +02:00
parent ca89949169
commit ea15e79a89
1 changed files with 3 additions and 1 deletions

View File

@ -2,12 +2,14 @@
: ${GITHUB_HUB:=$(which hub)}
label=${1:-"Under Testing"}
if ! [ -x "${GITHUB_HUB}" ]; then
echo 'Needs Github hub: https://github.com/github/hub and Github gh: https://github.com/cli/cli' >&2
exit 1
fi
for pr in `gh pr list --label "Under Testing" | awk '{print $1}'`; do
for pr in `gh pr list --label "$label" | awk '{print $1}'`; do
if ! hub merge https://github.com/CGAL/cgal/pull/$pr; then
echo $pr;
exit 1