File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 4040 run : |
4141 user="${{ github.actor }}"
4242 repo="${{ github.repository }}"
43- status=$(curl -s -o /dev/null -w '%{http_code}' \
43+ status=$(curl -L - s -o /dev/null -w '%{http_code}' \
4444 -H "Authorization: Bearer $GITHUB_TOKEN" \
4545 -H "Accept: application/vnd.github+json" \
4646 "https://api.github.com/repos/$repo/collaborators/$user")
5353 env :
5454 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5555
56+
5657 - name : Create Pull Request if necessary
58+ id : create-pr
5759 uses : peter-evans/create-pull-request@v7
5860 with :
5961 branch : auto-cleanup
6365 delete-branch : true
6466 token : ${{ secrets.AUTO_PR_TOKEN }}
6567 push-to-fork : ${{ vars.AUTO_PR_FORK_NAME != '' && vars.AUTO_PR_FORK_NAME || secrets.AUTO_PR_FORK_NAME }}
66- reviewers : ${{ steps.check-collaborator.outputs.reviewer }}
68+ # reviewers: ${{ steps.check-collaborator.outputs.reviewer }}
69+
70+ - name : set reviewer
71+ if : ${{ steps.check-collaborator.outputs.reviewer != '' }}
72+ run : |
73+ user="${{ github.actor }}"
74+ repo="${{ github.repository }}"
75+ curl -L \
76+ -X POST \
77+ -H "Authorization: Bearer $GITHUB_TOKEN" \
78+ -H "Accept: application/vnd.github+json" \
79+ -H "X-GitHub-Api-Version: 2022-11-28" \
80+ https://api.github.com/repos/$repo/pulls/${{steps.create-pr.outputs.pull-request-number}}/requested_reviewers \
81+ -d '{"reviewers":["${{ steps.check-collaborator.outputs.reviewer }}"]}'
82+
You can’t perform that action at this time.
0 commit comments