test_dep_update: sleep some seconds before merging PR

This commit is contained in:
André Silva
2022-05-31 10:34:31 +01:00
committed by ckie
parent a7a360c6dc
commit 7f9cfd6640
3 changed files with 10 additions and 1 deletions

View File

@@ -15,7 +15,15 @@ fi
echo "$json" | jq '.[] | .headRefName | @text' | xargs -L1 -- git pull origin
if nix build .#checks.x86_64-linux.init-example-el; then
echo "$json" | jq ".[] | .number | @text" | xargs -L1 -- gh pr merge --squash --delete-branch
prs=$(echo "$json" | jq ".[] | .number")
for pr in $prs; do
# Whenever there's a bunch of PRs to merge at the same time
# the GitHub API needs some time to update its internal
# state before allowing another PR to be merged.
sleep 5
gh pr merge --squash --delete-branch "$pr"
done
else
gh issue create \
--title "Recent Dependency update PRs failing tests" \