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

issue: allow configurable default or default to current repo origin #4

Open
bmizerany opened this issue Jan 31, 2017 · 2 comments
Open

Comments

@bmizerany
Copy link
Collaborator

Currently, issue defaults to the golang/go repo and there exists no way to change this. This means those using issue and not working on that repo must frequently supply a -p user/repo. I think it would be nice if issue was a little "smarter" about the repo I'm interested in and so I propose adding smarter defaults using the following rules, each overriding the next:

  • issue commands use -p if supplied
  • issue commands default to git config github.issue.repo.always if supplied
  • issue commands default to the origin repo if supplied and its host is github
  • issue commands default to git config github.issue.repo if supplied
  • issue commands default to golang/go if none of the above are satisfied.

I'm not married to the git config names.

@rsc
Copy link
Owner

rsc commented Jan 31, 2017

I understand the default is bad for programmers outside the go repos. But in the subrepos we still want golang/go, without additional configuration just for this command. Perhaps instead:

  • use $ISSUEREPO if set. otherwise:
  • find current repo root
  • if $root/codereview.cfg exists and has issuerepo: line, use that
  • otherwise if .git/config says origin is github, use that
  • otherwise use golang/go

?

@bmizerany
Copy link
Collaborator Author

SGTM! I can work on this change later in the week and send a PR. Should I send PRs to this repo or is there a Gerrit install I should send a CL to?

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