Skip to content
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

Add message about label usage in automated changelog #7881

Closed

Conversation

kmartens27
Copy link
Contributor

This PR is to add a message in the changelog styleguide Labels section, to inform readers and users that labels are necessary for the automated changelog generator to properly create the changelog. If labels are not included, the changelog generator does not recognize the pull request as part of the weekly release.

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

Why not just add a GitHub action to core requiring a label?

@kmartens27
Copy link
Contributor Author

@timja it's a good idea, I'm just looking to include this information since there have been some instances of labels not being applied and the changelog generator missing them. It looks like there is an existing action: https://github.com/actions/labeler that could be used, unless that wouldn't be an appropriate fit for one reason or another.

@MarkEWaite
Copy link
Contributor

It looks like there is an existing action: https://github.com/actions/labeler that could be used, unless that wouldn't be an appropriate fit for one reason or another.

I've been using the labeler action on at least one of my repositories and I'm not sure that it is any better than no labeling. When a changeset only includes tests, then the changeset is labeled correctly with the tests label. When a change is in production code, labeler does not know if it is a bug fix or an enhancement. When a change is in one of the documentation files or in an image file, it doesn't know if it is a bug fix or an enhancement. When a change is in the pom file, it doesn't know if it is a dependency update, an upgrade of the minimum Jenkins version, a transition to CD, or something entirely different.

@zbynek
Copy link
Contributor

zbynek commented Feb 14, 2025

For this issue it would be more useful to add a different action: https://github.com/marketplace/actions/require-labels . That way PRs with no lables either fail to build or get a comment.

@MarkEWaite
Copy link
Contributor

For this issue it would be more useful to add a different action: https://github.com/marketplace/actions/require-labels . That way PRs with no lables either fail to build or get a comment.

But doesn't that create a barrier to new contributors and others who do not have permission to assign a label?

@timja
Copy link
Member

timja commented Feb 15, 2025

For this issue it would be more useful to add a different action: github.com/marketplace/actions/require-labels . That way PRs with no lables either fail to build or get a comment.

But doesn't that create a barrier to new contributors and others who do not have permission to assign a label?

Anyone can assign a label via comment-ops. It doesn't add a barrier to them anyway, it stops the core team accidentally merging a PR thats missing a label.

@MarkEWaite
Copy link
Contributor

But doesn't that create a barrier to new contributors and others who do not have permission to assign a label?

Anyone can assign a label via comment-ops. It doesn't add a barrier to them anyway, it stops the core team accidentally merging a PR that's missing a label.

So long as we describe how to add labels with comment-ops, that should be fine, though I suspect new contributors will find it a little frustrating that their first build of a new pull request will fail because they could not assign a label when creating the pull request. It seems awkward to fail a pull request build immediately for a missing label that the submitter could not create.

Will comment ops work from the initial pull request description? If so, then we could offer comments in the pull request template that recommends they choose one of the labels with comment-ops while creating the pull request.

@zbynek
Copy link
Contributor

zbynek commented Feb 15, 2025

It can be also configured to post a comment and not fail the build, if that would be more useful.

@timja
Copy link
Member

timja commented Feb 15, 2025

It can be also configured to post a comment and not fail the build, if that would be more useful.

i think fail it, the PR template can be updated to show people how to do it when opening the PR so it doesn't fail initially

@timja
Copy link
Member

timja commented Feb 15, 2025

Will comment ops work from the initial pull request description? If so, then we could offer comments in the pull request template that recommends they choose one of the labels with comment-ops while creating the pull request.

yes it does

@timja
Copy link
Member

timja commented Feb 15, 2025

Draft PR open here: jenkinsci/jenkins#10273

@timja
Copy link
Member

timja commented Feb 15, 2025

Will comment ops work from the initial pull request description? If so, then we could offer comments in the pull request template that recommends they choose one of the labels with comment-ops while creating the pull request.

yes it does

I thought it did but apparently not, feature added now: timja/github-comment-ops#399

@timja
Copy link
Member

timja commented Feb 16, 2025

All working, tested in jenkinsci/jenkins#10277, jenkinsci/jenkins#10278

Potential areas for improvement would be to improve the docs (changelog template, comment added in GitHub action) on when to classify it as each and when skip-changelog should be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog Jenkins changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants