From 98d10634e5809887efaf167c39564efc273feb1b Mon Sep 17 00:00:00 2001 From: Charles Moore <122481442+moorec-aws@users.noreply.github.com> Date: Mon, 11 Aug 2025 10:32:44 -0500 Subject: [PATCH] ci: add pr labeling Signed-off-by: Charles Moore <122481442+moorec-aws@users.noreply.github.com> --- .github/workflows/on_opened_pr.yml | 31 ++++++++++++++++++++++++++++++ .github/workflows/record_pr.yml | 9 +++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/on_opened_pr.yml create mode 100644 .github/workflows/record_pr.yml diff --git a/.github/workflows/on_opened_pr.yml b/.github/workflows/on_opened_pr.yml new file mode 100644 index 00000000..f885466e --- /dev/null +++ b/.github/workflows/on_opened_pr.yml @@ -0,0 +1,31 @@ +name: On Opened PR + +on: + workflow_run: + workflows: ["Record PR"] + types: + - completed + +permissions: + contents: read + +jobs: + get-pr-details: + permissions: + actions: read # download PR artifact + if: ${{ github.event.workflow_run.conclusion == 'success' }} + uses: OpenJobDescription/.github/.github/workflows/reusable_extract_pr_details.yml@mainline + with: + record_pr_workflow_id: ${{ github.event.workflow_run.id }} + artifact_name: "pr-info" + workflow_origin: ${{ github.repository }} + + label-pr: + needs: get-pr-details + if: ${{ needs.get-pr-details.outputs.pr_action == 'opened' || needs.get-pr-details.outputs.pr_action == 'reopened' }} + uses: OpenJobDescription/.github/.github/workflows/reusable_label_pr.yml@mainline + with: + pr_number: ${{ needs.get-pr-details.outputs.pr_number }} + label_name: "waiting-on-maintainers" + permissions: + pull-requests: write \ No newline at end of file diff --git a/.github/workflows/record_pr.yml b/.github/workflows/record_pr.yml new file mode 100644 index 00000000..ef7d84b4 --- /dev/null +++ b/.github/workflows/record_pr.yml @@ -0,0 +1,9 @@ +name: Record PR + +on: + pull_request: + types: [opened, reopened] + +jobs: + call-record-workflow: + uses: OpenJobDescription/.github/.github/workflows/reusable_record_pr_details.yml@mainline \ No newline at end of file