Ignore nightly tags in release notes#55
Conversation
|
Warning Review limit reached
More reviews will be available in 43 minutes and 31 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe release workflow's prior-tag detection is now constrained to match semver tags in MAJOR.MINOR.PATCH format, replacing logic that considered any prior tag. A new test confirms the workflow reads the previous stable release tag correctly and generates release notes from that boundary. ChangesRelease Workflow Semver Constraint
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Pull request overview
This PR updates the GitHub release workflow to avoid using nightly-* tags as changelog boundaries when generating release notes, and adds a packaging unit test to lock the intended behavior in place.
Changes:
- Restrict
git describein the release workflow to consider only version-like tags when determining the previous tag for release notes. - Add a regression test ensuring the release workflow trigger remains limited to version tags and the release-notes boundary logic ignores nightlies.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/Unit/Packaging/ConfigurationPackagingTest.php |
Adds a unit test asserting the release workflow’s tag trigger and git describe usage for release note boundaries. |
.github/workflows/release.yml |
Updates release notes generation to find the previous version tag using git describe --match instead of potentially selecting nightly-*. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| set -euo pipefail | ||
| tag="${GITHUB_REF_NAME}" | ||
| previous_tag="$(git describe --tags --abbrev=0 "${tag}^" 2>/dev/null || true)" | ||
| previous_tag="$(git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*' "${tag}^" 2>/dev/null || true)" |
There was a problem hiding this comment.
Addressed in 9b4fd56: the previous-release lookup now also uses --exclude '*[!0-9.]*', so tags containing prerelease suffixes or other non-digit/dot characters are excluded from the changelog boundary.
| self::assertStringContainsString( | ||
| "git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*' \"\${tag}^\"", | ||
| $workflow, | ||
| ); |
There was a problem hiding this comment.
Addressed in 9b4fd56: the regression test now expects the --exclude '*[!0-9.]*' guard in addition to the version-like --match pattern.
Summary
Cause
After immutable nightly releases,
git describe --tags --abbrev=0 "${tag}^"can return anightly-*tag. That makes release notes show only changes since the latest nightly instead of the previous stable release. Existing notes also used real author names from%an; they should use handles.Existing releases
Updated the existing stable GitHub release descriptions for
0.1.0and0.1.1to use the new format. Nightly prerelease descriptions were left unchanged.Tests
make test tests/Unit/Packaging/ConfigurationPackagingTest.phpmake psalmmake composer-dependency-analyser