Skip to content

Commit

Permalink
check again for existing PRs exactly before opening draft PR (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
altergui authored Nov 21, 2023
1 parent 6a76482 commit 1db0716
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/contribute
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ check_contribute_env() {
exit 1
fi

echo
if curl -s -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/$GITHUB_REPO/pulls" \
| jq '.[].title' | grep Contribution | grep $CEREMONY_BRANCH ; then
echo "Oops, there's a PR from someone *right now* uploading a contribution to this ceremony, just wait a couple of minutes and try again"
exit 5
fi

touch .lock && git add .lock && git commit .lock -m "Prevent other contributions" && git push origin $CEREMONY_BRANCH

gh pr create --title "Contribution: from $CONTRIBUTOR_NAME to '$CEREMONY_BRANCH' ceremony" --body "" \
Expand Down

0 comments on commit 1db0716

Please sign in to comment.