You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2025/06/09 19:50:08 UTC
(maven-gh-actions-shared) branch v4 updated: Remove the milestone from not merged PR or labeled with skip-changelog
This is an automated email from the ASF dual-hosted git repository.
sjaranowski pushed a commit to branch v4
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git
The following commit(s) were added to refs/heads/v4 by this push:
new 421e156 Remove the milestone from not merged PR or labeled with skip-changelog
421e156 is described below
commit 421e156bdf729acbf496748d405b1d08657dd035
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sat Jun 7 21:40:54 2025 +0200
Remove the milestone from not merged PR or labeled with skip-changelog
---
.github/workflows/pr-automation.yml | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/.github/workflows/pr-automation.yml b/.github/workflows/pr-automation.yml
index 54bc7db..1f1b0b9 100644
--- a/.github/workflows/pr-automation.yml
+++ b/.github/workflows/pr-automation.yml
@@ -97,6 +97,32 @@ jobs:
console.log(result);
+ # check PR milestone - remove for not merged PR or with skip-changelog label
+ milestone-rm:
+ permissions:
+ issues: write
+ pull-requests: write
+
+ if: >
+ github.event.action == 'closed' &&
+ (!github.event.pull_request.merged || contains(github.event.pull_request.labels.*.name, 'skip-changelog')) &&
+ github.event.pull_request.milestone
+ runs-on: ubuntu-latest
+ steps:
+ - name: Remove milestone
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
+ with:
+ script: |
+
+ const result = await github.rest.issues.update({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: context.issue.number,
+ milestone: null
+ });
+
+ console.log(result);
+
# check PR labels - if is empty list add one default
labels:
permissions: