fix: include workflow-templates in release auto-pin updates#1826
fix: include workflow-templates in release auto-pin updates#1826marcusrbrown merged 1 commit intomainfrom
Conversation
When the root package @bfra.me/.github is released, update SHA pins in workflow-templates/ (renovate-changesets, renovate, update-repo-settings) to prevent Renovate from creating follow-up PRs that trigger recursive release cycles.
fro-bot
left a comment
There was a problem hiding this comment.
Verdict: PASS
Blocking issues
None
Non-blocking concerns
None
Missing tests
No tests exist for scripts/release.ts. The file is a release orchestration script with complex git/GitHub API interactions that would benefit from unit tests, particularly for the updateInternalWorkflowPins regex matching logic. Adding tests would help catch issues like pattern drift in future changes. However, this is pre-existing and not introduced by this PR.
Risk assessment: LOW
Rationale:
This is a well-scoped, targeted fix that adds workflow-templates to the existing auto-pin mechanism. The changes correctly address the recursive release loop described in PR #1825.
Code Review:
-
Pattern correctness verified: The regex patterns correctly match the
uses:lines in the three workflow templates:renovate-changesets.yaml→ matchesrenovate-changeset.yamlworkflow referencerenovate.yaml→ matchesrenovate.yamlworkflow referenceupdate-repo-settings.yaml→ matchesupdate-repo-settings.yamlworkflow reference
-
Version prefix is correct: The root package
@bfra.me/.githubuses semver versioning (e.g.,4.13.1), and workflow templates prefix withv(e.g.,# v4.13.0). TheversionPrefix: 'v'correctly produces the expected format. -
Mapping structure follows existing patterns: The new mapping entry follows the same
WorkflowPinMappinginterface used by existing mappings forrenovate-changesetsandupdate-repository-settingsactions. -
TypeScript type-check passes: No type errors introduced.
-
Logic integration: The
updateInternalWorkflowPinsfunction already iterates over allWORKFLOW_PIN_MAPPINGSentries, so the new mapping will automatically be included in the release pinning workflow without additional changes.
Verified in templates:
# workflow-templates/renovate-changesets.yaml:17
uses: bfra-me/.github/.github/workflows/renovate-changeset.yaml@d36ffbc... # v4.13.0
# workflow-templates/renovate.yaml:46
uses: bfra-me/.github/.github/workflows/renovate.yaml@d36ffbc... # v4.13.0
# workflow-templates/update-repo-settings.yaml:16
uses: bfra-me/.github/.github/workflows/update-repo-settings.yaml@d36ffbc... # v4.13.0All patterns match the actual uses: lines with SHA pins and version comments.
Run Summary
| Field | Value |
|---|---|
| Event | pull_request |
| Repository | bfra-me/.github |
| Run ID | 23293520050 |
| Cache | hit |
| Session | ses_2fa0fb445ffekXDymIVJKOxDsp |
Summary
Adds
workflow-templates/to the release script's auto-pin mappings, closing the recursive release loop seen in PR #1825.The cycle: root package released → Renovate updates
workflow-templates/*.yamlSHA pins → generates@bfra.me/.githubpatch changeset → triggers another release → repeat.Fix
Added
@bfra.me/.githubtoWORKFLOW_PIN_MAPPINGSwith three workflow template files:workflow-templates/renovate-changesets.yamlrenovate-changeset.yaml@SHA # vVERSIONworkflow-templates/renovate.yamlrenovate.yaml@SHA # vVERSIONworkflow-templates/update-repo-settings.yamlupdate-repo-settings.yaml@SHA # vVERSIONUses
versionPrefix: 'v'since workflow templates usev4.13.0format (vs0.2.26for actions).Now when any release runs, the auto-pin PR includes ALL internal references — both the action workflow files AND the workflow templates.