Skip to main content

concurrency_groups

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

Overview

Nameconcurrency_groups
TypeResource
Idgithub.actions.concurrency_groups

Fields

The following fields are returned by SELECT queries:

Response

NameDatatypeDescription
group_namestringThe name of the concurrency group.
group_membersarray
group_urlstring (uri)API URL for this concurrency group.
total_countinteger

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_concurrency_group_for_repositoryselectowner, repo, concurrency_group_nameahead_of_run, ahead_of_jobGets a specific concurrency group for a repository, including all instances in the group's queue.
Returns 404 if the group is inactive or does not exist.

Optionally, pass ahead_of_run or ahead_of_job to filter the results to only the items
ahead of the specified workflow run or job in the queue, plus the specified item itself
(returned as the last element). This is useful for determining what is blocking a particular
run or job. Returns 422 if the specified run or job is not in this concurrency group.

When using ahead_of_run, this matches workflow-level concurrency and any reusable-workflow
leases held on behalf of that run. Job-level leases within the run are not considered to
block the run as a whole. Use ahead_of_job to match job-level concurrency and reusable-workflow
leases on the job's ancestor paths.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.
list_concurrency_groups_for_repositoryselectowner, repoper_page, afterLists the active concurrency groups for a repository.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.

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
concurrency_group_namestringThe name of the concurrency group.
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.
afterstringA cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API."
ahead_of_jobintegerFilter to items ahead of this job ID in the queue, plus the job itself. Matches job-level concurrency and reusable-workflow leases on the job's ancestor paths. Mutually exclusive with ahead_of_run.
ahead_of_runintegerFilter to items ahead of this workflow run ID in the queue, plus the run itself. Matches workflow-level concurrency and reusable-workflow leases held on behalf of the run. Mutually exclusive with ahead_of_job.
per_pageintegerThe number of results per page (max 100). For more information, see "Using pagination in the REST API."

SELECT examples

Gets a specific concurrency group for a repository, including all instances in the group's queue.
Returns 404 if the group is inactive or does not exist.

Optionally, pass ahead_of_run or ahead_of_job to filter the results to only the items
ahead of the specified workflow run or job in the queue, plus the specified item itself
(returned as the last element). This is useful for determining what is blocking a particular
run or job. Returns 422 if the specified run or job is not in this concurrency group.

When using ahead_of_run, this matches workflow-level concurrency and any reusable-workflow
leases held on behalf of that run. Job-level leases within the run are not considered to
block the run as a whole. Use ahead_of_job to match job-level concurrency and reusable-workflow
leases on the job's ancestor paths.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.

SELECT
group_name,
group_members,
group_url,
total_count
FROM github.actions.concurrency_groups
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND concurrency_group_name = '{{ concurrency_group_name }}' -- required
AND ahead_of_run = '{{ ahead_of_run }}'
AND ahead_of_job = '{{ ahead_of_job }}'
;