Skip to content

feat: Use Github graphql API to query issue closer #70

feat: Use Github graphql API to query issue closer

feat: Use Github graphql API to query issue closer #70

Workflow file for this run

# 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
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:
github-token: ${{ secrets.PAT }}
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
github-token: ${{ secrets.PAT }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}