Skip to content

Commit

Permalink
chore: Add milestone action (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer authored Nov 5, 2024
1 parent 257250d commit 6a7f9bc
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/milestone.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Description:
# - Add milestone to a merged PR or closed issue.

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

# Fix GraphQL: Resource not accessible by integration (updatePullRequest)
permissions:
contents: write
pull-requests: write

jobs:
update-milestone:
runs-on: ubuntu-latest
name: Milestone Update
steps:
- name: Set Milestone for PR
uses: hustcer/milestone-action@main
if: github.event.pull_request.merged == true
with:
action: bind-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set Milestone for Issue
uses: hustcer/milestone-action@main
if: github.event.issue.state == 'closed'
with:
action: bind-issue
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6a7f9bc

Please sign in to comment.