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

Comments

Projects
None yet
3 participants
@m-renaud
Copy link
Contributor

commented Nov 27, 2018

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

This comment has been minimized.

Copy link
Member

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 chshersh added this to the v1.3.0: Extended scaffolding milestone Feb 28, 2019

@chshersh chshersh self-assigned this Apr 9, 2019

chshersh added a commit that referenced this issue Apr 9, 2019

@chshersh

This comment has been minimized.

Copy link
Member

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 chshersh closed this in #305 Apr 9, 2019

chshersh added a commit that referenced this issue Apr 9, 2019

[#261] Try to guess user name and email from .gitconfig (#305)
* [#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
You can’t perform that action at this time.