Skip to main content

runner_remove_tokens

Creates, updates, deletes, gets or lists a runner_remove_tokens resource.

Overview

Namerunner_remove_tokens
TypeResource
Idgithub.actions.runner_remove_tokens

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
create_remove_token_for_repoinsertowner, repoReturns a token that you can pass to the config script to remove a self-hosted runner from an repository. The token expires after one hour.

For example, you can replace TOKEN in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:

<br />./config.sh remove --token TOKEN<br />

Authenticated users must have admin access to the repository to use this endpoint.

OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.
create_remove_token_for_orginsertorgReturns a token that you can pass to the config script to remove a self-hosted runner from an organization. The token expires after one hour.

For example, you can replace TOKEN in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:

<br />./config.sh remove --token TOKEN<br />

Authenticated users must have admin access to the organization to use this endpoint.

OAuth tokens and personal access tokens (classic) need theadmin:org scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
orgstringThe organization name. The name is not case sensitive.
ownerstringThe account owner of the repository. The name is not case sensitive.
repostringThe name of the repository without the .git extension. The name is not case sensitive.

INSERT examples

Returns a token that you can pass to the config script to remove a self-hosted runner from an repository. The token expires after one hour.

For example, you can replace TOKEN in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:

<br />./config.sh remove --token TOKEN<br />

Authenticated users must have admin access to the repository to use this endpoint.

OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

INSERT INTO github.actions.runner_remove_tokens (
owner,
repo
)
SELECT
'{{ owner }}',
'{{ repo }}'
RETURNING
expires_at,
permissions,
repositories,
repository_selection,
single_file,
token
;