summaryrefslogtreecommitdiff
path: root/.github/workflows/milestone.yml
blob: 25d8edaa0e39ec6b1b81647fecb694fd93f25c7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Description:
#   - Add milestone to a merged PR automatically
#   - Add milestone to a closed issue that has a merged PR fix (if any)

name: Milestone Action
on:
  issues:
    types: [closed]
  pull_request_target:
    types: [closed]

jobs:
  update-milestone:
    runs-on: namespace-profile-ghostty-sm
    name: Milestone Update
    steps:
      - name: Set Milestone for PR
        uses: hustcer/milestone-action@bff2091b54a91cf1491564659c554742b285442f # v2.11
        if: github.event.pull_request.merged == true
        with:
          action: bind-pr # `bind-pr` is the default action
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      # Bind milestone to closed issue that has a merged PR fix
      - name: Set Milestone for Issue
        uses: hustcer/milestone-action@bff2091b54a91cf1491564659c554742b285442f # v2.11
        if: github.event.issue.state == 'closed'
        with:
          action: bind-issue
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}