gnodet opened a new pull request, #26093:
URL: https://github.com/apache/camel/pull/26093

   ## What
   
   Add `etc/scripts/regen-push.sh` — a standalone script that automatically 
pushes "Regen" commits to PR branches when CI detects uncommitted generated 
file changes.
   
   Update `pr-test-commenter.yml` to inform contributors that a bot will 
auto-push the regen fix when maintainer edits are allowed, with manual 
instructions as fallback.
   
   ## How it works
   
   1. ETag-polls the GitHub Events API (free on 304 — no API quota consumed 
when idle)
   2. When activity is detected, queries the Artifacts API for `regen-patch` 
artifacts
   3. For each artifact: verifies the PR is still open, SHA matches (not 
stale), and `maintainerCanModify=true`
   4. Downloads the patch, shallow-clones the PR branch (works for both 
same-repo and fork PRs), applies the patch, commits "Regen", pushes
   5. Tracks pushed run IDs in a state file to avoid re-pushing
   
   ## Requirements
   
   - `gh` CLI authenticated with a maintainer PAT (repo scope)
   - `python3` (for JSON parsing)
   - `curl` (for ETag polling)
   
   ## Usage
   
   ```bash
   # One-shot check
   ./etc/scripts/regen-push.sh
   
   # Dry run (shows what would be pushed)
   ./etc/scripts/regen-push.sh --dry-run --verbose
   
   # As a cron job (every 5 minutes)
   */5 * * * * /path/to/regen-push.sh --repo apache/camel
   ```
   
   ## Commenter update
   
   The PR comment posted by `pr-test-commenter.yml` now mentions that a bot 
will auto-push the fix when *Allow edits from maintainers* is enabled, with 
manual instructions as fallback.


-- 
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