fix: simplify notify-downstream workflow - #3
Conversation
Remove broken commit message parsing that failed on subjects containing parentheses (e.g., merge commits with PR numbers). The bash regex matching in `MSG=$(git log -1 --pretty=%s)` would break when the subject contained unbalanced parens. Simplified to just dispatch the event with repo, sha, and actor. No checkout, no commit parsing. Also: - Skip wait-for-ci on forwarded dispatches - Upgrade peter-evans/repository-dispatch to v4 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
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)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThis PR simplifies the Key changes:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| .github/workflows/notify-downstream.yml | Removes broken bash commit-message parsing, adds repository_dispatch trigger for forwarded events, correctly skips wait-for-ci on non-push triggers, and simplifies the dispatch payload. One non-blocking concern: removed payload fields (repo_name, short_sha, message, type) may silently break downstream consumers if not coordinated. |
Sequence Diagram
sequenceDiagram
participant UP as Upstream Repo
participant MPP as meta_plugin_protocol
participant DS as Downstream Repos<br/>(meta_cli, meta_git_cli, etc.)
alt push to main
MPP->>MPP: wait-for-ci (lewagon/wait-on-check-action)
MPP->>DS: repository_dispatch(dependency-updated)<br/>payload: {repo, sha, actor}
else repository_dispatch(dependency-updated) received
UP->>MPP: repository_dispatch(dependency-updated)
Note over MPP: skip wait-for-ci (if: github.event_name == 'push')
MPP->>DS: repository_dispatch(dependency-updated)<br/>payload: {repo, sha (MPP HEAD), actor}
end
Prompt To Fix All With AI
This is a comment left during a code review.
Path: .github/workflows/notify-downstream.yml
Line: 42-47
Comment:
**Breaking payload change for downstream consumers**
The PR removes `repo_name`, `short_sha`, `message`, and `type` from the dispatched payload. If any downstream workflow (e.g. in `meta_cli`, `meta_git_cli`, `meta_project_cli`, or `meta_rust_cli`) currently references `github.event.client_payload.type`, `.message`, `.short_sha`, or `.repo_name`, those expressions will silently resolve to `null`/empty without any dispatch failure.
Before merging, confirm that none of the downstream repos' `repository_dispatch`-triggered workflows use these removed fields. If they do, those workflows should be updated in the same change or in a coordinated follow-up to avoid silent failures.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix: simplify notify-downstream workflow" | Re-trigger Greptile
| client-payload: >- | ||
| { | ||
| "repo": ${{ toJSON(github.repository) }}, | ||
| "repo_name": ${{ toJSON(github.event.repository.name) }}, | ||
| "sha": ${{ toJSON(steps.commit.outputs.sha) }}, | ||
| "short_sha": ${{ toJSON(steps.commit.outputs.short_sha) }}, | ||
| "message": ${{ toJSON(steps.commit.outputs.message) }}, | ||
| "type": ${{ toJSON(steps.commit.outputs.type) }}, | ||
| "sha": ${{ toJSON(github.sha) }}, | ||
| "actor": ${{ toJSON(github.actor) }} | ||
| } |
There was a problem hiding this comment.
Breaking payload change for downstream consumers
The PR removes repo_name, short_sha, message, and type from the dispatched payload. If any downstream workflow (e.g. in meta_cli, meta_git_cli, meta_project_cli, or meta_rust_cli) currently references github.event.client_payload.type, .message, .short_sha, or .repo_name, those expressions will silently resolve to null/empty without any dispatch failure.
Before merging, confirm that none of the downstream repos' repository_dispatch-triggered workflows use these removed fields. If they do, those workflows should be updated in the same change or in a coordinated follow-up to avoid silent failures.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/notify-downstream.yml
Line: 42-47
Comment:
**Breaking payload change for downstream consumers**
The PR removes `repo_name`, `short_sha`, `message`, and `type` from the dispatched payload. If any downstream workflow (e.g. in `meta_cli`, `meta_git_cli`, `meta_project_cli`, or `meta_rust_cli`) currently references `github.event.client_payload.type`, `.message`, `.short_sha`, or `.repo_name`, those expressions will silently resolve to `null`/empty without any dispatch failure.
Before merging, confirm that none of the downstream repos' `repository_dispatch`-triggered workflows use these removed fields. If they do, those workflows should be updated in the same change or in a coordinated follow-up to avoid silent failures.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Fixed — restored full payload, removed repository_dispatch trigger to prevent cascades, switched to heredoc output for safe commit message handling.
Add `!` to regex character class so `feat!:`, `fix(scope)!:` etc. are correctly categorized instead of falling through to "other". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
feat: thing (#4))Context
The old workflow used
MSG=$(git log -1 --pretty=%s)and bash regex matching to extract commit type. Commit subjects containing()(like GitHub merge commits with PR numbers) causedunexpected EOF while looking for matching ')'errors, breaking all downstream notifications.🤖 Generated with Claude Code