Skip to content

Commit 24bdc34

Browse files
authored
Merge branch 'main' into 7oSkaaa-patch-1
2 parents 1b24640 + 034a19b commit 24bdc34

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

.github/workflows/PR.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Auto Approve and Merge PR
1+
name: Auto Comment on PR
22

33
on:
44
pull_request:
@@ -8,7 +8,7 @@ on:
88
- reopened
99

1010
jobs:
11-
auto_approve_merge:
11+
auto_comment:
1212
runs-on: ubuntu-latest
1313

1414
steps:
@@ -34,24 +34,18 @@ jobs:
3434
| jq -r '.[].status')
3535
echo "Check statuses: $check_statuses"
3636
if [[ ! "$check_statuses" =~ "failure" ]]; then
37-
echo "All checks passed. Approving and merging PR."
37+
echo "All checks passed. Commenting on the PR."
3838
echo "::set-output name=approved::true"
3939
else
40-
echo "Some checks failed. Not approving PR."
40+
echo "Some checks failed. Not commenting on the PR."
4141
echo "::set-output name=approved::false"
4242
fi
4343
44-
- name: Approve and Merge PR
44+
- name: Comment on PR
4545
if: steps.checks.outputs.approved == 'true'
4646
run: |
4747
curl -X POST \
4848
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
4949
-H "Content-Type: application/json" \
50-
-d '{"event": "APPROVE"}' \
51-
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/reviews"
52-
curl -X PUT \
53-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
54-
-H "Content-Type: application/json" \
55-
-d '{"merge_method": "merge"}' \
56-
"https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/merge"
57-
50+
-d '{"body": "All checks passed. Ready for review and merge."}' \
51+
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments"

0 commit comments

Comments
 (0)