gnodet opened a new pull request, #25275: URL: https://github.com/apache/camel/pull/25275
## Summary Addresses [CAMEL-23932](https://issues.apache.org/jira/browse/CAMEL-23932) — AI agents push branches directly to `apache/camel` and fail to clean them up after PRs are merged or closed. ### Changes 1. **Expanded `pr-cleanup-branches.yml`**: The workflow now deletes **any** non-protected branch pushed directly to `apache/camel` when its PR is merged or closed. Previously it only matched `automated/upgrade*`, leaving `backport/*`, `feature/*`, `fix/*`, `regen_bot_*`, `investigate-and-fix-*`, `dependabot/*`, `dependency/*`, `ci/*`, and ad-hoc AI agent branches to accumulate indefinitely. Protected patterns excluded from cleanup: - `main` - `camel-*.x` (all maintenance branches like `camel-4.14.x`, `camel-4.18.x`) 2. **Strengthened CLAUDE.md/AGENTS.md**: Changed fork-preference from advisory "should prefer" to mandatory "MUST use". Also upgraded branch deletion from "should be deleted" to "MUST be deleted", with a note that the workflow handles it automatically for upstream branches. ### Stale branches found during investigation These branches exist on `apache/camel` with their PRs already merged or closed: | Branch | PR | State | |--------|-----|-------| | `backport/25036-to-camel-4.14.x` | #25068 | MERGED | | `backport/25036-to-camel-4.18.x` | #25067 | MERGED | | `feature/CAMEL-24259-tui-tabs-and-inline-docs` | #25114 | MERGED | | `regen_bot_sbom` | #25115 | MERGED | | `regen_bot_3x` | #12263 | MERGED (2023!) | | `fix-camel-24227-add-volatile-to-jmx-writable-fiel` | #24985 | MERGED | | `fix/CAMEL-24140` | #24820 | MERGED | | `investigate-and-fix-flaky-aws-eventbridge-localsta` | #25148 | CLOSED | These will need to be deleted manually (the workflow only triggers on future PR close events). ## Test plan - [ ] Verify YAML syntax is valid (workflow passes `actionlint` or GitHub Actions validation) - [ ] Merge or close a test PR from a non-protected branch on `apache/camel` and verify the branch is auto-deleted - [ ] Verify that `main` and `camel-*.x` branches are never affected - [ ] Review the AGENTS.md language change for clarity _Claude Code on behalf of gnodet_ 🤖 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]
