-
Notifications
You must be signed in to change notification settings - Fork 736
Filetered hotfix prs from release notes #3738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the release notes generation script to exclude hotfix pull requests from the generated release notes.
- Adds the chalk dependency for console output styling
- Filters out PRs labeled as hotfix with an accompanying console log message
- Preserves the sorting and mapping of the PR data
prs => _.filter(prs, pr => { | ||
const isHotfix = pr.labels.some(label => label.name === 'hotfix'); | ||
if (isHotfix) { | ||
console.log(chalk.bgYellow.black(`PR ${pr.number} is a hotfix and was excluded for the release notes.`)); | ||
} | ||
return !isHotfix; | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider separating the logging from the filtering logic to better adhere to the single-responsibility principle; logging inside the filter function can lead to unexpected side effects if the collection is processed multiple times.
prs => _.filter(prs, pr => { | |
const isHotfix = pr.labels.some(label => label.name === 'hotfix'); | |
if (isHotfix) { | |
console.log(chalk.bgYellow.black(`PR ${pr.number} is a hotfix and was excluded for the release notes.`)); | |
} | |
return !isHotfix; | |
}), | |
prs => { | |
// Log hotfix PRs | |
prs.forEach(pr => { | |
if (pr.labels.some(label => label.name === 'hotfix')) { | |
console.log(chalk.bgYellow.black(`PR ${pr.number} is a hotfix and was excluded for the release notes.`)); | |
} | |
}); | |
// Filter out hotfix PRs | |
return _.filter(prs, pr => !pr.labels.some(label => label.name === 'hotfix')); | |
}, |
Copilot uses AI. Check for mistakes.
Description
Changed release notes generation script to ignore hot fixed prs.
Changed release notes generation so it will take hotfix prs when generating a patch release release notes.
Changelog
Infra - release notes generation script now excludes hot fixed prs.
Additional info
MADS-4718