chore: restore notify-parent workflow (simplified) - #11
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA new GitHub Actions workflow file was added that automatically notifies the parent repository (harmony-labs/meta) whenever code is pushed to the main branch. The workflow dispatches a repository event containing the child repository name, commit SHA, and actor information. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 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 SummaryThis PR re-adds the Confidence Score: 5/5Safe to merge — the workflow is functionally correct and the only concern is a non-blocking naming inconsistency in the payload field. The change is small and focused: a single workflow file with straightforward logic. No files require special attention beyond the
|
| Filename | Overview |
|---|---|
| .github/workflows/notify-parent.yml | New workflow dispatches a child-repo-updated event to harmony-labs/meta on every push to main; logic is correct and toJSON quoting is properly applied, but the short_sha field name is misleading as github.sha is the full 40-char SHA. |
Sequence Diagram
sequenceDiagram
participant GH as GitHub Push (main)
participant W as notify-parent.yml
participant D as repository-dispatch action
participant P as harmony-labs/meta
GH->>W: on: push to main
W->>D: event-type=child-repo-updated<br/>payload={repo_name, short_sha, actor}
D->>P: POST dispatches API
P-->>P: Trigger release-please workflow
Prompt To Fix All With AI
This is a comment left during a code review.
Path: .github/workflows/notify-parent.yml
Line: 20
Comment:
**`short_sha` field contains full SHA**
`github.sha` is the full 40-character commit SHA, not a short SHA. The field is named `short_sha`, which is misleading and may confuse consumers in the parent workflow that expect a 7-8 character abbreviated SHA. If the parent workflow (`harmony-labs/meta#62`) actually reads this field and treats it as a short SHA (e.g. for display, comparison, or constructing a URL fragment), it will receive the full hash instead.
Consider either renaming the field to `sha` to match the actual value, or slicing the SHA in the expression:
```suggestion
"short_sha": ${{ toJSON(github.sha) }},
```
If a genuinely short SHA is desired, an alternative approach is to use a `run` step first and capture `${GITHUB_SHA:0:7}` into an output, then reference that output here — though for the purposes of release-please notification the full SHA is likely fine.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "chore: restore notify-parent workflow (s..." | Re-trigger Greptile
| client-payload: >- | ||
| { | ||
| "repo_name": ${{ toJSON(github.event.repository.name) }}, | ||
| "short_sha": ${{ toJSON(github.sha) }}, |
There was a problem hiding this comment.
short_sha field contains full SHA
github.sha is the full 40-character commit SHA, not a short SHA. The field is named short_sha, which is misleading and may confuse consumers in the parent workflow that expect a 7-8 character abbreviated SHA. If the parent workflow (harmony-labs/meta#62) actually reads this field and treats it as a short SHA (e.g. for display, comparison, or constructing a URL fragment), it will receive the full hash instead.
Consider either renaming the field to sha to match the actual value, or slicing the SHA in the expression:
| "short_sha": ${{ toJSON(github.sha) }}, | |
| "short_sha": ${{ toJSON(github.sha) }}, |
If a genuinely short SHA is desired, an alternative approach is to use a run step first and capture ${GITHUB_SHA:0:7} into an output, then reference that output here — though for the purposes of release-please notification the full SHA is likely fine.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/notify-parent.yml
Line: 20
Comment:
**`short_sha` field contains full SHA**
`github.sha` is the full 40-character commit SHA, not a short SHA. The field is named `short_sha`, which is misleading and may confuse consumers in the parent workflow that expect a 7-8 character abbreviated SHA. If the parent workflow (`harmony-labs/meta#62`) actually reads this field and treats it as a short SHA (e.g. for display, comparison, or constructing a URL fragment), it will receive the full hash instead.
Consider either renaming the field to `sha` to match the actual value, or slicing the SHA in the expression:
```suggestion
"short_sha": ${{ toJSON(github.sha) }},
```
If a genuinely short SHA is desired, an alternative approach is to use a `run` step first and capture `${GITHUB_SHA:0:7}` into an output, then reference that output here — though for the purposes of release-please notification the full SHA is likely fine.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Fixed — renamed short_sha to sha (sender sends full SHA, parent truncates to 7 chars), removed checkout step, added permissions: {} block.
06ff970 to
a8ffa22
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/notify-parent.yml:
- Line 14: Replace the mutable tag "peter-evans/repository-dispatch@v4" with the
specific commit SHA for the v4.0.1 release (use the SHA shown on the action's
releases page) and add a short comment noting the action name and release
version (e.g., "# pinned to peter-evans/repository-dispatch v4.0.1
<commit-sha>") so the workflow uses an immutable, pinned reference instead of
`@v4`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: e5dfa206-8977-49df-964f-e11c4d39e2af
📒 Files selected for processing (1)
.github/workflows/notify-parent.yml
Re-adds notify-parent.yml to trigger parent meta repo's release-please when this child repo merges to main. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a8ffa22 to
82ce7c8
Compare
Re-adds
notify-parent.ymlto trigger parent meta repo's release-please when this child repo merges to main.Simplified: no checkout needed, all payload fields properly quoted with toJSON. Companion to gitkb/meta#62.
🤖 Generated with Claude Code
Summary by CodeRabbit