fix(workflows): prevent release-please infinite loop on main branch#470
Conversation
- add commit-message guard to skip release-please on bot merges - update workflow architecture docs to reflect bot-skip behavior Closes #422 🐛 - Generated by Copilot
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #470 +/- ##
==========================================
- Coverage 83.43% 83.40% -0.03%
==========================================
Files 20 20
Lines 3507 3507
==========================================
- Hits 2926 2925 -1
- Misses 581 582 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Prevents release-please from re-triggering itself on main by skipping the Release Please job when the push commit message matches the release-please merge commit prefix, and updates workflow architecture documentation to reflect the new guard.
Changes:
- Add a job-level
ifguard torelease-pleasein themain.ymlworkflow to avoid the bot-trigger loop. - Update the workflows architecture doc with a Mermaid highlight and an explanation of the guard behavior.
- Revise the “Main Branch Jobs” table to note the conditional skip behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/main.yml |
Adds an if condition to skip Release Please on chore(main): release... commits to break the loop. |
docs/architecture/workflows.md |
Documents the guard and updates the main-branch workflow diagram/table accordingly. |
- add event_name != 'push' guard to avoid null head_commit on workflow_dispatch - reword docs to describe commit-message-based skip, not bot detection 🔧 - Generated by Copilot
- colon in 'chore(main): release' breaks unquoted YAML parsing - restores double-quoting required for mapping-value safety 🔒 - Generated by Copilot
WilliamBerryiii
left a comment
There was a problem hiding this comment.
Addressing security scan findings:\n\n1. Syntax error (code-scanning/18) — Fixed in 712fad7 by restoring double quotes around the if expression. The unquoted : in chore(main): release broke YAML parsing.\n\n2. Expression always true (code-scanning/17) — Same root cause. The YAML parser truncated the expression at the colon, producing a fragment that trivially evaluated to true. The double-quoting fix resolves both alerts.\n\n3. Original reviewer comments (copilot-pull-request-reviewer) — Both addressed in 444c145: added event_name != 'push' guard and aligned doc wording to describe commit-message-based behavior rather than bot detection.
🔧 - Generated by Copilot
🤖 I have created a release *beep* *boop* --- ## [2.3.0](hve-core-v2.2.0...hve-core-v2.3.0) (2026-02-13) ### ✨ Features * **agents:** add GitHub backlog management pipeline ([#448](#448)) ([2b4d123](2b4d123)) * **docs:** define inactivity closure policies for issues and PRs ([#452](#452)) ([5e710fd](5e710fd)) * **extension:** implement collection-based plugin distribution system ([#439](#439)) ([3156d98](3156d98)) * **instructions:** replace EVEN/ODD hardcoding with runtime milestone discovery protocol ([#486](#486)) ([ae95eb2](ae95eb2)) * **plugin:** support Copilot CLI plugin generation from collection manifests ([#496](#496)) ([e6cee85](e6cee85)) * **scripts:** enhance on-create.sh to install actionlint and PowerShell modules ([#500](#500)) ([67585f5](67585f5)) ### 🐛 Bug Fixes * **docs:** replace broken relative link with inline code reference ([#465](#465)) ([8133b36](8133b36)) * **instructions:** prevent local-only paths from leaking into GitHub issues ([#489](#489)) ([497d2fe](497d2fe)) * **workflows:** prevent release-please infinite loop on main branch ([#470](#470)) ([134bdd6](134bdd6)) * **workflows:** remove release-please skip guard that prevents tag creation ([#511](#511)) ([5e53271](5e53271)) ### 📚 Documentation * **agents:** add GitHub Backlog Manager documentation and agent catalog ([#503](#503)) ([5e818ce](5e818ce)) * align CONTRIBUTING.md with docs/contributing/ guides ([#445](#445)) ([73ef6aa](73ef6aa)) ### ♻️ Refactoring * **scripts:** refactor dev-tools and lib scripts to use CIHelpers module ([#482](#482)) ([fdf9145](fdf9145)) * **scripts:** standardize PowerShell entry point guard pattern ([#477](#477)) ([6b84a8e](6b84a8e)) ### 🔧 Maintenance * **config:** standardize action mappings in artifact-retention.yml ([#487](#487)) ([7927db2](7927db2)) * **deps-dev:** bump cspell from 9.6.2 to 9.6.4 in the npm-dependencies group ([#461](#461)) ([c788095](c788095)) * **deps:** bump actions/setup-python from 5.1.1 to 6.2.0 in the github-actions group ([#462](#462)) ([69ef3c9](69ef3c9)) * **security:** add SBOM artifact retention policy ([#479](#479)) ([8031557](8031557)), closes [#453](#453) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: hve-core-release-please[bot] <254602402+hve-core-release-please[bot]@users.noreply.github.com>
Description
Adds a one-line
ifguard to the Release Please job in the main workflow to prevent an infinite loop. When release-please merges its own PR, the resultingchore(main): releasecommit triggers the workflow again, which runs release-please again, creating an endless cycle. The guard skips the Release Please job when the triggering commit message starts withchore(main): release.ifcondition to Release Please job in.github/workflows/main.ymlto skip bot commitsdocs/architecture/workflows.mdwith Mermaid highlight, explanatory paragraph, and table revisionRelated Issue(s)
Closes #422
Type of Change
Select all that apply:
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
prompt-builderagent and addressed all feedback.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md).github/skills/*/SKILL.md)Other:
.ps1,.sh,.py)Testing
All repository validation checks pass:
npm run lint:yaml— YAML linting passednpm run lint:md— Markdown linting passednpm run lint:frontmatter— Frontmatter validation passednpm run format:tables— Table formatting verifiedChecklist
Required Checks
Required Automated Checks
The following validation commands must pass before merging:
npm run lint:mdnpm run spell-checknpm run lint:frontmatternpm run lint:md-linksnpm run lint:psSecurity Considerations
Additional Notes
ifexpression requires double-quoting in YAML because the commit prefixchore(main): releasecontains a colon character${{ !startsWith(...) }}to ensure correct evaluation in GitHub Actions🔧 - Generated by Copilot