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 option to exclude issues with certain labels #36

Closed
wants to merge 1 commit into from

Conversation

steven-sheehy
Copy link
Contributor

Add the ability to ignore issues or PRs with certain labels. This is useful in case a bug or enhancement is initially targeted to a milestone but is later closed as wontfix and the milestone isn't removed. Or if you don't want certain issues to show up even if they are in the milestone like chore tasks, questions, etc.

@wilkinsona
Copy link
Contributor

Thanks for the pull request, but I’m not sure that this change is necessary.

Or if you don't want certain issues to show up even if they are in the milestone like chore tasks, questions, etc.

An issue will only be included if it has a label that matches one of the configured sections. With no section for chores or questions, they won’t appear in the release notes.

This is useful in case a bug or enhancement is initially targeted to a milestone but is later closed as wontfix and the milestone isn't removed

This feels like an error in the issue labels and I’m not sure that the generator should try to cope with it. If the error was made the other way so that wontfix was in place when it should not be, such filtering would cause the issue to be missing from the release notes. I think that’s worse than accidental inclusion.

Have I misunderstood the intent of the proposed changes?

@snicoll
Copy link
Collaborator

snicoll commented Mar 10, 2020

@steven-sheehy we'd need some feedback on this one please.

@steven-sheehy
Copy link
Contributor Author

With no section for chores or questions, they won't appear in the release notes.

That highly depends on a project's GitHub templates and workflow. My project does not have a chore issue template so the issue will always be tagged with either bug or enhancement. And in my opinion this is entirely appropriate to have a chore also labeled as an enhancement. A chore is an enhancement that's just minor enough that you don't want to include it in the release notes.

Another possibility is if a project wants to have different release notes for different sub-modules in the same repo but with a common milestone, they could use labels with the module name to filter.

Point is, not everyone manages their project the same way and has different use cases.

This feels like an error in the issue labels and I'm not sure that the generator should try to cope with it.

I disagree otherwise I wouldn't have opened this PR. I inherited a project with a lot of issues marked as won't fix, duplicate, etc. and no release notes. I used this tool to retroactively generate release notes for past milestones. Cleaning these issues by hand would've been a lot more difficult and error prone than adding a line of yaml to ignore them.

If the error was made the other way so that wontfix was in place when it should not be

That's always a possibility, but as this is an opt-in feature with no default filtering we have to assume that users who want this functionality are managing their labels appropriately so things don't get excluded accidentally.

If in the future this tool is enhanced to generate releases notes from tags or commits (like gren), then it couldn't rely on the milestone being populated correctly.

philwebb pushed a commit that referenced this pull request Sep 24, 2020
Allow issues to be excluded from the changelog when they have a certain
label.

See gh-36
@philwebb philwebb closed this in 88e8472 Sep 24, 2020
@philwebb philwebb changed the title Add option to ignore issues with certain labels Add option to exclude issues with certain labels Sep 24, 2020
@philwebb philwebb added this to the 0.0.3 milestone Sep 24, 2020
@philwebb
Copy link
Collaborator

Thanks very much for the PR @steven-sheehy. This is in master with a minor tweak to the property name.

philwebb added a commit that referenced this pull request Sep 24, 2020
Rename `excludes` to `exclude`.

See gh-36
@steven-sheehy steven-sheehy deleted the ignored-labels branch March 4, 2023 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants