From 9d25b2f29ab178c7dd514b90fe4575156f6a7b60 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Wed, 16 Oct 2024 15:45:34 +0800 Subject: [PATCH] Add a workflow to set milestone for a merged PR automatically (#14084) # Description Add a workflow to set milestone for a merged PR automatically. A example action run log looks like: https://github.com/hustcer/milestone-action/actions/runs/11320750633/job/31478761283 [`hustcer/milestone-action`](https://github.com/hustcer/milestone-action) is a Github action powered by `nushell`, and still in active development, so I will use `main` branch for easily to try new changes --- .github/workflows/milestone.yml | 18 ++++++++++++++++++ 1 file changed, 18 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 0000000000..1897f2f617 --- /dev/null +++ b/.github/workflows/milestone.yml @@ -0,0 +1,18 @@ +# Description: +# - Update milestone of a merged PR + +name: Milestone Action +on: + pull_request_target: + types: [closed] + +jobs: + update-milestone: + runs-on: ubuntu-latest + name: Milestone Update + if: ${{github.event.pull_request.merged == true}} + steps: + - name: Set Milestone + uses: hustcer/milestone-action@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}