diff --git a/.github/workflows/on_opened_pr.yml b/.github/workflows/on_opened_pr.yml new file mode 100644 index 0000000..f885466 --- /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 0000000..ef7d84b --- /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