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
feat(version): Create Github releases with --github-release
#1864
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great so far, let's keep going!
return { | ||
logPath: changelogFileLoc, | ||
newEntry, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is brilliant!
@evocateur Awesome to move forward on this! Made some adjustments based on feedback. I'll add tests once the implementation is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far so good!
utils/github-client/github-client.js
Outdated
} | ||
|
||
if (GHE_API_URL) { | ||
options.baseUrl = GHE_API_URL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much clearer, thanks!
@evocateur Made changes. I think this is good to start adding tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, looks great so far!
@evocateur I'm trying to write tests for the command but can't seem to get access to the |
The |
I'll take a look at that, thanks. |
This looks great! We're looking at generating GitHub releases with change logs at https://github.com/gatsbyjs/gatsby/ and eagerly waiting for this to get in! Thank you for this @milesj |
yep, just waiting for the remainder of the tests, then we're good to go |
Yeah sorry, been a bit swamped and haven't had a change to dig back into it. Hoping this weekend. |
@milesj No worries, I completely understand. |
I force-rebased your changes on top of recent work in |
@evocateur Thanks for the heads up 👍 |
@evocateur Added tests 👍 |
owner: "lerna", | ||
repo: "lerna", | ||
tag_name: "v2.0.0", | ||
name: "v2.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to verify this is correct for fixed.
…entional-commits (avoids user error)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your patience!
--github-release
Hot damn, it worked great! |
@evocateur AWW YESS! Thanks for accepting it, this is awesome. |
Amazing work, thanks @milesj ! |
That's great, but it also generates a Or at least, if those files are needed for generating releases, then can we add one more flag to not commit the changelogs after the release is created? |
@tunnckoCore Yes, currently it is required to write out the changelog files due to the way the code is currently factored: lerna/core/conventional-commits/lib/update-changelog.js Lines 48 to 68 in 45a05ac
The docs aren't wrong, per se, but they are certainly omitting a case. I can add an error when |
Yea, warning or directly error sounds good. |
030de9d should do the trick. |
Is there a issue to track supporting |
Not that I'm aware of, no.
… On Mar 5, 2019, at 16:22, Lucas Azzola ***@***.***> wrote:
Is there a issue to track supporting --no-changelog with --github-release?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@azz Curious how you think that would work? |
I'm not completely across the technical details, but generating both CHANGELOG.md and GitHub releases is duplicate information. |
Raised #1959 to discuss |
Would solve #1513
Description
This is a proof of concept so I'm looking for feedback. Is this something we want in Lerna? Would it be better as a future type of plugin? etc.
A bulk of the work already exists through conventional-commits + changelog generation. I updated the changelog logic to also return the new entry to use in the body of the GH release. I then wrapped everything in a
--github
command line option for opt-in purposes.Other notes:
--github
instead of--release
, since the latter is a bit confusing, especially when terms like version and publish are thrown around. Furthermore, using--github
permits additional features in the future, like adding labels to PRs.Motivation and Context
I've been looking into using Lerna for auto-releases as a replacement for semantic-release (since it doesn't handle monorepos). The biggest drawback is the lack of GitHub releases, which most of my team wants, and is a requirement before we can switch over.
How Has This Been Tested?
N/A. I'll add tests if this change is good to move forward.
Types of changes
Checklist: