Fix create pr thing

This commit is contained in:
2025-05-03 16:41:20 +02:00
parent 7020003fd9
commit f78fa33317

View File

@@ -78,10 +78,12 @@ jobs:
- name: Open Pull Request - name: Open Pull Request
if: env.changes_detected == 'true' if: env.changes_detected == 'true'
uses: peter-evans/create-pull-request@v5 # use the gh cli to create a pull request, first check if a pr already exists for the branch
with: run: |
branch: ${{ env.branch_name }} EXISTING_PR=$(gh pr list --search "is:open label:emojis" --json headRefName,number,author -q '.[0]')
title: "Emojis autoupdate" if [ -z "$EXISTING_PR" ]; then
body: "This PR updates the emojis based on the latest datamining changes." echo "No existing PR found, creating a new one."
base: master gh pr create --base main --head ${{ env.branch_name }} --title "Emojis Auto Update" --body "This PR was created automatically by the Emojis Auto Update workflow." --label emojis
commit-message: "Emojis autoupdate" else
echo "An existing PR was found: $EXISTING_PR"
fi