forked from woocommerce/woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove milestone from unmerged PRs (woocommerce#41216)
* Remove milestone from unmerged PRs * Add pr write permission to milestone manager
- Loading branch information
1 parent
ab51a76
commit 0a11d03
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters