fix(ci): store regex in variables to fix notify-parent parse error - #7
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. WalkthroughAdds a write_output helper and branches to propagate event payload or commit-derived fields into GITHUB_OUTPUT; centralizes output formatting, pre-declares regex variables for message-type classification, and replaces inline echoes with write_output in the notify-parent workflow. (50 words) Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 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 fixes a bash parsing error that caused the Changes:
Technical correctness:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| .github/workflows/notify-parent.yml | Stores regex patterns in variables to fix bash parse error with character class [:(] |
Last reviewed commit: 4336db7
eec2b7f to
a6117f3
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:
- Around line 43-49: The write_output() helper currently uses a fixed delimiter
"__EOF__" when appending to GITHUB_OUTPUT, which can collide with payloads;
change write_output() to generate a unique delimiter per invocation (e.g., UUID,
random hex, or timestamp) and use that delimiter in the three printf calls so
the boundary is guaranteed unique before appending to GITHUB_OUTPUT; update
references to the delimiter inside write_output() (the printf lines that emit
the start marker and closing marker) to use the generated variable instead of
"__EOF__".
Bash interprets `(` in `[:(]` character classes as an unmatched subshell opener, causing "unexpected EOF while looking for matching ')'" (exit code 2). Storing the regex in a variable avoids this because bash passes variable content directly to the regex engine without shell parsing. Resolves [[incidents/notify-parent-broken]] Implements [[tasks/meta-64]] Co-authored-by: Claude <claude@anthropic.com>
a6117f3 to
e9ff61f
Compare
Summary
[[ =~ ]]tests(in[:(]character class was interpreted as unmatched subshell openerunexpected EOF while looking for matching ')'(exit code 2)Root cause
Context
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit