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

Guess author name and email from VCS configs #261

Closed
m-renaud opened this issue Nov 27, 2018 · 2 comments
Closed

Guess author name and email from VCS configs #261

m-renaud opened this issue Nov 27, 2018 · 2 comments
Assignees
Labels
config TOML configurations feature Git/Hub VCS issues

Comments

@m-renaud
Copy link
Contributor

Overview

cabal init guesses your name and email based on your source control configuration (~/.gitconfig for example), it would be awesome if Summoner did the same thing.

Example

Currently the interactive prompt displays the following:

Repository owner:  [kowainik]
  ->   m-renaud
Short project description: 
  ->   
Author:  [Kowainik]
  ->   Matt Renaud
Maintainer e-mail:  [xrom.xkov@gmail.com]
  ->

The repository owner, author, and email can all be guessed from the users Git configuration file.

Reference Code

The cabal init implementation can be found here.

@vrom911 vrom911 added feature Git/Hub VCS issues config TOML configurations labels Nov 28, 2018
@vrom911
Copy link
Member

vrom911 commented Nov 28, 2018

@m-renaud Thanks for the idea! I guess, for Summoner at the moment it makes sense to only check the Git config file as we are supporting only this at the moment.

However, there is a way to configure this information for you in Summoner, even for different types of project creation (for example, your personal name, or organization one) – we are using TOML configurations. Here is some info about what can be put to your .toml file, and also the general logic we are using for the data input.

@chshersh
Copy link
Contributor

chshersh commented Apr 9, 2019

@m-renaud See PR #305 which address the issue. From the cabal init code I see that it tries to guess credentials from multiple sources: environment variables, darcs config, .gitconfig, etc. Currently in summoner we support only git VSC, so it guesses only from .gitconfig.

chshersh added a commit that referenced this issue Apr 9, 2019
* [#261] Try to guess user name and email from .gitconfig

Resolves #261

* Fix shellmet version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config TOML configurations feature Git/Hub VCS issues
Projects
None yet
Development

No branches or pull requests

3 participants