slawekjaranowski opened a new pull request, #326:
URL: https://github.com/apache/maven-gh-actions-shared/pull/326

   New reusable workflow `pr-check.yml`, grouping the checks run against a pull 
request.
   It starts with a single job, `license-declaration`; further checks can be 
added as
   separate jobs later.
   
   ### What the job does
   
   Verifies that the pull request description contains at least one **checked** 
Apache
   license declaration:
   
   - declaration missing — one comment is added and the check fails
   - description fixed — the comment is hidden as outdated and the check passes
   - declaration removed again — the same comment is restored, never a duplicate
   
   The comment is located by a hidden marker plus a bot author, so the job 
never posts
   a second one.
   
   The job is skipped for pull requests opened by bots (Dependabot, Renovate 
and other
   GitHub Apps) and for authors whose `author_association` is `OWNER` or 
`MEMBER` of the
   organization owning the repository. A skipped job is reported as successful, 
so it does
   not block required checks.
   
   Known limitation: private members of the organization may be reported as 
`COLLABORATOR`
   and will be checked. `COLLABORATOR` is intentionally not exempt.
   
   ### Usage in a consuming repository
   
   ```yaml
   name: PR check
   
   on:
     pull_request_target:
       types: [opened, edited, reopened, synchronize]
   
   jobs:
     pr-check:
       uses: apache/maven-gh-actions-shared/.github/workflows/pr-check.yml@v5
       permissions:
         pull-requests: write
         issues: write
   ```
   
   `pull_request_target` is used so that the job can comment on pull requests 
coming from
   forks, where `pull_request` grants only a read-only token. It is safe here 
because the
   workflow never checks out or executes any code from the pull request — it 
only reads the
   description through the API and manages its own comment.
   
   ### Rollout
   
   The job matches the declarations from the new pull request template, so it 
has to be used
   together with it — see #165. Both will be introduced gradually, repository 
by repository,
   rather than enabled everywhere at once.
   
   ### Not included
   
   Documentation — to be added to `README.md` on the `main` branch separately.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to