Migration from Milestone-based to Tag-based Release Notes #1728
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migrate Release Notes Generation from Milestone-based to Tag-based Approach
Overview
This PR updates the
notes.mjsscript to use git tag comparison instead of GitHub milestones for collecting Pull Requests in release notes generation. This aligns with the approach already used inpr-feed.mjsand provides more accurate PR detection based on actual git history.What Changed
Before (Milestone-based)
pr-feed.mjsAfter (Tag-based)
pr-feed.mjsapproachFiles Changed
New Files
docs/.vuepress/pr-utils.mjs- Shared utility functions for bothnotes.mjsandpr-feed.mjsfetchPRsBetweenTags()- Compare two git tags to find all PRsextractPRSection()- Extract specific sections from PR bodiescleanPRTitle()- Remove RUN-XXXX prefixesparseSaasCutTag()- Parse SaaS cut tag formatgetPreviousVersion()- Auto-decrement version numbersModified Files
docs/.vuepress/notes.mjs- Now uses tag-based comparison and shared utilities--from-versionargument for custom version rangespr-utils.mjsdocs/.vuepress/pr-feed.mjs- Refactored to use shared utilitiespr-utils.mjspackage.json- Added new npm scriptnotes:draftfor generating draft release notesREADME.md- Comprehensive documentation updatesrelease-notes/include)PR-FEED-README.md- Added shared utilities documentationnotes.mjsKey Benefits
Version Auto-Detection
The script automatically decrements the version to find the previous release:
5.17.05.16.05.17.15.17.05.0.04.17.0Override with
--from-versionfor custom ranges.New Usage
Basic Usage (recommended)
Direct Script Usage
Testing
Tested by comparing output from tag-based approach with the existing version-5.17.0.md:
Results
Test Commands Used
# Generate draft and compare npm run notes:draft -- --milestone=5.17.0 diff docs/history/5_x/draft.md docs/history/5_x/version-5.17.0.mdBreaking Changes
The script no longer uses GitHub milestones.
--milestoneargument is still required but now represents the target version (not a GitHub milestone name)Graceful Handling
Tag Not Found Behavior
Draft Mode (
--draft):HEADfor previewFinal Mode:
Repository-Specific Tag Handling
docs,ansible-plugin) are gracefully skipped with warningsEnvironment Requirements
Requires
.envfile with GitHub token:Token needs access to:
rundeck/rundeck(public)rundeckpro/rundeckpro(private)rundeck/docs(public)rundeck-plugins/ansible-plugin(public)rundeckpro/sidecar(private)Documentation Updates
Typical Workflow (Updated)
Backward Compatibility Note
The npm scripts remain the same -
npm run notesstill works. The underlying implementation now uses tags instead of milestones, providing better accuracy without changing the user interface.Related Issues
Resolves issues with:
notes.mjsandpr-feed.mjs