fix(ci): always create sync commit for child repo updates - #35
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 WalkthroughUnified payload handling in the GitHub Actions workflow by extracting inputs into environment variables, introduced a Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Greptile SummaryRemoves the Key changes:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| .github/workflows/on-child-update.yml | Removed feat/fix gate - all child repo merges now create sync commits in parent repo |
| tests/worktree.bats | Updated tests to use remove command instead of destroy, added test for destroy alias compatibility |
| tests/worktree_cloud.bats | Updated tests to use remove command, updated test names and help text assertions |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Child Repo Merge] --> B[Trigger on-child-update.yml]
B --> C[Extract Payload]
C --> D{Before: Check Type}
D -->|feat or fix| E[Create Sync Commit]
D -->|other types| F[Skip - No Commit]
B2[After This PR] --> C2[Extract Payload]
C2 --> E2[Always Create Sync Commit]
E2 --> G[Push to Parent Main]
G --> H[Release-Please Processes All Commits]
H --> I{Commit Type?}
I -->|feat or fix| J[Include in Changelog/Release]
I -->|other types| K[Track But Don't Release]
style D fill:#ffcccc
style F fill:#ffcccc
style E2 fill:#ccffcc
style J fill:#ccffcc
style K fill:#ffffcc
Last reviewed commit: db5a49a
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/worktree_cloud.bats (1)
295-318:⚠️ Potential issue | 🟡 MinorStale comment at line 307.
The comment
# Destroyshould be updated to# Removeto match the renamed command.📝 Proposed fix
# Verify entry exists python3 -c " import json with open('$STORE') as f: data = json.load(f) assert any(v['name'] == 'store-rm' for v in data['worktrees'].values()) " - # Destroy + # Remove run "$META_BIN" git worktree remove store-rm🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/worktree_cloud.bats` around lines 295 - 318, Update the stale inline comment in the test "worktree remove removes from centralized store": change the comment above the command invocation of "$META_BIN" git worktree remove store-rm from "# Destroy" to "# Remove" so the comment matches the renamed remove command and clarifies intent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@tests/worktree_cloud.bats`:
- Around line 295-318: Update the stale inline comment in the test "worktree
remove removes from centralized store": change the comment above the command
invocation of "$META_BIN" git worktree remove store-rm from "# Destroy" to "#
Remove" so the comment matches the renamed remove command and clarifies intent.
c5e4cb4 to
2096614
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/on-child-update.yml:
- Around line 42-70: The current writes to $GITHUB_OUTPUT using echo
"key=$VALUE" are unsafe for multiline or untrusted values (e.g., commit
messages); update the "Extract payload" step to use GitHub Actions multiline
output syntax for each output (repo_name, short_sha, message, type, actor):
instead of echo "key=$VAR" >> $GITHUB_OUTPUT, write a delimiter line like
"key<<EOF" to $GITHUB_OUTPUT, then write the raw $VAR content on the next
line(s) and close with "EOF" to ensure values with newlines or special
characters are preserved and cannot inject extra keys; apply this change for
both the repository_dispatch branch (DISPATCH_*) and the workflow_dispatch
branch (INPUT_*) writes.
2096614 to
9e38d04
Compare
There was a problem hiding this comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In @.github/workflows/on-child-update.yml:
- Around line 44-69: Replace the unsafe single-line appends to $GITHUB_OUTPUT
(e.g., echo "repo_name=$DISPATCH_REPO_NAME" >> $GITHUB_OUTPUT) with the
multiline-safe heredoc style that protects against newlines and output
injection: for each key (repo_name, short_sha, message, type, actor) write the
key line with a delimiter then append the variable value and the closing
delimiter into $GITHUB_OUTPUT (for example echo "repo_name<<EOF" >>
$GITHUB_OUTPUT; echo "$DISPATCH_REPO_NAME" >> $GITHUB_OUTPUT; echo "EOF" >>
$GITHUB_OUTPUT), doing this for both the DISPATCH_* and INPUT_* branches in the
run block so multiline commit messages and untrusted input are safely written.
9e38d04 to
3749c54
Compare
Remove the feat/fix gate from on-child-update.yml — all child repo
merges now create sync commits in the parent. Release-please still only
includes feat/fix in changelogs, so the release PR remains curated.
Also hardens both workflows against command injection by moving all
${{ }} expressions into env: blocks, and fixes a stale "Destroy"
comment in worktree_cloud.bats.
Implements [[tasks/meta-64]]
Co-authored-by: Claude <claude@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3749c54 to
0ff8306
Compare
Summary
feat/fixgate fromon-child-update.yml— all child repo merges now create sync commits in the parentfeat/fixin changelogs, so the release PR remains curatedTest plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Tests