Skip to content

feat: add includeLabels option to release-notes #4089

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jackfrancis
Copy link

What type of PR is this?

/kind feature

What this PR does / why we need it:

For monorepo github repositories in the Kubernetes ecosystem that share a common master/main branch, we need a way to differentiate commits in order to use release-notes in a fully automated way.

This PR introduces a user-configurable labels filter that can be used to instruct release-notes "only include commits that originate from PRs w/ one of these labels" in the generated output.

In particular, this would enable SIG Autoscaling to leverage release-notes for the variety of projects under a common repository (e.g., Cluster Autoscaler, Vertical Pod Autoscaling).

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

feat: add includeLabels option to release-notes

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority labels Aug 13, 2025
@k8s-ci-robot k8s-ci-robot added area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 13, 2025
@jackfrancis jackfrancis force-pushed the release-notes-includeLabels branch from 30d814a to 5327a67 Compare August 13, 2025 23:27
Copy link

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 14, 2025
@jackfrancis
Copy link
Author

/assign @puerco

Let me know if this isn't code complete for adding a new release-notes config flag, this is my first PR against this project!

(Also if there's anything additional I should do to advocate for new feature inclusion, happy to...)

Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! Some very nitty comments to match the style with other things, but otherwise LGTM!

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 22, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jackfrancis, mboersma
Once this PR has been reviewed and has the lgtm label, please ask for approval from puerco. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jackfrancis jackfrancis force-pushed the release-notes-includeLabels branch from 5327a67 to 9dc037d Compare August 22, 2025 16:53
@jackfrancis
Copy link
Author

@xmudrii Thanks for the review!

Tested a local build and it's doing what we want in the kubernetes/autoscaling project:

$ ./release-notes --org kubernetes --repo autoscaler --branch master --repo-path /Users/jackfrancis/go/src/k8s.io/autoscaler/ --start-sha 1959f5f61f6c4b818e668bd52fcd160c0d751fe4 --end-sha b8f910fdf446fba86a4d13991b99749faa764089 --markdown-links true --output notes.md --list-v2 --dependencies=false
WARN No subcommand specified, running "generate"  
INFO Using output format: markdown                
INFO Gathering release notes                      
WARN EXPERIMENTAL IMPLEMENTATION ListReleaseNotesV2 ENABLED 
INFO will stop at 8e7d62b26ef82317ad23b59ead574b4ed0a9e259 
INFO processing release notes for 83 commits      
83 / 83 [--------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 20 p/s
INFO Finished gathering release notes in 4.976721166s 
INFO Got 29 release notes, performing rendering   
INFO Release notes written to file: notes.md      
$ ./release-notes --org kubernetes --repo autoscaler --branch master --repo-path /Users/jackfrancis/go/src/k8s.io/autoscaler/ --start-sha 1959f5f61f6c4b818e668bd52fcd160c0d751fe4 --end-sha b8f910fdf446fba86a4d13991b99749faa764089 --markdown-links true --output notes.md --list-v2 --dependencies=false --include-labels "area/cluster-autoscaler"
WARN No subcommand specified, running "generate"  
INFO Using output format: markdown                
INFO Gathering release notes                      
WARN EXPERIMENTAL IMPLEMENTATION ListReleaseNotesV2 ENABLED 
INFO will stop at 8e7d62b26ef82317ad23b59ead574b4ed0a9e259 
INFO processing release notes for 83 commits      
83 / 83 [--------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 21 p/s
INFO Finished gathering release notes in 4.4499535s 
INFO Got 16 release notes, performing rendering   
INFO Release notes written to file: notes.md 

First example is without the --include-labels filter (29 results), second example has it (16 results).

FYI @towca @omerap12 @adrianmoisey @elmiko this will help us to better automate releases across CAS/VPA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants