Skip to content

Commit 438d76a

Browse files
authored
chore: add set milestone action (#114)
See [#401 - Automatically set milestone at issues when closed](open-component-model/ocm-project#401) for more information. Now with reuse of central managed action. Co-authored-by: ocmbot[bot] <125909804+ocmbot[bot]@users.noreply.github.com>
1 parent d7843c2 commit 438d76a

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

.github/workflows/milestone.yaml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,15 @@ name: Set milestone
22
on:
33
issues:
44
types:
5-
- closed
5+
- closed
66
pull_request:
77
types:
8-
- closed
8+
- closed
9+
910
jobs:
1011
set_milestone:
11-
name: Set milestone
12-
runs-on: ubuntu-latest
12+
uses: open-component-model/.github/.github/workflows/milestone.yml@main
13+
secrets: inherit
1314
permissions:
1415
issues: write
15-
pull-requests: write
16-
steps:
17-
- name: Set milestone on issue
18-
if: github.event.issue.state_reason == 'completed'
19-
run: gh issue edit ${{ github.event.issue.number }} --milestone "$(date +"%Y-Q%q")" --repo ${{ github.repository }}
20-
env:
21-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22-
- name: Set milestone on pull request
23-
if: github.event.pull_request.merged == true
24-
run: gh pr edit ${{ github.event.pull_request.number }} --milestone "$(date +"%Y-Q%q")" --repo ${{ github.repository }}
25-
env:
26-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16+
pull-requests: write

0 commit comments

Comments
 (0)