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

Group Changelog items by feature #33229

Draft
wants to merge 6 commits into
base: trunk
Choose a base branch
from

Conversation

@getdave
Copy link
Contributor

@getdave getdave commented Jul 6, 2021

Description

Currently when facilitating a release of the Plugin, the release lead must manually assign each PR to "feature" and then organise into those features.

This is not a good task for humans as it takes a lot of time. This puts an undue burden on the release lead.

This PR attempts to automated this process. It does this by:

  • Taking each PR in a section (eg: Experiments, Bug fixes...etc).
  • Determining the most appropriate "feature" for that PR.
  • Sorting by most PRs in the feature.
  • Printing out each feature along with PRs in a nested list structure (as has been common in the most recent releases).

The heuristic to determine the "feature" is very basic:

  • If the PR has a [Feature] label then use that feature name.
  • If the PR has a [Block] XXX label then use Block Library as the feature name.
  • Otherwise use an arbitrary map of labels to "feature" to determine the most appropriate feature based on the number of occurrences of the particular feature label.

Obviously the hardcoded map of labels => features is far from complete but that's simple enough and can be augmented over time. The goal of this PR is a stepping stone towards the optimal solution.

This is part of addressing #30538

How has this been tested?

If you want you can target a particular milestone using the format:

npm run changelog -- --milestone="Gutenberg 11.0"

Github has rate limits on the API so I suggest grabbing your Github developer token from https://github.com/settings/tokens and passing that in the --token arg:

npm run changelog -- --milestone="Gutenberg 11.0" --token=YOUR_TOKEN

Screenshots

Types of changes

New feature (non-breaking change which adds functionality)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).
@getdave getdave self-assigned this Jul 6, 2021
@gziolo gziolo requested review from priethor and gziolo Jul 6, 2021
'[Feature] UI Components': 'Components',
'[Feature] Component System': 'Components',
'[Package] Block Library': 'Block Library',
'[Feature] Blocks': 'Block Library',

This comment has been minimized.

@talldan

talldan Jul 8, 2021
Contributor

Might be good to get clarification on this. '[Feature] Blocks' might be more Block API or something like that than Block Library.

Copy link
Contributor

@priethor priethor left a comment

I've check recent changelogs for more label mappings and here are a few more direct ones, I would say ordered by precedence:

  • 'REST API Interaction': 'REST API'
  • '[Package] Icons': 'Icons'
  • '[Feature] Design Tools': 'Design Tools'
  • '[Feature] Template Editing Mode': 'Template Editor'
  • '[Package] Edit Post": 'Post Editor'

These others would have precedence in the mappings:

  • '[Feature] Component System': Components
  • '[Package] Components: 'Components'

And these others usually are bundled together under "Block Editor" if they don't fit anywhere else (or, if the same label appears a lot in a single release, it might make sense to separate them on their own section in that release):

  • '[Feature] Inserter': 'Block Editor'
  • '[Package] Rich text': 'Block Editor'
  • '[Feature] Drag and Drop': 'Block Editor'
  • '[Feature] Block Multi Selection': 'Block Editor'
  • '[Feature] Link Editing': 'Block Editor'
bin/plugin/commands/changelog.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants