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

Retrieve github project name from origin url #7

Open
AlbertoBarba opened this issue Oct 24, 2018 · 1 comment
Open

Retrieve github project name from origin url #7

AlbertoBarba opened this issue Oct 24, 2018 · 1 comment

Comments

@AlbertoBarba
Copy link

GH_PROJECT=$( git config --get gh.project )

What do you thing to use a command to retrieve the Github project instead of reading it from a config?

GH_PROJECT=$(git config --get remote.origin.url | sed -e "s/^[email protected]://" -e "s/.git$//")

@mavimo
Copy link
Owner

mavimo commented Feb 16, 2019

@AlbertoBarba I'm not sure there is always a match between project name and remote source (that should named origin), as my experience in fork the origin is the forked project and upstream project should have other names (eg: upstream :D ).

Maybe should be used as default value for configuration if we create a "gh-init" command?

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