You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new GitHubBuilder()
.withJwtToken("token")
.build()
.getApp()
.getInstallationById(githubInstallationId)
.getAccount()
.getType()
leads to 401:
Caused by: org.kohsuke.github.HttpException: {"message":"Bad credentials","documentation_url":"https://docs.github.com/rest"}
at org.kohsuke.github.GitHubConnectorResponseErrorHandler$1.onError(GitHubConnectorResponseErrorHandler.java:62) ~[github-api-unbridged-1.318.jar:na]
There are a few issues here:
The field is already initialized as "Organization" after calling getAccount(), so populating here is not necessary, perhaps.
installation.getAccount().getUrl() returns https://api.github.com/users/<ORGANIZATION_LOGIN>, which perhaps is invalid, because it's an organization, not a user.
The text was updated successfully, but these errors were encountered:
Unfortunately, I couldn't find a way to work around this by determining installation owner's account type, please let me know if there's something I missed
@bitwiseman got it. How should we solve this taking into consideration the fact that there are multiple fields like this? Should we track the "populated = true/false" flag for an entity or something else?
Hi, a code like this
leads to 401:
There are a few issues here:
getAccount()
, so populating here is not necessary, perhaps.installation.getAccount().getUrl()
returnshttps://api.github.com/users/<ORGANIZATION_LOGIN>
, which perhaps is invalid, because it's an organization, not a user.The text was updated successfully, but these errors were encountered: