Skip to content

Commit 7e6f626

Browse files
committed
[ci skip] Make pr-review-status run through signal action
Approvals (and anything else running on a PR) runs on the fork (for some reason, even if the workflow itself is taken from the default branch?), whichs doesn't have access to secrets
1 parent 53cd8f0 commit 7e6f626

2 files changed

Lines changed: 27 additions & 6 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: PR Review Signal
2+
3+
on:
4+
pull_request_review:
5+
types:
6+
- submitted
7+
8+
permissions: {}
9+
10+
jobs:
11+
signal:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- run: echo "A PR review was submitted"

.github/workflows/pr_review_status.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
name: Update PR Project Status
22

33
on:
4-
pull_request_review:
4+
workflow_run:
5+
workflows:
6+
- PR Review Signal
57
types:
6-
- submitted
8+
- completed
9+
710
schedule:
811
- cron: "07 6 * * *"
912
workflow_dispatch:
1013

1114
jobs:
1215
review-submitted:
13-
if: github.event_name == 'pull_request_review' && github.event.review.state == 'approved'
16+
if: >
17+
github.event_name == 'workflow_run' &&
18+
github.event.workflow_run.event == 'pull_request_review' &&
19+
github.event.workflow_run.conclusion == 'success'
20+
1421
concurrency:
15-
group: pr-review-status-${{ github.event.pull_request.number }}
22+
group: pr-review-status-${{ github.event.workflow_run.head_sha }}
1623
cancel-in-progress: false
1724
runs-on: ubuntu-latest
1825
steps:
@@ -25,7 +32,7 @@ jobs:
2532
owner: "${{ github.repository_owner }}"
2633

2734
- name: Set status from approval
28-
uses: PaperMC/update-projects-action/review-status@v0.3.0
35+
uses: PaperMC/update-projects-action/review-status@v0.4.0
2936
with:
3037
github-token: "${{ steps.authenticate.outputs.token }}"
3138
mode: review
@@ -49,7 +56,7 @@ jobs:
4956
owner: "${{ github.repository_owner }}"
5057

5158
- name: Promote delayed approvals
52-
uses: PaperMC/update-projects-action/review-status@v0.3.0
59+
uses: PaperMC/update-projects-action/review-status@v0.4.0
5360
with:
5461
github-token: "${{ steps.authenticate.outputs.token }}"
5562
mode: promote

0 commit comments

Comments
 (0)