-
-
Notifications
You must be signed in to change notification settings - Fork 523
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(core): use git config to determine author before username #920
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.
Can you please describe your use case in the pull request summary (under "Summarize your changes")?
Also, the commit message should be |
@malept , Thanks for the suggestion. Issues resolved and pushed. The only thing I'm not sure is whether to use |
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.
The only thing I'm not sure is whether to use
name <email>
or object pattern. Seemsnpm init
andyarn init
both usename <email>
. Could you confirm it again?
It makes sense that those init
subcommands use the string version, because it uses interactive prompts to get the author data. This is doing it programmatically, so we don't need to have the package manager parse strings.
I did some refactors on the code, but I think the last thing it needs are some tests. |
@MarshallOfSound could you take a look at this before it gets merged? The tests could probably be written better. |
Summarize your changes:
This PR use git config to determine author before username. Since git repository has been initialized before initializing npm, we could get git author name and email.