Comments (11)
@helio-frota i think we need to look at what the "origin remote" is for the correct github user,
from entente.
@helio-frota for the git.config
values, all of the documentation I have seen recommends using your real, full name for user.name
. See https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup and https://help.github.com/articles/setting-your-username-in-git/.
Take a look at the code @lholmquist referenced above https://github.com/npm/init-package-json/blob/master/default-input.js#L182-L202. This code is reading [projectdir]/.git/config
, then parsing the URL for the origin
repository, and using the username found in the path there. I believe this is what @lholmquist is suggesting we do, and I tend to agree. This should be more accurate in the long run, I believe.
from entente.
This is the code for what the default thing does, https://github.com/npm/init-package-json/blob/master/default-input.js#L182
perhaps we do a little copy/paste :)
from entente.
@lholmquist There might have been a race condition between your comment and my push. How do you feel about the prompt I added?
Also, we should probably add another issue to entente about using any existing package.json. By default, npm init
will use any values it finds in an existing package.json as the defaults.
from entente.
@lance the default for npm init
is to only create this "repository" section if the directory running npm init is under git control. We created it no matter what, which is probably ok, since most, if not all, packages we create will be on github.
I think the prompt works, but it is sort of a downgrade from what the default behavior did. However, i don't think we can use that default code to get the git user if the user hasn't done the git init/add remote yet since that code looks for the "origin" remote
the other thing is that when i do a npm init -y
i get "Lucas Holmquist" as my git user, but i don't think we can really do anything about that, since we don't prompt
If we wanted to get crazy, we could prompt the user for there git username only if we don't find it in the .git
folder(like the default code)
from entente.
Yeah - I noticed that problem with the git user using -y
. I think we should go crazy. I'll look at it.
from entente.
Folks I don't know if has something different from linux and mac.
I have only one username : 'helio-frota' here on my machine inside ~/.gitconfig file.
After run this command on entente repository:
git log --pretty='%cn %an' -n3
cn - committer name
an - author name
It returns:
Lucas Holmquist Lucas Holmquist
Lucas Holmquist Lucas Holmquist
Lance Ball Lance Ball
Also I have no GIT_COMMITTER_NAME
and no GIT_AUTHOR_NAME
environment variables exported.
lance and lholmquist are your computer usernames right ? [$USER]
from entente.
@lholmquist @lance got it ! Thanks!
from entente.
Instructions for the functional tests I did are on the git comment:
c75d9ec
from entente.
@helio-frota so can this be closed?
from entente.
@lance Yes.
from entente.
Related Issues (20)
- licenser basic screencast HOT 1
- Add circuit breaker booster for Node.js RHOAR HOT 1
- Node.js Runtime Guide for RHOAR HOT 2
- RHOAR Integration HOT 1
- add nodejs-rest-http to greenkeeper HOT 1
- Update nodeshift with new config-loader options HOT 1
- Health Check Middleware HOT 2
- ConfigMap Booster HOT 2
- Node Boosters - Create Launch Templates
- Enable greenkeeper for license-reporter
- feat: Create MEAN booster HOT 1
- To test bucharest-gold projects on windows HOT 3
- Create rhel7-s2i-nodejs repo HOT 2
- Potential New Booster Development for RHOAR and/or OpenShift HOT 5
- search how to configure environment variable that works in cross-platform environment inside package.json -> scripts HOT 1
- try to deploy any of the existing RHOAR Java boosters HOT 5
- script step-to-step for mean nodeshift minishift demo
- 2018-02-27 Team Meeting Agenda
- boosters: Add license-reporter silent option and fixed version of express
- RFC - s2i Builder Image for Front-end Javascript HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entente.