Skip to content

Conversation

pcapriotti
Copy link
Contributor

@pcapriotti pcapriotti commented Sep 9, 2021

This introduces a new process for recording CHANGELOG entries, as previously discussed.

tl;dr

Entries have to be written in individual files in changelog.d, with omitted PR numbers.

Details

On every pull request, one is supposed to create a new file in the appropriate subdirectory of changelog.d, containing just the text of the corresponding changelog entry. There is no need to explicitly write a PR number, because the mk-changelog.sh script will add it automatically at the end. The name of the file does not matter, but please try to make it unique to avoid unnecessary conflicts (e.g. use the branch name).

It is still possible to write the PR number manually if so desired, which is useful in case the entry should refer to multiple PRs. In that case, the script leaves the PR number reference intact, as long as it is at the very end of the entry (no period allowed afterwards!), and in brackets. It is also possible to use the pattern ## to refer to the current PR number. This will be replaced throughout.

Multiline entries are supported, and should be handled correctly. Again, the PR reference should either be omitted or put at the very end. If multiple entries for a single PR are desired, one should create a different file for each of them.

Generating a CHANGELOG for a release

Just run the script changelog.d/mk-changelog.sh with no arguments. It will print all the entries, nicely formatted, on standard output. The script gets PR numbers from the git log. If that fails for any reason (e.g. if an entry was added outside of a PR), make sure that the entry has a manually specified PR number.

There is a branch https://github.com/wireapp/wire-server/tree/akshaymankar/changelog-d-test with some fake merge commits to test that PR number fetching works properly.

Checklist

  • The PR Title explains the impact of the change.
  • The PR description provides context as to why the change should occur and what the code contributes to that effect. This could also be a link to a JIRA ticket or a Github issue, if there is one.
  • changelog.d contains the following bits of information:
    • A file with the changelog entry in one or more suitable sub-sections. The sub-sections are marked by directories inside changelog.d.

@pcapriotti pcapriotti marked this pull request as ready for review September 9, 2021 13:04
Copy link
Member

@jschaul jschaul left a comment

Choose a reason for hiding this comment

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

new process looks good! (this PR needs one merge/rebase to resolve CHANGELOG-drafts conflict one hopefully last time)

@akshaymankar akshaymankar merged commit 1a30f5f into develop Sep 9, 2021
@akshaymankar akshaymankar deleted the akshaymankar/changelog-d branch September 9, 2021 14:02
@jschaul jschaul mentioned this pull request Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants