feat: make init command interactive - #2087
Conversation
🦋 Changeset detectedLatest commit: c1cdb01 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2087 +/- ##
==========================================
+ Coverage 85.05% 87.31% +2.25%
==========================================
Files 66 71 +5
Lines 2530 2546 +16
Branches 701 680 -21
==========================================
+ Hits 2152 2223 +71
+ Misses 348 299 -49
+ Partials 30 24 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Bjorn Lu <34116392+bluwy@users.noreply.github.com>
beeequeue
left a comment
There was a problem hiding this comment.
i don't really like the order of the properties in this generated config, but we can fix that later if we want to.
Co-authored-by: Bjorn Lu <34116392+bluwy@users.noreply.github.com>
I played around with the idea before but thought it was unnecessary. Given that you mention it as well know, I decided to reimplement it, so the order of properties is now: const priorityOrder = [
"$schema",
"changelog",
"baseBranch",
"commit",
"access",
"ignore",
"fixed",
"linked",
"format",
"updateInternalDependencies",
];Feel free to suggest your desired sorting of properties (I just took the one that is used in current ( |
Co-authored-by: Adam Haglund <adam@haglund.dev>
|
Probably don't need to ask for the github repo anymore with #1871 but we can also follow up on that later |
Description
This PR adds support for making the
initcommand interactive.The new command flow uses the
clackutilities and has the following flow:Should the GitHub integration be used for changelogs?
(Options: Yes / No, defaults to No)
1a. [If Yes]: What is the GitHub repository? (e.g. org/repo)
(Text input: requires a non-empty string)
Should changeset files and version bumps be automatically committed?
(Options: Yes / No, defaults to No)
Should packages be published publicly or privately by default?
(Options: Private, Public, defaults to Private since the
accessoption defaults to"restricted")Which base branch should be used?
(Text input: defaults to "main" if left blank)
I have also added new test cases to confirm the behaviour and tested it manually after running
pnpm build.I also ran
pnpm check-allbefore committing.I hope targeting
mainis correct. Please let me know ifnextshould be the branch target.I did the docs in #2088 since it needs to target
next-docs. To be honest, I am a little confused about the correct workflow 😅This PR includes AI generated code but it is all verified by me.
Closes Improve init command #160