-
Notifications
You must be signed in to change notification settings - Fork 0
chore: restore notify-parent workflow (simplified) #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: Notify Parent Repo | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| notify: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| - name: Notify parent repo | ||
| # PARENT_REPO_PAT requires `repo` scope (or fine-grained `contents:write`) | ||
| # on harmony-labs/meta. Configure in Settings → Secrets → Actions. | ||
| uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4 | ||
| with: | ||
| token: ${{ secrets.PARENT_REPO_PAT }} | ||
| repository: harmony-labs/meta | ||
| event-type: child-repo-updated | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| client-payload: >- | ||
| { | ||
| "repo_name": ${{ toJSON(github.event.repository.name) }}, | ||
| "sha": ${{ toJSON(github.sha) }}, | ||
| "actor": ${{ toJSON(github.actor) }} | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 868
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 51
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 184
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 163
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 239
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 793
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 51
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 127
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 51
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 51
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 235
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 316
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 50382
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 51
🏁 Script executed:
# Check if there's any GitHub organization-level config ls -la .github/Repository: harmony-labs/meta_git_cli
Length of output: 235
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 163
🏁 Script executed:
Repository: harmony-labs/meta_git_cli
Length of output: 51
Align trigger with intent: only notify on merged PRs, not all pushes to main.
Commit message states this should trigger "when this child repo merges to main", but the current
pushtrigger fires on every push, including direct pushes if branch protection allows them. This risks unintended parent release notifications.🔧 Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in af351ea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 1347
🏁 Script executed:
Length of output: 1057
@mateodelnorte, it looks like commitaf351eamade some improvements (removed the checkout step and fixedtoJSONquoting), but thepushtrigger is still in place — the file currently reads:The suggested change to scope it to merged PRs only (using
pull_request: types: [closed]withif: github.event.pull_request.merged == true) wasn't applied. If you'd like to address this concern, here's the fix:Note that with the
pull_requesttrigger,github.shaandgithub.event.repository.namestill work, butgithub.event.pull_request.merge_commit_shagives you the actual merge commit SHA which is more precise for the merged PR case.If you intentionally want to keep the
pushtrigger (e.g., because direct pushes tomainshould also notify the parent), please let me know and I'll dismiss this comment.There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 1090
@mateodelnorte, confirmed —permissions: {}, thesharename, and the removed checkout step are all in place. Thanks for those improvements!However, the original concern is still present: the trigger remains
pushonmain(Lines 3–5), not scoped to merged PRs only. If direct pushes tomainare prevented by branch protection, this is functionally equivalent — but if branch protection is not enforced, direct pushes would also fire the parent notification.Could you confirm whether this is intentional (relying on branch protection to guarantee only merges reach
main)? If so, I'm happy to mark this resolved.