mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #23] [MERGED] fix(bump): preserve trailing newline in bumped caller files #32
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/23
Author: @mattmillerai
Created: 7/7/2026
Status: ✅ Merged
Merged: 7/7/2026
Merged by: @mattmillerai
Base:
main← Head:matt/fix-bump-trailing-newline📝 Commits (1)
07c116dfix(bump): preserve trailing newline in bumped caller files📊 Changes
1 file changed (+6 additions, -2 deletions)
View changed files
📝
.github/workflows/bump-cursor-review-callers.yml(+6 -2)📄 Description
ELI-5
When this repo updates the shared review workflow, a bot opens a "bump" PR in every consumer repo to point at the new version. That bot was accidentally chopping the final newline off the file it edited, and the consumer repos' code formatters insist every file end with a newline — so the bump PR's format check failed every time. This makes the bot put the newline back.
Root cause
bump-cursor-review-callers.ymlbuilds the new file contents through two command substitutions —OLD_CONTENT=$(… | base64 -d)andNEW_CONTENT=$(sed … )— and shell$(...)strips all trailing newlines. It then re-encodes withprintf '%s', which adds none back. Result: every bumped caller file is committed with no EOF newline.Receiver repos run
oxfmt --check(and others run prettier); both require a trailing newline, so the auto-opened bump PR failsformat:checkon the very file it just edited.Fix
One character:
printf '%s'→printf '%s\n'. Since the$(...)capture already collapsed any trailing newlines to zero, this restores exactly one — the formatter-clean state.Scope note
This fixes the newline-stripping class of failure (the one hitting oxfmt's EOF rule). A caller file that is non-conformant for an unrelated reason — e.g. a repo whose formatter prefers double-quoted
name:values — still needs a one-time reformat of its own caller file; the bump only rewrites the pinned SHA and never touches those lines. Both currently-open bump PRs have been corrected directly.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.