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

Refactor changelog for the new release process #2660

Merged
merged 6 commits into from
Nov 11, 2024
Merged

Conversation

ludoo
Copy link
Collaborator

@ludoo ludoo commented Nov 5, 2024

This changes our changelog script to manage a single release, adding features for rc and multi-branch releases.

Copy/paste from the script docstring below.

This script allows adding or replacing individual release sections in our
CHANGELOG.md file.

It works on a set of simple principles

  • a release is identified by two boundaries, the release for which we want to
    capture PRs (release_to or end release) and the release preceding it
    (release_from or start release)
  • the end release can be null, to capture unreleased merged PRs (the
    'Unreleased' block in changelog)
  • the start release can be null, to start capturing from the last published
    release (again to populate the 'Unreleased' block)
  • merged PRs between the start and end times are captured and used to populate
    the release block
  • PRs are grouped by their on: labels, and flagged as containing incompatible
    changes if they have one of the breaks: labels
  • draft PRs or PRs merged against a base different from the one specified via
    the merged_to argument (defaulting to master) are ignored
  • the unreleased block can optionally be marked with a release name via the
    release_as argument to prepare for a new release

Example usage:

  • update the Unreleased section after PRs have been merged, both start and end
    releases use defaults, only PRs to master are tracked
    ./tools/changelog.py  --token=$TOKEN --write
    
  • update an existing release on the master branch
    ./tools/changelog.py  --token=$TOKEN --write \
      --release-from=v34.0.0 --release-to=v35.0.0
    
  • create a new release on the master branch
    ./tools/changelog.py  --token=$TOKEN --write \
      --release-from=v35.0.0 --release-as=v36.0.0
    
  • create an rc release on the fast-dev branch capturing only branch-merged PRs
    ./tools/changelog.py  --token=$TOKEN --write \
      --release-from=v35.0.0 --release-as=v36.0.0-rc1 --merged-to=fast-dev
    
  • create an rc release on the fast-dev branch also capturing master merged PRs
    e.g. when releasing an rc2 with fast-dev aligned on master
    ./tools/changelog.py  --token=$TOKEN --write \
      --release-from=v35.0.0 --release-as=v36.0.0-rc1 \
      --merged-to=fast-dev --merged-to=master
    

@github-actions github-actions bot added the on:tools New or changed tool label Nov 5, 2024
@sruffilli
Copy link
Collaborator

This process obsoletes part of the "cutting a new release" section of CONTRIBUTING.md, which should be updated at the same time.

I can take care of it after lunch.

@ludoo ludoo merged commit 6b11cdf into fast-dev Nov 11, 2024
18 checks passed
@ludoo ludoo deleted the ludo/changelog-refactor branch November 11, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on:tools New or changed tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants