mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-25 01:13:40 +00:00
Update auto-update-app-headers.yml
This commit is contained in:
parent
f23da27ba2
commit
d852e7b098
@ -80,13 +80,20 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
PR_NUMBER=$(gh pr list --head "pr-update-app-files" --json number --jq '.[].number')
|
PR_NUMBER=$(gh pr list --head "pr-update-app-files" --json number --jq '.[].number')
|
||||||
|
|
||||||
if [ -n "$PR_NUMBER" ]; then
|
if [ -n "$PR_NUMBER" ]; then
|
||||||
PR_AUTHOR=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login')
|
PR_AUTHOR=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login')
|
||||||
|
|
||||||
|
# Skip approval if the PR was created by the bot
|
||||||
if [ "$PR_AUTHOR" != "github-actions[bot]" ]; then
|
if [ "$PR_AUTHOR" != "github-actions[bot]" ]; then
|
||||||
gh pr review "$PR_NUMBER" --approve
|
gh pr review "$PR_NUMBER" --approve
|
||||||
else
|
else
|
||||||
echo "PR was created by the bot, skipping review."
|
echo "Skipping approval: PR was created by the bot."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "No PR found for the current branch."
|
echo "No PR found for the current branch."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "No PR found for the current branch."
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user