Skip to content

Set the fine-grained personal access token that reads repos and opens pull requests.

PUT
/admin/github
curl --request PUT \
--url https://example.com/api/v1/admin/github \
--header 'Content-Type: application/json' \
--data '{ "token": "example", "api_url": "example" }'
Media typeapplication/json
object
token
required
string
>= 1 characters
api_url

The GitHub API. The default is https://api.github.com. GitHub Enterprise Server uses https:///api/v3.

string
Examplegenerated
{
"token": "example",
"api_url": "example"
}

The connection, after a check with GitHub.

Media typeapplication/json

The one GitHub connection of the workspace, an App or a token, never both (docs/specs/github-app.md).

object
configured
required
boolean
kind
required
string
Allowed values: none token app
app_available
required

Whether this mode can create a GitHub App. Hosted mode only.

boolean
app

The workspace’s private GitHub App.

object
slug
required
string
owner
required

The org or the personal account that owns the App.

string
owner_is_org
required
boolean
installed
required
boolean
api_url
required
string
install_url
required
string
settings_url
required

The App’s settings page on GitHub, where its owner deletes it.

string
from_env
required

The App comes from the SPECCY_GITHUB_APP_ variables, so the UI cannot change it.

boolean
missing

What the installation lacks for pull request reviews and the other features, such as “checks: write” or “event issue_comment”. GitHub cannot change an existing App by API, so its owner adds them on the settings page.

Array<string>
token_last4
string
api_url
required
string
login

The GitHub account of the token, from the last check.

string
Example
{
"kind": "none"
}

An error.

Media typeapplication/problem+json

RFC 9457 problem details with a stable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required

A stable machine-readable error code.

string
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"code": "example"
}