You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/09/03 14:14:44 UTC

[PR] chore(ci): add regen-push bot script and update commenter message [camel]

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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore(ci): add regen-push bot script and update commenter message [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26093:
URL: https://github.com/apache/camel/pull/26093#issuecomment-5528225519

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `etc`
   
   ---
   
   <details><summary>:microscope: Scalpel shadow comparison — Scalpel: 1 tested, 0 compile-only — current: 0 all tested</summary>
   
   [Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **1 affected modules** (current approach: 0).
   
   <details><summary>:warning: Modules only in Scalpel (1)</summary>
   
   - `camel-etc`
   
   </details>
   
   **Skip-tests mode would test 1 modules** (1 direct + 0 downstream), **skip tests for 0** (generated code, meta-modules)
   
   <details><summary>Modules Scalpel would test (1)</summary>
   
   - `camel-etc`
   
   </details>
   
   > :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/33770647052)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore(ci): add regen-push bot script and update commenter message [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26093:
URL: https://github.com/apache/camel/pull/26093#issuecomment-5527648616

   <!-- regen-patch -->
   ### :warning: Generated files are out of date
   
   The [CI build](https://github.com/apache/camel/actions/runs/33765706712) regenerated files that are not committed on this PR.
   The missing changes are available as the `regen-patch` artifact of that run.
   
   Anyone with push access to this branch (the PR author, or a committer when
   *Allow edits from maintainers* is enabled) can apply and push them:
   
   ```bash
   gh pr checkout 26093 --repo apache/camel
   gh run download 33765706712 --repo apache/camel -n regen-patch
   git apply --index regen.patch && rm regen.patch pr-number
   git commit -m "Regen" && git push
   ```
   
   Alternatively, run `./etc/scripts/regen.sh` locally and commit the resulting changes.
   If the patch does not apply cleanly, update the branch from the base branch first —
   the patch was generated against the merge with the base branch.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore(ci): add regen-push bot script and update commenter message [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26093:
URL: https://github.com/apache/camel/pull/26093#issuecomment-5527383077

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] chore(ci): add regen-push bot script and update commenter message [camel]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #26093:
URL: https://github.com/apache/camel/pull/26093


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org