Skip to content

fix: handle merged PR titles in release workflow#46

Merged
nic-6443 merged 2 commits into
mainfrom
fix-release-merge-title
May 19, 2026
Merged

fix: handle merged PR titles in release workflow#46
nic-6443 merged 2 commits into
mainfrom
fix-release-merge-title

Conversation

@jarvis9443
Copy link
Copy Markdown
Contributor

@jarvis9443 jarvis9443 commented May 19, 2026

Release failed after #45 merged because the push commit message became feat: release v0.1.0 (#45), while the workflow only accepted an exact feat: release vX.Y.Z[-prerelease] title.

This keeps the strict SemVer validation, but first strips the GitHub merge/squash (#number) suffix when present. It also adds a manual workflow_dispatch input so the release can be rerun after this workflow fix lands, without touching the rockspec again.

I verified these cases locally:

feat: release v0.1.0 (#45) -> v0.1.0 / 0.1.0
feat: release v0.1.0 -> v0.1.0 / 0.1.0
workflow_dispatch version=0.1.0 -> v0.1.0 / 0.1.0
workflow_dispatch version=v0.1.0-rc.10 -> v0.1.0-rc.10 / 0.1.0-rc.10

Invalid suffixes and unsafe version strings are still rejected. After this is merged, rerun the release with:

gh-jarvis workflow run release.yml --repo api7/lua-qjson --ref main -f version=0.1.0

Summary by CodeRabbit

  • New Features

    • Added a manual release trigger that accepts and validates a version input for releases.
  • Chores

    • Improved extraction and validation of release version information from commit messages, including handling of optional trailing references and prerelease tags.

Review Change Stack

Copilot AI review requested due to automatic review settings May 19, 2026 00:59
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d8944a1c-afad-4fcd-8473-1ef05a953ef2

📥 Commits

Reviewing files that changed from the base of the PR and between 6c11182 and 2f524e9.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The release workflow now adds a manual workflow_dispatch version input and updates the “Extract release name” step to validate/parse that input or, when absent, sanitize the HEAD commit title (removing a trailing (#<digits>)) before extracting version, version_without_v, and is_prerelease.

Changes

Release workflow updates

Layer / File(s) Summary
Add manual workflow_dispatch trigger
.github/workflows/release.yml
Adds a workflow_dispatch trigger with a required version input documenting the expected semver format for manual releases.
Extract release name parsing and validation
.github/workflows/release.yml
Updates the Bash extraction step to validate/parse inputs.version when supplied; otherwise, it extracts the HEAD commit title, strips an optional trailing (#<number>), and validates/extracts feat: release vX.Y.Z[-prerelease], emitting version, version_without_v, and is_prerelease.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • api7/lua-qjson#45: This PR also modifies .github/workflows/release.yml to extract and validate release versions from inputs or commit titles.
🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
E2e Test Quality Review ⚠️ Warning No E2E tests provided for release workflow changes. PR modifies critical automation with zero test coverage, only manual examples in PR description. Add bash test suite validating version parsing regex: test title stripping, version extraction, invalid format rejection, prerelease detection, and workflow_dispatch input handling.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly describes the main change: handling merged PR titles (with GitHub's merge suffix) in the release workflow by stripping the suffix before parsing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Check ✅ Passed No security vulnerabilities found. Token handling is secure with proper GitHub Actions secrets management, no credential leakage in logs, and best-practice configurations throughout.

✏️ 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-release-merge-title

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

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the release workflow which broke when PR #45 was squash-merged, because GitHub appended (#45) to the commit title and the strict regex no longer matched. The workflow now strips a trailing (#<number>) suffix before validating against the SemVer release-title regex.

Changes:

  • Strip GitHub merge/squash (#<number>) suffix from the commit title before validation.
  • Preserve existing strict SemVer validation of the release title.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nic-6443 nic-6443 merged commit 910411c into main May 19, 2026
7 checks passed
@nic-6443 nic-6443 deleted the fix-release-merge-title branch May 19, 2026 01:22
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.

3 participants