From 41a15087f4124525d2e0248d176cc79b7ed1927c Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Thu, 17 Aug 2023 13:23:37 -0700 Subject: [PATCH] Use label-check and attach-next-milestone-action (#492) --- .github/workflows/label-check.yml | 19 +++++++++++++++++++ .github/workflows/milestone-merged-prs.yml | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/label-check.yml create mode 100644 .github/workflows/milestone-merged-prs.yml diff --git a/.github/workflows/label-check.yml b/.github/workflows/label-check.yml new file mode 100644 index 00000000..a0e2e5c0 --- /dev/null +++ b/.github/workflows/label-check.yml @@ -0,0 +1,19 @@ +name: Labels + +on: + pull_request: + types: + - opened + - labeled + - unlabeled + +env: + LABELS: ${{ join( github.event.pull_request.labels.*.name, ' ' ) }} + +jobs: + check-type-label: + name: ensure type label + runs-on: ubuntu-latest + steps: + - if: "contains( env.LABELS, 'type: ' ) == false" + run: exit 1 diff --git a/.github/workflows/milestone-merged-prs.yml b/.github/workflows/milestone-merged-prs.yml new file mode 100644 index 00000000..71ae037c --- /dev/null +++ b/.github/workflows/milestone-merged-prs.yml @@ -0,0 +1,18 @@ +name: Milestone + +on: + pull_request_target: + types: + - closed + branches: + - "main" + +jobs: + milestone_pr: + name: attach to PR + runs-on: ubuntu-latest + steps: + - uses: scientific-python/attach-next-milestone-action@bc07be829f693829263e57d5e8489f4e57d3d420 + with: + token: ${{ secrets.MILESTONE_LABELER_TOKEN }} + force: true