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 2026/10/22 17:06:16 UTC

(maven-gh-actions-shared) branch main updated: Document PR Automation on push (#362)

This is an automated email from the ASF dual-hosted git repository.

slawekjaranowski pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git


The following commit(s) were added to refs/heads/main by this push:
     new 57fbf95  Document PR Automation on push (#362)
57fbf95 is described below

commit 57fbf952dd24cf706aeb5960465866bc39d9b33d
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Thu Oct 22 19:06:09 2026 +0200

    Document PR Automation on push (#362)
    
    * Document PR Automation on push
    
    Co-Authored-By: Claude Opus 5.5 <no...@anthropic.com>
    
    * Correct when PR Signal dumps the GitHub context in README
    
    Co-Authored-By: Claude Opus 5.5 <no...@anthropic.com>
    
    ---------
    
    Co-authored-by: Claude Opus 5.5 <no...@anthropic.com>
---
 README.md | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index f71eaa3..7478c55 100644
--- a/README.md
+++ b/README.md
@@ -311,9 +311,9 @@ with content:
 
 name: PR Automation
 on:
-  pull_request_target:
-    types:
-      - closed
+  push:
+    branches:
+      - master
 
 jobs:
   pr-automation:
@@ -322,15 +322,24 @@ jobs:
 
 ```
 
-We need to use the `pull_request_target` event because we need `GITHUB_TOKEN` with write permission
-to update labels and milestones of PRs from forked repositories.
+From November 2026 the `pull_request_target` event is disabled for ASF repositories,
+see [ASF GitHub Actions Policy](https://infra.apache.org/github-actions-policy.html).
+PR Automation is therefore triggered by `push` to the branch the PR was merged into,
+the merged PR is found by the pushed commit.
+
+The workflow is taken from the pushed branch, so it must be present on each branch PRs are merged into,
+with that branch in the `branches` list.
 
 After the PR got merged each of the following actions are checked and applied if not already set:
 - current milestone will be set unless PR has `skip-changelog` label
 - will be assigned to person who merged PR
+- a comment is added and the workflow fails when PR has no label
+
+When PR has `skip-changelog` label
+- current milestone will be removed if was set
 
-After the PR got closed without merge or has `skip-changelog` label
--  current milestone will be removed if was set
+A PR closed without merge produces no push, so its milestone is not removed.
+A PR merged with `[ci skip]` in the commit message is not processed either.
 
 ## milestone configuration
 
@@ -450,7 +459,7 @@ In ASF repositories workflows of PRs from external contributors must be approved
 so `PR Check` is not run and the commit status is not reported until the `PR Signal` workflow is approved.
 
 The check is run again after editing the PR description or pushing new commits,
-or by re-running the `PR Check` run. A re-run of `PR Signal` also dumps the GitHub context to help investigate problems.
+or by re-running the `PR Check` run. A re-run of `PR Signal` with debug logging enabled also dumps the GitHub context to help investigate problems.
 
 ## Jobs