2024-10-16 07:45:34 +00:00
|
|
|
# Description:
|
2024-10-20 02:45:05 +00:00
|
|
|
# - Add milestone to a merged PR automatically
|
|
|
|
# - Add milestone to a closed issue that has a merged PR fix (if any)
|
2024-10-16 07:45:34 +00:00
|
|
|
|
|
|
|
name: Milestone Action
|
|
|
|
on:
|
2024-10-20 02:45:05 +00:00
|
|
|
issues:
|
|
|
|
types: [closed]
|
2024-10-16 07:45:34 +00:00
|
|
|
pull_request_target:
|
|
|
|
types: [closed]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update-milestone:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Milestone Update
|
|
|
|
steps:
|
2024-10-20 02:45:05 +00:00
|
|
|
- name: Set Milestone for PR
|
|
|
|
uses: hustcer/milestone-action@main
|
|
|
|
if: github.event.pull_request.merged == true
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
# Bind milestone to closed issue that has a merged PR fix
|
|
|
|
- name: Set Milestone for Issue
|
2024-10-16 07:45:34 +00:00
|
|
|
uses: hustcer/milestone-action@main
|
2024-10-20 02:45:05 +00:00
|
|
|
if: github.event.issue.state == 'closed'
|
|
|
|
with:
|
|
|
|
action: bind-issue
|
2024-10-16 07:45:34 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|