fix(ci): correct RC tag regex in promote-release workflow#328
Conversation
The promote-release workflow's tag validation regex rejected valid RC tags like v1.3.0-rc.4 because it expected the format v*.*.*-rc* without a dot separator. Updated the regex to require the dot (rc\.[0-9]+) and fixed the input description example to match.
✅ Deploy Preview for devsydev canceled.
|
📝 WalkthroughWalkthroughThe promote-release GitHub Actions workflow is updated to enforce stricter RC tag formatting. The ChangesRC tag format validation
🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/promote-release.yml:
- Around line 33-34: Update the validation error message that references RC_TAG
so it matches the stricter regex used in the check (the grep on RC_TAG). Replace
the vague text "expected v*.*.*-rc*" with an explicit format such as "expected
v<major>.<minor>.<patch>-rc.<number>" so the error message clearly documents the
required tag format checked by the line using grep -qE
'^v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$'.
🪄 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: CHILL
Plan: Pro
Run ID: 71ff13cc-7a8c-41e1-8ed6-39f16eb73727
📒 Files selected for processing (1)
.github/workflows/promote-release.yml
| if ! echo "$RC_TAG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$'; then | ||
| echo "::error::Invalid RC tag format: $RC_TAG (expected v*.*.*-rc*)" |
There was a problem hiding this comment.
Update the validation error message to match the new regex format.
Line 34 still says expected v*.*.*-rc*, but Line 33 now requires -rc.<number>. Please make the error explicit (for example: expected v<major>.<minor>.<patch>-rc.<number>).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/promote-release.yml around lines 33 - 34, Update the
validation error message that references RC_TAG so it matches the stricter regex
used in the check (the grep on RC_TAG). Replace the vague text "expected
v*.*.*-rc*" with an explicit format such as "expected
v<major>.<minor>.<patch>-rc.<number>" so the error message clearly documents the
required tag format checked by the line using grep -qE
'^v[0-9]+\.[0-9]+\.[0-9]+-rc\.[0-9]+$'.
Summary
Summary by CodeRabbit
v1.3.0-rc.1).