Skip to content

Commit 3e1b56d

Browse files
committed
Approve update
1 parent c2a9330 commit 3e1b56d

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/outdated-update-package.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,23 @@ jobs:
6565
- name: Enable auto-merge for pull request
6666
if: ${{ steps.cpr.outputs.pull-request-number }}
6767
run: |
68-
set -x
69-
gh repo set-default php-curl-class/php-curl-class
70-
gh repo set-default --view
7168
gh pr merge --auto --merge "${PR_URL}"
7269
env:
7370
PR_URL: ${{ steps.cpr.outputs.pull-request-url }}
74-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Approve update
74+
if: ${{ steps.cpr.outputs.pull-request-number }}
75+
run: |
76+
review_status="$(
77+
gh pr view "${PR_URL}" \
78+
--json="reviewDecision" \
79+
--jq=".reviewDecision"
80+
)"
81+
echo "Pull request review status: ${review_status}"
82+
if [[ "${review_status}" != "APPROVED" ]]; then
83+
gh pr review --approve "${PR_URL}"
84+
fi
85+
env:
86+
PR_URL: ${{ steps.cpr.outputs.pull-request-url }}
87+
GITHUB_TOKEN: ${{ secrets.PHP_CURL_CLASS_TOKEN }}

.github/workflows/pre-commit-auto-update.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ jobs:
6060
- name: Enable auto-merge for pull request
6161
if: ${{ steps.cpr.outputs.pull-request-number }}
6262
run: |
63-
set -x
64-
gh repo set-default php-curl-class/php-curl-class
65-
gh repo set-default --view
6663
gh pr merge --auto --merge "${PR_URL}"
6764
env:
6865
PR_URL: ${{ steps.cpr.outputs.pull-request-url }}

0 commit comments

Comments
 (0)