shipkit
shipkit copied to clipboard
Make versions in release notes linkable
Problem
Currently, the release notes is a flat list with no way to link to specific version. This prevents us from having the automated pull requests include a link to release notes with specific version. It would be really useful if description from automated pull request included a link to the version in the release notes.
This would be helpful in general to provide links to release notes.
Solution
How about we change the format of the release notes so that they use heading markdown and is linkable. Here's example of desired format of release notes: https://github.com/szczepiq/shipkit/blob/master/docs/release-notes.md
Current release notes:
0.9.106 (2017-10-07) - 4 commits by [email protected] (3), Szczepan Faber (1) - published to
- Documentation for UpgradeDependencyPlugin #362 (#483)
0.9.105 (2017-10-07) - 1 commit by shipkit-org - published to
- No pull requests referenced in commit messages.
Desired release notes:
0.9.106
- 2017-10-07 - 4 commits by [email protected] (3), Szczepan Faber (1) - published to
- Documentation for UpgradeDependencyPlugin #362 (#483)
0.9.105
- 2017-10-07 - 1 commit by shipkit-org - published to
- No pull requests referenced in commit messages.
Implementation
- Start with DetailedFormatterTest - it contains coverage for the formatting of the release notes. Most changes should be in DetailedFormatter class.
Hello. I can help with that, but I need someone to tell me how to contribute.
Hi @micd. Thanks for the interest in the project! Let me know how I can help you.
@wwilk thank you for response.
What steps should I take now to contribute? Will you assign this issue to me?
@micd The simplest way to do it would be to:
- clone https://github.com/mockito/shipkit-example
- I tested and I didn't need to set any env properties, but if there is sth wrong with my setup you can find details here: https://github.com/mockito/shipkit/blob/master/docs/getting-started.md
- run ./gradlew updateReleaseNotes -Ppreview
You should be able to see sth like this:
...
:updateReleaseNotes
Building new release notes based on /Users/wilk/Projects/shipkit-example/docs/release-notes.md
Preview of release notes update:
----------------
<sup><sup>*Release notes were automatically generated by [Shipkit](http://shipkit.org/)*</sup></sup>
**0.16.12 (2017-11-15)** - no code changes (no commits) - published to [](https://bintray.com/shipkit/examples/basic0.16.12)
Now when you reproduced it you can make some changes in the code. See the class DetailedFormatter. This class is a little complicated, but it is also properly unit tested, so as a next step I would suggest to make appropriate changes in DetailedFormatterTest. When it's done you can test it again with "updateReleaseNotes -Ppreview".
You can notice that in release notes you have "no code changes (no commits)". To have some changes in there you can change the previousVersion parameter in version.properties to eg. 0.16.01.
Let me know if you have any further questions.
About assignment - I can't do it because you are not part of the team on GH, but no worries, consider it yours :)
@wwilk Thank you! What does it mean to make it linkable? Is it '#### ' prefix for version or do we need some additional things/tags in the release notes text?
Basically it means that you can add sth like "#1.2.3" to the URL, and it would link to these release notes. I'm not sure about the proper syntax for it in markdown, you can fork Shipkit and edit this file directly in GitHub: https://github.com/mockito/shipkit/blob/master/docs/release-notes.md
My understanding of this story as that if you click on the release tag header 2.0.31, it takes you to that git tag in github, as shown in the image below:
looks like this issue was resolved with this commit and should be closed.