concurrency_groups
Creates, updates, deletes, gets or lists a concurrency_groups resource.
Overview
| Name | concurrency_groups |
| Type | Resource |
| Id | github.actions.concurrency_groups |
Fields
The following fields are returned by SELECT queries:
- get_concurrency_group_for_repository
- list_concurrency_groups_for_repository
Response
| Name | Datatype | Description |
|---|---|---|
group_name | string | The name of the concurrency group. |
group_members | array | |
group_url | string (uri) | API URL for this concurrency group. |
total_count | integer |
Response
| Name | Datatype | Description |
|---|---|---|
group_name | string | The name of the concurrency group. |
group_url | string (uri) | API URL for this concurrency group. |
last_acquired_at | string (date-time) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_concurrency_group_for_repository | select | owner, repo, concurrency_group_name | ahead_of_run, ahead_of_job | 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 itemsahead 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-workflowleases 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-workflowleases 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_repository | select | owner, repo | per_page, after | Lists 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.
| Name | Datatype | Description |
|---|---|---|
concurrency_group_name | string | The name of the concurrency group. |
owner | string | The account owner of the repository. The name is not case sensitive. |
repo | string | The name of the repository without the .git extension. The name is not case sensitive. |
after | string | A 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_job | integer | Filter 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_run | integer | Filter 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_page | integer | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
SELECT examples
- get_concurrency_group_for_repository
- list_concurrency_groups_for_repository
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 }}'
;
Lists 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.
SELECT
group_name,
group_url,
last_acquired_at
FROM github.actions.concurrency_groups
WHERE owner = '{{ owner }}' -- required
AND repo = '{{ repo }}' -- required
AND per_page = '{{ per_page }}'
AND after = '{{ after }}'
;