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 support for release notes #17

Open
masukomi opened this issue Aug 22, 2016 · 0 comments
Open

Add support for release notes #17

masukomi opened this issue Aug 22, 2016 · 0 comments

Comments

@masukomi
Copy link
Owner

Changelog Entries are great, but ultimately you're going to want to provide your users with full-on release notes.

Following the idea that the ticket should be the central thing that ties together all the aspects of the related work, then the ticket should contain the release notes.

You only want release notes for the features that went out in a release. As our Changelog entries contain a pointer back to the ticket, the generation of the CHANGELOG.md should be able to pull in the release notes.

Base Assumption

In most ticketing systems the contributors to the project have the ability to edit the description of the ticket. Observers may be able to comment, but only contributors can edit the description.

Proposed Changes

Extracting Release Notes From tickets

Going with the Base Assumption above. Users would be able to add a section to the ticket's description that started with a "RELEASE NOTES" header, and was followed by the release notes. This would be done at the bottom of the ticket, and be followed by the actual release notes (in Markdown format). There must be at least one # before "RELEASE NOTES"

## RELEASE NOTES

This feature is spectacular and will change your life for the better.  
Your babies will grow up big and strong, and your car will never be dirty.

The changelog generator would utilize the ticket information (id or link whatever is appropriate for the type of ticketing system used) and extract this information and include it in the CHANGELOG.md (see below).

Links in Entries

Links to ticket numbers in entries should be optional, and probably unnecessary when release notes are present. See Issue #16

Including Release Notes in the CHANGELOG.md

When a Release Note is found within a ticket (see above) the contents of that Release Note should be included as an item in a sublist. CSS can handle styling this as desired. For example, if the release notes are the same as shown above...

Changelog Entry Description:

Added a random "boop" sound.

Generated CHANGELOG.md

...
## Added
* Added a random "boop" sound
  * This feature is spectacular and will change your life for the better.  
    Your babies will grow up big and strong, and your car will never be dirty.
* Added some other feature with no release notes. Sad Feature. :(
...

Methodology

We have a number of potential complications to deal with when implementing this functionality:

  1. Most ticketing systems require some some sort of authentication to allow access to a specific ticket's details. We obviously won't have everyone's keys. ;)
  2. The generation of the CHANGELOG.md will frequently be part of the deployment process, and everyone handles that a little bit differently. We can't assume the location of the auth key. We can't even assume that a single string token is enough to grant access to a system.
  3. @masukomi doesn't have the time to write tools for integrating with every ticketing system out there.

Thus, we need a way to allow users to create tools that can use the ticket information in the changelog entry to extract release notes from the ticketing system.

To accomplish this we will add a new (optional) key to the config release_notes_generator this will be the name of or path to an executable that changelog_manager can execute when generating the CHANGELOG.md file. CM will pass that executable the ticket number, and the link (if available). It expects a markdown string in response. CM will handle indenting that string as appropriate for insertion into the sublist. If the release notes generator is unable to find any release notes for that entry it should exit with a status of 1. E.g. exit 1 If it encounters any other problem it should exit with a different non-zero exit status. E.g. exit 2 Success, should obviously exit with 0

For example:

# .changelog_entries/config.json
{
  "ticket_url_prefix":"https://github.com/masukomi/changelog_manager/issues/",
  "git_add":true,
  "release_notes_generator": "my_release_notes_generator"
}

# usage:
my_release_notes_generator 1234
# or
my_release_notes_generator 1234 https://github.com/masukomi/changelog_manager/issues/1234

Upon successfully receiving a some release notes from the specified release notes generator CM would indent it appropriately and give it a bullet such that it would be shown as an entry in a unordered list under the changelog entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant