-
Notifications
You must be signed in to change notification settings - Fork 38
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
Automatically crediting the author/contributor of the PR in the release notes #89
Comments
@ghuntley yes, I like this idea. If you have a look at this blog post: http://cakebuild.net/blog/2016/09/cake-v0-16-0-released I have some working code to generate the list of contributors that you can see there. Adding that to an item in the release notes is "harder". An issue might have been created by one person, and fixed by another via a pull request. Stitching the two together is where it becomes hard. Not impossible, just not sure how much effort it will take. The list of contributors is very simple to generate. |
List of contributors, with a hyperlink to commits by author would suffice imho. |
@ghuntley yes, that sounds doable 😄 |
Some other ideas which are kinda glamourous :) https://twitter.com/RobertWPearce/status/910978463586074625 Why have a hyperlink when you can put someone's avatar in the release notes? |
Two things to keep in mind:
In my opinion, the ultimate solution for this feature would be something like this:
I'm currently working on a proof of concept. If I'm successful I'll be happy to contribute a PR to implement this new feature. |
This would be a great addition! |
Determining if an issue is linked to a PR (and vice-versa) is turning out to be much more difficult than I anticipated because the Github API does not return this info when an issue is retrieved. I did a lot of research and I found people offering two possible solutions:
The first option would be my preferred solution but, as I explained in this comment, I hit a dead end. The second option (presented here) is very brittle since it relies on the presence of a HTML node with a specific CSS class. This can change at any moment if Github decides to make changes to their UI. |
Maybe there's a third possible solution: use a GraphQL query to retrieve the desired data. I haven't explored Github GraphQL API, so this will be a learning experience for me. I'll spend some time researching/learning and report my findings. |
This commit adds the ability to query for, and add, information about the contributors for linked issues and PR's into the generated release notes. This is made possible via a new `include-contributors` option in the create section of the GitReleaseManager.yaml file. This is false by default. In addition, a new scriban template has been created, so allow complete segregation between release notes that have contributors, and those that don't. This was done mainly to allow better maintainability going forward, and to reduce the complexity of the default template. This has been implemented for both GitHug and GitLab. For GitHub, it was necessary to use GraphQL to get the necessary information, where as with GitLab, the required information could be returned via the REST API.
During testing, it was found that release notes containing contributors could not be created, since there was an exception thrown when trying to map models. Digging into the problem, there were some missing mappings, and also some required translations between properties with different names. Once these addition mappings were in place, it was possible to create release notes, with contributors, in both GitHub and GitLab.
(#89) Add ability to populate release notes with information about contributors
* release/0.19.0: (44 commits) (build) Make use of new GRM features (doc) Remove unnecessary space. (doc) Document the new set-due-date option (doc) Fixed formatting (doc) Document the new include-contributors option (#89) Add required mappings for GitLab models (#89) Include contributors in release notes (#568) Set the 'Due date' when closing a milestone Bump coverlet.msbuild from 6.0.3 to 6.0.4 in /src in the tests group Bump Roslynator.Analyzers Bump Shouldly from 4.2.1 to 4.3.0 in /src Bump cake-build/cake-action from 2 to 3 Bump Microsoft.Extensions.DependencyInjection in /src Bump NGitLab from 7.1.0 to 7.6.0 in /src (build) Install .NET 7.0 on build machine Bump NGitLab from 7.0.1 to 7.1.0 in /src Bump NUnit3TestAdapter from 4.5.0 to 4.6.0 in /src Bump NUnit from 4.1.0 to 4.3.2 in /src Bump Destructurama.Attributed and Serilog in /src Bump Microsoft.Extensions.DependencyInjection in /src ...
🎉 This issue has been resolved in version 0.19.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
Let's discuss a potential feature/addition to GitReleaseManager!
Why? People like seeing their name up in lights, it a small gesture and a great way to encourage contributions. This functionality exists in GitReleaseNotes.
The text was updated successfully, but these errors were encountered: