From 3a27f31a0336f510322a81067398d09f8e6ed529 Mon Sep 17 00:00:00 2001 From: diced Date: Wed, 22 Mar 2023 19:41:06 -0700 Subject: [PATCH] feat(actions): auto-assign milestone --- .github/workflows/milestone.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/milestone.yml diff --git a/.github/workflows/milestone.yml b/.github/workflows/milestone.yml new file mode 100644 index 0000000..902bd60 --- /dev/null +++ b/.github/workflows/milestone.yml @@ -0,0 +1,24 @@ +name: 'Issue/PR Milestones' + +on: + pull_request: + types: [opened, reopened] + issues: + types: [opened, reopened] + +jobs: + set: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const milestone = 2 + github.issues.update({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + milestone + }) \ No newline at end of file