mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 04:31:08 +00:00
Updated review-bot to obtain number from event (#4271)
It seems that `review-trigger` is not uploading the artifact that is used by `review-bot`, so I changed the PR-Number to be obtained by the previous event that triggered this action. I also took the liberty to replace `tibdex/github-app-token` for `actions/create-github-app-token` which is GitHub's official app.
This commit is contained in:
@@ -45,7 +45,7 @@ jobs:
|
||||
|
||||
# We request them to review again
|
||||
echo $REVIEWERS | gh api --method POST repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers --input -
|
||||
|
||||
|
||||
echo "::error::Project needs to be reviewed again"
|
||||
exit 1
|
||||
env:
|
||||
@@ -53,21 +53,8 @@ jobs:
|
||||
- name: Comment requirements
|
||||
# If the previous step failed and github-actions hasn't commented yet we comment instructions
|
||||
if: failure() && !contains(fromJson(steps.comments.outputs.bodies), 'Review required! Latest push from author must always be reviewed')
|
||||
run: |
|
||||
run: |
|
||||
gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "Review required! Latest push from author must always be reviewed"
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
COMMENTS: ${{ steps.comments.outputs.users }}
|
||||
- name: Get PR number
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
run: |
|
||||
echo "Saving PR number: $PR_NUMBER"
|
||||
mkdir -p ./pr
|
||||
echo $PR_NUMBER > ./pr/pr_number
|
||||
- uses: actions/upload-artifact@v3
|
||||
name: Save PR number
|
||||
with:
|
||||
name: pr_number
|
||||
path: pr/
|
||||
retention-days: 5
|
||||
|
||||
Reference in New Issue
Block a user