Skip to content
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

Have RecipeIdentifierPrefix default to git user or mac user #63

Closed
jgstew opened this issue Nov 11, 2015 · 3 comments
Closed

Have RecipeIdentifierPrefix default to git user or mac user #63

jgstew opened this issue Nov 11, 2015 · 3 comments

Comments

@jgstew
Copy link
Contributor

jgstew commented Nov 11, 2015

The function defined here is used to define the user identifier for the autopkg recipes: https://github.com/homebysix/recipe-robot/blob/master/scripts/recipe-robot#L372

It defaults to: com.github.your_name_here

It would be interesting if it could default to: com.github.(configured git user)

Typically this is contained in the file: ~/.gitconfig or ~/.config/git/config or /etc/gitconfig

The format is like an INI file, with sections, keys, values:

[user]
    name = jgstew

Or else, it would default to: com.github.( os.getusername() )

com.github.your_name_here could be a fall back value.

References:

@homebysix
Copy link
Owner

@jgstew I think the problem is that the name in the gitconfig file is arbitrary. Yours may match your GitHub username, but mine is Elliot Jordan.

In fact, I can't find any instance of my GitHub username in a predictable preference or config file on my Mac. I suspect GitHub uses the email address to refer to me, and GitHub's website/app does the translation from email to username.

I agree that using your local Mac shortname is better than your_name_here (a string that was chosen specifically because it didn't match any existing GitHub user, but who knows how long that will remain true).

@jgstew
Copy link
Contributor Author

jgstew commented Nov 11, 2015

GitHub does not allow hyphens in the username, so your_name_here is an invalid option, which is probably a good thing in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants