woocommerce/.github/workflows/milestoned.yml

27 lines
769 B
YAML
Raw Normal View History

name: Milestone Manager
on:
pull_request_target:
types: [milestoned]
permissions: {}
jobs:
remove-milestone-from-unmerged-prs:
name: "Remove Milestone from Unmerged PRs"
if: github.event.pull_request.merged != true
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
milestone: null,
});