mirror of
https://github.com/Paillat-dev/discord-emojis.git
synced 2026-01-02 00:56:19 +00:00
Fix create pr thing
This commit is contained in:
16
.github/workflows/build.yaml
vendored
16
.github/workflows/build.yaml
vendored
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user