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

should fromCredentials not be public? #2041

Open
maxandersen opened this issue Feb 22, 2025 · 5 comments
Open

should fromCredentials not be public? #2041

maxandersen opened this issue Feb 22, 2025 · 5 comments
Labels

Comments

@maxandersen
Copy link

Describe the bug
GithubBuilder.fromCredentials is not public and given the auth provider field is not public it is not possible to implement the "honor .github and env" manually.

Thus should that method not be public?

@gsmet
Copy link
Contributor

gsmet commented Feb 23, 2025

You can use GitHub.connect().

@maxandersen
Copy link
Author

GitHub.connect() calls builds immediately so can't hook in the okhttp caching connector when using that afaics.

@bitwiseman bitwiseman added the bug label Feb 24, 2025
@bitwiseman
Copy link
Member

@maxandersen
I'm marking this as bug for now, but I'm not sure of the right answer yet. I don't know if GithubBuilder.fromCredentials should be public or if it was intended only as a convenience method. I might not have wanted to make it public because the behavior was poorly defined or hard to test. Needs some digging.

@maxandersen
Copy link
Author

@bitwiseman sounds good. mind you - before the change of how auth works I could have implemented it without use of this method but for now I can't as no way to detect if the fromEnv etc. setup had an effect or not.

@bitwiseman
Copy link
Member

@maxandersen
I'm open to a PR if you have a suggestion for how to address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants