override fun getUser()

in integrations/github/src/main/kotlin/io/klibs/integration/github/GitHubIntegrationKohsukeLibrary.kt [82:104]


    override fun getUser(login: String): GitHubUser? {
        userRequestCounter.increment()
        
        githubApi.refreshCache()

        val ghUser = executeNullable {
            githubApi.getUser(login)
        } ?: return null

        return GitHubUser(
            id = ghUser.id,
            login = ghUser.login,
            type = ghUser.type,
            name = ghUser.name?.takeIf { it.isNotBlank() } ?: ghUser.login,
            company = ghUser.company?.takeIf { it.isNotBlank() },
            blog = ghUser.blog?.takeIf { it.isNotBlank() },
            location = ghUser.location?.takeIf { it.isNotBlank() },
            email = ghUser.email?.takeIf { it.isNotBlank() },
            bio = ghUser.bio?.takeIf { it.isNotBlank() },
            twitterUsername = ghUser.twitterUsername?.takeIf { it.isNotBlank() },
            followers = ghUser.followersCount
        )
    }