Skip to content

Add --generate-notes flag to gh release create command.#4467

Merged
samcoe merged 11 commits intocli:trunkfrom
Sixeight:add-generate-release-notes-flag-to-release-create
Dec 8, 2021
Merged

Add --generate-notes flag to gh release create command.#4467
samcoe merged 11 commits intocli:trunkfrom
Sixeight:add-generate-release-notes-flag-to-release-create

Conversation

@Sixeight
Copy link
Contributor

@Sixeight Sixeight commented Oct 9, 2021

Fixes #4466

TODO

  • We should not offer both Automatically generate the release notes and Write using commit log as template. These options are too similar (they both use git log to generate release notes) and we should prefer to use the new API and retire the old approach.
  • We should allow the editor phase for when you choose Automatically generate the release notes so you can review the release notes before posting. This API endpoint can be used for fetching generated release notes before a release is actually created.
  • If the API isn't available (e.g. in a GitHub Enterprise version), generating release notes should fall back to the current implementation of using the git commit log locally.
  • The non-interactive flag --generate-notes allows you to skip the editor phase. This would have the same behavior that you currently implemented, except that we propose that the flag name is shorter than --generate-release-notes.

@Sixeight Sixeight changed the title Add --generate-release-notes flag to gh release create command. Add --generate-release-notes flag to gh release create command. Oct 9, 2021
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Hi, this looks like a great start! Thank you for your contribution.

Before this ships, I think there are a number of changes I would like to propose here in order to improve the overall experience of creating releases with generated notes. However, because these suggestions increase the complexity of the changeset that would be required to implement them, I'm not necessarily asking you to do it in this PR. One of our team could use your PR as a starting point and bring this to completion.

Here are my thoughts:

  • We should not offer both Automatically generate the release notes and Write using commit log as template. These options are too similar (they both use git log to generate release notes) and we should prefer to use the new API and retire the old approach.

  • We should allow the editor phase for when you choose Automatically generate the release notes so you can review the release notes before posting. This API endpoint can be used for fetching generated release notes before a release is actually created.

  • If the API isn't available (e.g. in a GitHub Enterprise version), generating release notes should fall back to the current implementation of using the git commit log locally.

  • The non-interactive flag --generate-notes allows you to skip the editor phase. This would have the same behavior that you currently implemented, except that we propose that the flag name is shorter than --generate-release-notes.

How does all that sound? @Sixeight: you may continue working on this PR if you feel up for it, and otherwise we can take this over at this point. Again, thank you for making this!

@samcoe samcoe self-assigned this Oct 13, 2021
@Sixeight
Copy link
Contributor Author

@mislav Thank you for your polite reply.
I understand what you want to do with new release note generation API.
So, I will try to implement the idea.
(If my implementation speed does not meet your expectations, please do not hesitate to let me know.)

@Sixeight Sixeight requested a review from a team as a code owner October 17, 2021 08:35
@Sixeight Sixeight requested review from mislav and removed request for a team October 17, 2021 08:35
@Sixeight Sixeight changed the title Add --generate-release-notes flag to gh release create command. Add --generate-notes flag to gh release create command. Oct 17, 2021
@Sixeight Sixeight force-pushed the add-generate-release-notes-flag-to-release-create branch from 09d9c48 to 6e9441f Compare October 17, 2021 10:24
@Sixeight
Copy link
Contributor Author

@mislav @samcoe All done. Please review at your leisure.

Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

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

@Sixeight This is looking great so far. Really nice work, thanks for addressing @mislav's comments. I left just a couple comments and questions for discussion before this is ready to merge, but we are close I think.

@Sixeight
Copy link
Contributor Author

Sixeight commented Nov 3, 2021

I'm sorry, I haven't gotten around to it and it's taking me a while to implement.

@sandstrom
Copy link

sandstrom commented Nov 30, 2021

@mislav or @samcoe is this something you (Github) is planning to add support for? It would be a great addition!

If it is, maybe you could pick this PR up and drive it over the finish line?

It seems like this contributor has gotten pretty far, but relying on volunteers working on their spare time is bound to be slow :) Maybe better if someone employed by Github could drive it to completion.

@samcoe samcoe force-pushed the add-generate-release-notes-flag-to-release-create branch from 6e9441f to 2d6b1c2 Compare December 7, 2021 16:11
Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

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

@Sixeight Thanks for the contribution! I went ahead and rebased against trunk as well as made a couple commits that added a bit of 💅 and created an interactive test. The interactive test turned out to be fairly involved to write, involving a small refactor, so great work on getting us that far!

Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

@samcoe This looks and works great! Thanks for working on this 🌟

@samcoe samcoe requested a review from mislav December 8, 2021 07:02
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Looks good, but just note the HTTP status check

Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Looks good, but just note the HTTP status check

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.

Support generate_release_notes flag on gh release create

4 participants