mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-25 01:13:40 +00:00
fix reapproval
This commit is contained in:
parent
8c6af4db1f
commit
1c90c131b7
11
.github/workflows/auto-update-app-headers.yml
vendored
11
.github/workflows/auto-update-app-headers.yml
vendored
@ -70,9 +70,20 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
# Get the PR number for the current branch
|
||||||
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')
|
||||||
|
|
||||||
|
# Check if a PR number was retrieved
|
||||||
|
if [ -n "$PR_NUMBER" ]; then
|
||||||
|
# Get the PR author
|
||||||
PR_AUTHOR=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login')
|
PR_AUTHOR=$(gh pr view "$PR_NUMBER" --json author --jq '.author.login')
|
||||||
|
|
||||||
|
# Approve the PR if it was not 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 "PR was created by the bot, skipping review."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "No PR found for the current branch."
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user