Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/clone/hooks/useGithubConnection

Cockpit client (features), next. Source: ui/client/features/clone/hooks/useGithubConnection.tsx.

Functions#

useGithubConnection()#

useGithubConnection(__namedParameters?): object

Defined in: ui/client/features/clone/hooks/useGithubConnection.tsx:13

The GitHub connection for private repositories: whether it is on and made (and for which account), the repositories it can read (only when withRepos, for the clone form's picker), Connect and Disconnect. The token is never here: it lives in the server's memory and is never sent to the browser.

Parameters#

__namedParameters?
withRepos?

boolean = false

Returns#

connect

connect: () => void = startGithubConnect

Send the browser to GitHub to grant the connection. It comes back to the Cockpit's own address.

Returns

void

disconnect

disconnect: () => Promise<void>

Returns

Promise<void>

more

more: () => Promise<void>

Returns

Promise<void>

reload

reload: () => void

Returns

void

setQuery

setQuery: (q) => void

Parameters
q

string

Returns

void

state

state: GithubState