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

Prioritize "bug" label for changelog sections #16433

Merged
merged 1 commit into from
Feb 28, 2025
Merged

Conversation

dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Feb 28, 2025

Summary

This PR updates the ordering of changelog sections to prioritize bug label such that any PRs that has that label is categorized in "Bug fixes" section in when generating the changelog irrespective of any other labels present on the PR.

I think this works because I've seen PRs with both server and bug in the "Server" section instead of the "Bug fixes" section. For example, #16262 in https://github.com/astral-sh/ruff/releases/tag/0.9.7.

On that note, this also changes the ordering such that any PR with both server and bug labels are in the "Bug fixes" section instead of the "Server" section. This is in line with how "Formatter" is done. I think it makes sense to instead prefix the entries with "Formatter:" and "Server:" if they're bug fixes. But, I'm happy to change this such that any PRs with formatter and server labels are always in their own section irrespective of other labels.

@dhruvmanila dhruvmanila added the internal An internal refactor or improvement label Feb 28, 2025
Comment on lines 120 to 124
changelog_sections.fixes = "Rule changes"
changelog_sections.formatter = "Formatter"
changelog_sections.isort = "Rule changes"
changelog_sections.performance = "Performance"
changelog_sections.formatter = "Formatter"
changelog_sections.server = "Server"
Copy link
Member Author

Choose a reason for hiding this comment

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

This change is just to group the "Rule changes" section

@@ -113,17 +113,17 @@ changelog_ignore_labels = ["internal", "ci", "red-knot", "testing"]

changelog_sections.breaking = "Breaking changes"
changelog_sections.preview = "Preview features"
changelog_sections.bug = "Bug fixes"
Copy link
Member

Choose a reason for hiding this comment

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

Do I understand this correctly that an issue labeled with both bug and preview would still be categorized as preview (which I think is the correct behavior)

Site note: Sort of funny that we rely on the ordering of elements in a TOML table -- which is not specified.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's correct.

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Thanks

@dhruvmanila
Copy link
Member Author

(I cancelled the build workflow as the changes are not going to affect them.)

@dhruvmanila dhruvmanila merged commit af62f79 into main Feb 28, 2025
23 of 39 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/changelog-label branch February 28, 2025 08:47
dcreager added a commit that referenced this pull request Feb 28, 2025
* main:
  [red-knot] Switch to a handwritten parser for mdtest error assertions (#16422)
  [red-knot] Disallow more invalid type expressions (#16427)
  Bump version to Ruff 0.9.9 (#16434)
  Check `LinterSettings::preview` for version-related syntax errors (#16429)
  Avoid caching files with unsupported syntax errors (#16425)
  Prioritize "bug" label for changelog sections (#16433)
  [`flake8-copyright`] Add links to applicable options (`CPY001`) (#16421)
  Fix string-length limit in documentation for PYI054 (#16432)
  Show version-related syntax errors in the playground (#16419)
  Allow passing `ParseOptions` to inline tests (#16357)
  Bump version to 0.9.8 (#16414)
  [red-knot] Ignore surrounding whitespace when looking for `<!-- snapshot-diagnostics -->` directives in mdtests (#16380)
  Notify users for invalid client settings (#16361)
  Avoid indexing the project if `configurationPreference` is `editorOnly` (#16381)
dcreager added a commit that referenced this pull request Feb 28, 2025
* dcreager/alist-type:
  Remove unneeded shear override
  Update property test CI
  Move alist into red_knot_python_semantic
  [red-knot] Switch to a handwritten parser for mdtest error assertions (#16422)
  [red-knot] Disallow more invalid type expressions (#16427)
  Bump version to Ruff 0.9.9 (#16434)
  Check `LinterSettings::preview` for version-related syntax errors (#16429)
  Avoid caching files with unsupported syntax errors (#16425)
  Prioritize "bug" label for changelog sections (#16433)
  [`flake8-copyright`] Add links to applicable options (`CPY001`) (#16421)
  Fix string-length limit in documentation for PYI054 (#16432)
  Show version-related syntax errors in the playground (#16419)
  Allow passing `ParseOptions` to inline tests (#16357)
  Bump version to 0.9.8 (#16414)
  [red-knot] Ignore surrounding whitespace when looking for `<!-- snapshot-diagnostics -->` directives in mdtests (#16380)
  Notify users for invalid client settings (#16361)
  Avoid indexing the project if `configurationPreference` is `editorOnly` (#16381)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants