ci: auto-update bundle manifests on same-repo PRs#3169
Conversation
Update the PR bundle validation workflow to automatically regenerate and push bundle manifests when they are out of sync, using the rhdh-bot identity so the push triggers CI. For security, the auto-commit only runs on same-repo PRs (not forks). It is best-effort — if the push fails, the workflow falls through to the existing error message guiding manual remediation. Assisted-by: Claude
This reverts commit 7ac0c4d.
PR Summary by Qodoci: auto-update bundle manifests on same-repo PRs
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
Context used✅ Cross-repo context Not relevant to this PR:
redhat-developer/rhdh Not relevant to this PR:
redhat-developer/rhdh-plugins 1.
|
…le-manifests-on-pr
If git push fails, the local commit leaves the working tree clean, causing the subsequent validation step to incorrectly report success. Reset the commit on push failure so the diff stays dirty, and gate the success path on the pushed output instead of re-checking git diff. Assisted-by: Claude
|
/agentic_review |
Avoid persisting the bot token during checkout where PR-controlled code (make bundles) could access it. Instead, use persist-credentials: false and inject the token only in the push step via a scoped env var and just-in-time git remote set-url. Assisted-by: Claude
|
Code review by qodo was updated up to the latest commit 919999b |
git reset --hard discards the regenerated files, leaving git diff empty in the failure step. Use --mixed instead so the commit is undone but the changed files remain in the working tree for diagnostic output. Assisted-by: Claude
Assigning github.head_ref to an environment variable avoids injecting user-controlled data directly into the run block. Assisted-by: Claude
…le-manifests-on-pr
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit cb1d96c |
Exit early with a warning if RHDH_BOT_TOKEN or HEAD_REF is missing. The autopush output remains unset, so the subsequent step still correctly fails the workflow and reports the outdated bundle manifests. Assisted-by: Claude
|
/agentic_review |
|
|
Code review by qodo was updated up to the latest commit 2c4f22b |



Description
Update the PR bundle validation workflow to automatically regenerate and push bundle manifests when they are out of sync. For security, the auto-commit only runs on same-repo PRs (not forks), since fork PR events don't have access to repo secrets.
The auto-commit is best-effort. If the push fails, the workflow falls through to the existing error message guiding manual remediation.
Which issue(s) does this PR fix or relate to
—
This might be helpful for tagRelease PRs like #3164
PR acceptance criteria
How to test changes / Special notes to the reviewer