-
Notifications
You must be signed in to change notification settings - Fork 75
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 for private GitHub Enterprise installations #379
Comments
I believe I would be great to allow to override these values or/and read them from system properties and configuration files. |
Definitely agreed 👍 |
I think we could turn that case class into an implicit parameter when instantiating |
Agree, I think it could look something like: def apply[F[_]: ConcurrentEffect](
accessToken: Option[String] = None,
timeout: Option[Duration] = None
)(implicit ec: ExecutionContext, config = GithubAPIv3Config.default()): Github[F] where |
yes I think it needs renaming, maybe something like: final case class GithubConfig(
baseUrl: String = "https://api.github.com/",
authorizeUrl: String = "https://github.com/login/oauth/authorize?client_id=%s&redirect_uri=%s&scope=%s&state=%s",
accessTokenUrl: String = "https://github.com/login/oauth/access_token"
)
object GithubConfig {
implicit val default: GithubConfig = GithubConfig()
} and then have: class Github[F[_]: Sync](
client: Client[F],
accessToken: Option[String]
)(implicit ghConfig: GithubConfig) 👍 |
@BenFradet, I submitted a PR #384, could you take a look please? |
The base GitHub API URLs are hard-coded inside the
GithubAPIv3Config
class:which makes impossible to leverage github4s in those companies which use their private GitHub installations and obviously different base API URLs.
Currently it seems there's no way to override these URLs.
The text was updated successfully, but these errors were encountered: