Skip to content

chore: restore notify-parent workflow (simplified) - #11

Merged
mateodelnorte merged 1 commit into
mainfrom
fix/restore-notify-parent
Mar 26, 2026
Merged

mateodelnorte merged 1 commit into
mainfrom
fix/restore-notify-parent

Conversation

@mateodelnorte

@mateodelnorte mateodelnorte commented Mar 26, 2026 •

Copy link
Copy Markdown
Contributor

Re-adds notify-parent.yml to 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

  • Chores
    • Added automated workflow to notify parent repository on main branch updates, enabling synchronization across repositories.

@coderabbitai

coderabbitai Bot commented Mar 26, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@mateodelnorte has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 30 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e3c044e6-f6e1-460c-8493-5a9d850c3dde

📥 Commits

Reviewing files that changed from the base of the PR and between a8ffa22 and 82ce7c8.

📒 Files selected for processing (1)
  • .github/workflows/notify-parent.yml

Walkthrough

A 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

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/notify-parent.yml
Added new workflow that triggers on main branch pushes and sends a child-repo-updated repository dispatch event to the parent repository with commit and actor metadata using the peter-evans/repository-dispatch action.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 A workflow takes flight, on pushes so bright,
To the parent repo, a dispatch in the night,
Child speaks to parent with news of the change,
Through GitHub's vast network, a notification exchange! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: restoring a GitHub Actions workflow file called notify-parent, with a note that it is simplified. This directly matches the changeset which adds the notify-parent.yml workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/restore-notify-parent

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented Mar 26, 2026

Copy link
Copy Markdown

Greptile Summary

This PR re-adds the notify-parent.yml workflow that fires a repository-dispatch event (child-repo-updated) to harmony-labs/meta whenever a commit lands on main, enabling the parent's release-please workflow to react to changes in this child repo.\n\nKey changes:\n- Adds .github/workflows/notify-parent.yml with a single-step peter-evans/repository-dispatch@v4 job\n- Uses toJSON() for all payload fields, correctly handling characters that would otherwise break the JSON string\n- Drops the earlier checkout step (PR description notes it was unnecessary)\n- Payload includes repo_name, short_sha, and actor fields\n\nIssues found:\n- The field short_sha carries github.sha which is the full 40-character SHA, not a short SHA. The name is misleading and could confuse maintainers or the consuming workflow in the parent repo.

Confidence Score: 5/5

Safe 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. toJSON() wrapping is correctly applied to all dynamic values, preventing JSON injection or quoting issues. The only issue found (P2) is the misleading short_sha field name containing the full SHA — this does not break functionality unless the parent workflow explicitly truncates or compares against a short SHA. All other aspects (trigger, action version, secret usage, repository target) look correct.

No files require special attention beyond the short_sha naming in .github/workflows/notify-parent.yml.

Important Files Changed

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
Loading
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

Comment thread .github/workflows/notify-parent.yml Outdated
client-payload: >-
{
"repo_name": ${{ toJSON(github.event.repository.name) }},
"short_sha": ${{ toJSON(github.sha) }},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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:

Suggested change
"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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — renamed short_sha to sha (sender sends full SHA, parent truncates to 7 chars), removed checkout step, added permissions: {} block.

@mateodelnorte
mateodelnorte force-pushed the fix/restore-notify-parent branch from 06ff970 to a8ffa22 Compare March 26, 2026 13:01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7521073 and a8ffa22.

📒 Files selected for processing (1)
  • .github/workflows/notify-parent.yml

Comment thread .github/workflows/notify-parent.yml Outdated
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>
@mateodelnorte
mateodelnorte force-pushed the fix/restore-notify-parent branch from a8ffa22 to 82ce7c8 Compare March 26, 2026 13:21
@mateodelnorte
mateodelnorte merged commit af972c7 into main Mar 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant