public class CliSettings
extends java.lang.Object
gh) transport.
github {
cli {
enabled = true // route GitHub REST calls through the "gh" CLI
fallback = true // fall back to HTTP when gh is unavailable or a call fails (default)
}
}
When enabled, API GET/POST requests are executed through gh api,
reusing the CLI's own authentication and higher (authenticated) rate limits. When
fallback is left at its default of true, the plugin transparently
reverts to direct HTTP if gh is not installed or a CLI invocation fails; setting it to
false instead surfaces the failure so the misconfiguration is not silently ignored.
| Constructor and Description |
|---|
CliSettings() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isEnabled() |
boolean |
isFallback() |
void |
setEnabled(boolean enabled)
Controls whether GitHub REST calls are routed through the local
gh CLI instead of
direct HTTP. |
void |
setFallback(boolean fallback)
Controls whether the plugin falls back to direct HTTP when the
gh CLI is enabled but
cannot be used (not installed, or a CLI invocation fails). |
public void setEnabled(boolean enabled)
gh CLI instead of
direct HTTP. Defaults to false.enabled - whether to use the gh CLI for API calls.public boolean isEnabled()
gh CLI.public void setFallback(boolean fallback)
gh CLI is enabled but
cannot be used (not installed, or a CLI invocation fails). Defaults to true. When set
to false, such a situation raises an error instead of silently switching to HTTP.fallback - whether to fall back to HTTP when the CLI is unavailable or fails.public boolean isFallback()