chore: ignore creating a pr if one exists

This commit is contained in:
wolfcomp 2023-01-16 15:16:56 +01:00 committed by GitHub
parent 43690223c5
commit 425a4d7c18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,8 +47,7 @@ jobs:
prNumber=$(gh pr list --base ${{ matrix.branches }} --head csupdate-${{ matrix.branches }} --state open --json number --template "{{range .}}{{.number}}{{end}}")
if [ -z "$prNumber" ]; then
echo "No PR found, creating one"
gh pr create --head csupdate-${{ matrix.branches }} --title "[${{ matrix.branches }}] Update ClientStructs" --body "" --base ${{ matrix.branches }}
else
echo "PR already exists, closing it"
gh pr close $prNumber
echo "PR already exists, ignoring"
fi
gh pr create --head csupdate-${{ matrix.branches }} --title "[${{ matrix.branches }}] Update ClientStructs" --body "" --base ${{ matrix.branches }}