-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add ability to set global packages #74
base: master
Are you sure you want to change the base?
Conversation
right now it just retrieves the name from a file
This is awesome, you did a great job! Answers to above questions:
|
My only feedback is that it doesn't appear to be very clear that it's using the default package. Maybe it should be put as the default value into the text box? |
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.
@EmmaRamirez A few code review comments, and I just wanted to ask a few more things:
-
When we prompt the user for the global JSON package, is the expected path relative to the current directory? We should let the user know this.
-
Once I save my global package, how can I use it? I feel like the "Add Labels From Package" should notify the user that their global package will be used if they don't input anything (but only show this note if they've saved a global package).
-
We should update the usage section of the readme with the new option 👍
@@ -103,6 +104,20 @@ const addFromPackage = (repo, token, path) => { | |||
.catch(console.warn); | |||
}; | |||
|
|||
const setGlobalPackage = (path, token) => { | |||
fs.writeFile('.git-label-maker-config', pathTool.resolve(__dirname, '..', path), (err) => { |
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.
@EmmaRamirez "labelmaker" should match the name of the repo, like .git-labelmaker-config'
👍
break; | ||
|
||
case "add global package": | ||
prompt([{ |
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.
You can break off this array for the prompt and put it in the ./bin/prompts/
directory 👍
@EmmaRamirez are you still working on this? If not I don't mind picking up from where you left off... |
This PR:
Some questions:
Sorry if this PR is a bit crude, I just wanted to actually get started with it. Obviously, it'd be awesome if I could suggestions on improving it!