File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 1
- name : Auto Approve and Merge PR
1
+ name : Auto Comment on PR
2
2
3
3
on :
4
4
pull_request :
8
8
- reopened
9
9
10
10
jobs :
11
- auto_approve_merge :
11
+ auto_comment :
12
12
runs-on : ubuntu-latest
13
13
14
14
steps :
@@ -34,24 +34,18 @@ jobs:
34
34
| jq -r '.[].status')
35
35
echo "Check statuses: $check_statuses"
36
36
if [[ ! "$check_statuses" =~ "failure" ]]; then
37
- echo "All checks passed. Approving and merging PR."
37
+ echo "All checks passed. Commenting on the PR."
38
38
echo "::set-output name=approved::true"
39
39
else
40
- echo "Some checks failed. Not approving PR."
40
+ echo "Some checks failed. Not commenting on the PR."
41
41
echo "::set-output name=approved::false"
42
42
fi
43
43
44
- - name : Approve and Merge PR
44
+ - name : Comment on PR
45
45
if : steps.checks.outputs.approved == 'true'
46
46
run : |
47
47
curl -X POST \
48
48
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
49
49
-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"
You can’t perform that action at this time.
0 commit comments