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

git-spr --version etc., working outside of #333

Open
ggoretkin-bdai opened this issue Jun 12, 2023 · 2 comments
Open

git-spr --version etc., working outside of #333

ggoretkin-bdai opened this issue Jun 12, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ggoretkin-bdai
Copy link

Not in a git repo:

/tmp$ git-spr --version
git error: fatal: not a git repository (or any of the parent directories): .git

In a git repo without .spr.yml

/tmp/testrepo$ git init
Initialized empty Git repository in /tmp/testrepo/.git/
/tmp/testrepo$ git-spr --version
rake: config file /tmp/testrepo/.spr.yml not found
unable to auto configure repository owner - must be set manually in .spr.yml
@ejoffe ejoffe added the bug Something isn't working label Jan 12, 2024
@visma-alexander-maslov
Copy link

I hit the same bug. And for me it seems to be because username contains '-'
As the GitHub states when you create new account

Username may only contain alphanumeric characters or single hyphens, and cannot begin or end with a hyphen.

https://github.com/ejoffe/spr/blob/master/config/config_parser/remote_source.go#L48 regex is

repoFormat := `(?P<githubHost>[a-z0-9._\-]+)(/|:)(?P<repoOwner>\w+)/(?P<repoName>[\w-]+)`

and it has only \w -> word characters (== [0-9A-Za-z_]) for the repoOwner

@visma-alexander-maslov
Copy link

#393 seems address this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants