-
Notifications
You must be signed in to change notification settings - Fork 20
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
Support setting GitHub URLs via configuration #330
Conversation
This change is part of the following stack: Change managed by git-spice. |
Setting GITHUB_URL and GITHUB_API_URL environment variables can be inconvenient. Allow setting these values via git config if desired.
It'd be really nice if |
I agree, but unfortunately, unless there's a clear way to identify GHE servers (e.g. they must always have github.com in their name), that's not possible. |
Maybe there should be an option to configure the git server type? Then you can infer the API urls based on server type and remote URL, it's just nicer to not have to explicitly write out multiple URLs. |
Oh, hm. 🤔 Are you suggesting a way to say, "assume all remotes are GitHub"? |
Oh, I think I understand what you mean. I ask because I agree that that's a better UX, but I'm trying to determine whether that's mutually exclusive with the configuration option offered here. I'll revert this PR if that's the case. |
exactly, I don't think they are mutually exclusive, it's just a shortcut IMO. |
Yes, I think so. |
For GHES, usually the API URL is /api under the base URL. So if the API URL is not set, and base URL is not github.com, we can assume the API URL is $baseURL/api. Users can still override this with the `spice.forge.github.apiUrl` or `GITHUB_API_URL` environment variable. Follow up to #330 (comment)
For GHES, usually the API URL is /api under the base URL. So if the API URL is not set, and base URL is not github.com, we can assume the API URL is $baseURL/api. Users can still override this with the `spice.forge.github.apiUrl` or `GITHUB_API_URL` environment variable. Follow up to #330 (comment) Relates to #336
Setting GITHUB_URL and GITHUB_API_URL environment variables
can be inconvenient.
Allow setting these values via git config if desired.