Skip to content

Commit ac0bd40

Browse files
committed
ci: add pr labeling
Signed-off-by: Charles Moore <[email protected]>
1 parent 37d3a65 commit ac0bd40

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/on_opened_pr.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: On Opened PR
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Record PR"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
get-pr-details:
14+
permissions:
15+
actions: read # download PR artifact
16+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
17+
uses: OpenJobDescription/.github/.github/workflows/reusable_extract_pr_details.yml@mainline
18+
with:
19+
record_pr_workflow_id: ${{ github.event.workflow_run.id }}
20+
artifact_name: "pr-info"
21+
workflow_origin: ${{ github.repository }}
22+
23+
label-pr:
24+
needs: get-pr-details
25+
if: ${{ needs.get-pr-details.outputs.pr_action == 'opened' || needs.get-pr-details.outputs.pr_action == 'reopened' }}
26+
uses: OpenJobDescription/.github/.github/workflows/reusable_label_pr.yml@mainline
27+
with:
28+
pr_number: ${{ needs.get-pr-details.outputs.pr_number }}
29+
label_name: "waiting-on-maintainers"
30+
permissions:
31+
pull-requests: write

.github/workflows/record_pr.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: Record PR
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
jobs:
8+
call-record-workflow:
9+
uses: OpenJobDescription/.github/.github/workflows/reusable_record_pr_details.yml@mainline

0 commit comments

Comments
 (0)