public static final class GitHubConfig.Builder
extends java.lang.Object
GitHubConfig by composing AuthSettings,
CliSettings and ResilienceSettings, the same settings types the Gradle DSL
configures.build() call snapshots this builder's current state into fresh copies
of the three settings objects, and the built config hands out a fresh copy from every getter
call in turn. So further calls to this builder never affect an already-built config, and
mutating a settings object obtained from a built config never affects that config either.| Modifier and Type | Method and Description |
|---|---|
GitHubConfig |
build() |
GitHubConfig.Builder |
cliEnabled(boolean enabled) |
GitHubConfig.Builder |
cliFallback(boolean fallback) |
GitHubConfig.Builder |
skipOnRateLimit(boolean skipOnRateLimit) |
GitHubConfig.Builder |
sshKey(java.io.File sshKey) |
GitHubConfig.Builder |
token(java.lang.String token) |
GitHubConfig.Builder |
tokenFile(java.io.File tokenFile) |
public GitHubConfig.Builder token(java.lang.String token)
token - a GitHub Personal Access Token, used for REST calls and HTTPS git operations.public GitHubConfig.Builder tokenFile(java.io.File tokenFile)
tokenFile - a file whose contents are a GitHub token, used when token(String) is not set.public GitHubConfig.Builder sshKey(java.io.File sshKey)
sshKey - the SSH private key file used for git clone/pull over SSH.public GitHubConfig.Builder cliEnabled(boolean enabled)
enabled - whether to route GitHub REST calls through the local gh CLI.public GitHubConfig.Builder cliFallback(boolean fallback)
fallback - whether to fall back to HTTP when gh is unavailable or fails.public GitHubConfig.Builder skipOnRateLimit(boolean skipOnRateLimit)
skipOnRateLimit - whether to degrade gracefully (rather than fail) when the rate limit is hit.public GitHubConfig build()
GitHubConfig snapshot of this builder's current state.