diff --git a/descriptions-next/api.github.com/api.github.com.2022-11-28.json b/descriptions-next/api.github.com/api.github.com.2022-11-28.json index b0692b120c..0a008d8b07 100644 --- a/descriptions-next/api.github.com/api.github.com.2022-11-28.json +++ b/descriptions-next/api.github.com/api.github.com.2022-11-28.json @@ -35242,6 +35242,139 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/concurrency-group-name" + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -37655,6 +37788,74 @@ } } }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/run-id" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-before" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-run-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-run-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { "post": { "summary": "Review custom deployment protection rules for a workflow run", @@ -130867,6 +131068,144 @@ "actions_caches" ] }, + "concurrency-group-list": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "concurrency-group": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, "job": { "title": "Job", "description": "Information of a job execution in a workflow run", @@ -131798,6 +132137,131 @@ "comment" ] }, + "concurrency-group-run-list": { + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } + }, "review-custom-gates-comment-required": { "type": "object", "properties": { @@ -312472,6 +312936,57 @@ ] } }, + "concurrency-group-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + }, + "concurrency-group": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + }, "job": { "value": { "id": 399444496, @@ -313260,6 +313775,47 @@ ] } }, + "concurrency-group-run-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } + }, "pending-deployment-items": { "value": [ { @@ -333406,6 +333962,15 @@ "type": "integer" } }, + "concurrency-group-name": { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, "job-id": { "name": "job_id", "description": "The unique identifier of the job.", diff --git a/descriptions-next/api.github.com/api.github.com.2022-11-28.yaml b/descriptions-next/api.github.com/api.github.com.2022-11-28.yaml index 3901c917c6..1abeaaaba9 100644 --- a/descriptions-next/api.github.com/api.github.com.2022-11-28.yaml +++ b/descriptions-next/api.github.com/api.github.com.2022-11-28.yaml @@ -25733,6 +25733,111 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-list" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/concurrency-group-name" + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group" + examples: + default: + "$ref": "#/components/examples/concurrency-group" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -27435,6 +27540,64 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-run-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-run-list" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run @@ -95139,6 +95302,112 @@ components: required: - total_count - actions_caches + concurrency-group-list: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + concurrency-group: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending job: title: Job description: Information of a job execution in a workflow run @@ -95842,6 +96111,116 @@ components: - state - user - comment + concurrency-group-run-list: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds the concurrency + lease (in_progress), 1 or higher means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item in the + concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending review-custom-gates-comment-required: type: object properties: @@ -231365,6 +231744,41 @@ components: last_accessed_at: '2019-01-24T22:45:36.000Z' created_at: '2019-01-24T22:45:36.000Z' size_in_bytes: 1024 + concurrency-group-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + concurrency-group: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending job: value: id: 399444496 @@ -232041,6 +232455,34 @@ components: runner_group_name: my runner group workflow_name: CI head_branch: main + concurrency-group-run-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 pending-deployment-items: value: - environment: @@ -249466,6 +249908,13 @@ components: required: true schema: type: integer + concurrency-group-name: + name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string job-id: name: job_id description: The unique identifier of the job. diff --git a/descriptions-next/api.github.com/api.github.com.2026-03-10.json b/descriptions-next/api.github.com/api.github.com.2026-03-10.json index 30dfb1c042..955e267c12 100644 --- a/descriptions-next/api.github.com/api.github.com.2026-03-10.json +++ b/descriptions-next/api.github.com/api.github.com.2026-03-10.json @@ -35193,6 +35193,139 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/concurrency-group-name" + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -37606,6 +37739,74 @@ } } }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/run-id" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-before" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-run-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-run-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { "post": { "summary": "Review custom deployment protection rules for a workflow run", @@ -130227,6 +130428,144 @@ "actions_caches" ] }, + "concurrency-group-list": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "concurrency-group": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, "job": { "title": "Job", "description": "Information of a job execution in a workflow run", @@ -131158,6 +131497,131 @@ "comment" ] }, + "concurrency-group-run-list": { + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } + }, "review-custom-gates-comment-required": { "type": "object", "properties": { @@ -311622,6 +312086,57 @@ ] } }, + "concurrency-group-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + }, + "concurrency-group": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + }, "job": { "value": { "id": 399444496, @@ -312410,6 +312925,47 @@ ] } }, + "concurrency-group-run-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } + }, "pending-deployment-items": { "value": [ { @@ -332466,6 +333022,15 @@ "type": "integer" } }, + "concurrency-group-name": { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, "job-id": { "name": "job_id", "description": "The unique identifier of the job.", diff --git a/descriptions-next/api.github.com/api.github.com.2026-03-10.yaml b/descriptions-next/api.github.com/api.github.com.2026-03-10.yaml index 6819017a16..4bf0721792 100644 --- a/descriptions-next/api.github.com/api.github.com.2026-03-10.yaml +++ b/descriptions-next/api.github.com/api.github.com.2026-03-10.yaml @@ -25695,6 +25695,111 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-list" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/concurrency-group-name" + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group" + examples: + default: + "$ref": "#/components/examples/concurrency-group" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -27397,6 +27502,64 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-run-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-run-list" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run @@ -94668,6 +94831,112 @@ components: required: - total_count - actions_caches + concurrency-group-list: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + concurrency-group: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending job: title: Job description: Information of a job execution in a workflow run @@ -95371,6 +95640,116 @@ components: - state - user - comment + concurrency-group-run-list: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds the concurrency + lease (in_progress), 1 or higher means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item in the + concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending review-custom-gates-comment-required: type: object properties: @@ -230662,6 +231041,41 @@ components: last_accessed_at: '2019-01-24T22:45:36.000Z' created_at: '2019-01-24T22:45:36.000Z' size_in_bytes: 1024 + concurrency-group-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + concurrency-group: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending job: value: id: 399444496 @@ -231338,6 +231752,34 @@ components: runner_group_name: my runner group workflow_name: CI head_branch: main + concurrency-group-run-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 pending-deployment-items: value: - environment: @@ -248678,6 +249120,13 @@ components: required: true schema: type: integer + concurrency-group-name: + name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string job-id: name: job_id description: The unique identifier of the job. diff --git a/descriptions-next/api.github.com/api.github.com.json b/descriptions-next/api.github.com/api.github.com.json index 5c94afb103..1a61b904ba 100644 --- a/descriptions-next/api.github.com/api.github.com.json +++ b/descriptions-next/api.github.com/api.github.com.json @@ -35454,6 +35454,139 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/concurrency-group-name" + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -37867,6 +38000,74 @@ } } }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/run-id" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-before" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-run-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-run-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { "post": { "summary": "Review custom deployment protection rules for a workflow run", @@ -131878,6 +132079,144 @@ "actions_caches" ] }, + "concurrency-group-list": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "concurrency-group": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, "job": { "title": "Job", "description": "Information of a job execution in a workflow run", @@ -132809,6 +133148,131 @@ "comment" ] }, + "concurrency-group-run-list": { + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } + }, "review-custom-gates-comment-required": { "type": "object", "properties": { @@ -314456,6 +314920,57 @@ ] } }, + "concurrency-group-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + }, + "concurrency-group": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + }, "job": { "value": { "id": 399444496, @@ -315244,6 +315759,47 @@ ] } }, + "concurrency-group-run-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } + }, "pending-deployment-items": { "value": [ { @@ -335518,6 +336074,15 @@ "type": "integer" } }, + "concurrency-group-name": { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, "job-id": { "name": "job_id", "description": "The unique identifier of the job.", diff --git a/descriptions-next/api.github.com/api.github.com.yaml b/descriptions-next/api.github.com/api.github.com.yaml index bee45867e9..830fff0715 100644 --- a/descriptions-next/api.github.com/api.github.com.yaml +++ b/descriptions-next/api.github.com/api.github.com.yaml @@ -25846,6 +25846,111 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-list" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/concurrency-group-name" + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group" + examples: + default: + "$ref": "#/components/examples/concurrency-group" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -27548,6 +27653,64 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-run-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-run-list" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run @@ -95843,6 +96006,112 @@ components: required: - total_count - actions_caches + concurrency-group-list: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + concurrency-group: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending job: title: Job description: Information of a job execution in a workflow run @@ -96546,6 +96815,116 @@ components: - state - user - comment + concurrency-group-run-list: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds the concurrency + lease (in_progress), 1 or higher means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item in the + concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending review-custom-gates-comment-required: type: object properties: @@ -232639,6 +233018,41 @@ components: last_accessed_at: '2019-01-24T22:45:36.000Z' created_at: '2019-01-24T22:45:36.000Z' size_in_bytes: 1024 + concurrency-group-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + concurrency-group: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending job: value: id: 399444496 @@ -233315,6 +233729,34 @@ components: runner_group_name: my runner group workflow_name: CI head_branch: main + concurrency-group-run-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 pending-deployment-items: value: - environment: @@ -250804,6 +251246,13 @@ components: required: true schema: type: integer + concurrency-group-name: + name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string job-id: name: job_id description: The unique identifier of the job. diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json b/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json index bc80497d4c..e7219a54ea 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.json @@ -274734,6 +274734,528 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + } + } + } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -292112,7 +292634,103 @@ "Location": { "example": "https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D", "schema": { - "type": "string" + "type": "string" + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "workflow-runs" + } + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + "post": { + "summary": "Cancel a workflow run", + "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/cancel-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/workflow-runs#cancel-a-workflow-run" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "The unique identifier of the workflow run.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } } } } @@ -292126,17 +292744,17 @@ } } }, - "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { - "post": { - "summary": "Cancel a workflow run", - "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", "tags": [ "actions" ], - "operationId": "actions/cancel-workflow-run", + "operationId": "actions/list-concurrency-groups-for-workflow-run", "externalDocs": { "description": "API method documentation", - "url": "https://docs.github.com/rest/actions/workflow-runs#cancel-a-workflow-run" + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" }, "parameters": [ { @@ -292165,30 +292783,221 @@ "schema": { "type": "integer" } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "before", + "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { - "202": { + "200": { "description": "Response", "content": { "application/json": { "schema": { - "title": "Empty Object", - "description": "An object without any properties.", + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", "type": "object", - "properties": {}, - "additionalProperties": false + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } }, "examples": { "default": { - "value": null + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } } } } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } } }, - "409": { - "description": "Conflict", + "404": { + "description": "Resource not found", "content": { "application/json": { "schema": { @@ -292212,13 +293021,88 @@ } } } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "actions", - "subcategory": "workflow-runs" + "subcategory": "concurrency-groups" } } }, diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml b/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml index d8f4e05b86..c9de1ef8c5 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.2022-11-28.deref.yaml @@ -55677,6 +55677,245 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - *331 + - *332 + - *17 + - *46 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + headers: + Link: *66 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - *331 + - *332 + - name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item + represents a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -58730,6 +58969,198 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - *331 + - *332 + - *369 + - *17 + - *45 + - *46 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow + run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds + the concurrency lease (in_progress), 1 or higher + means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item + in the concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the + item represents a job-level or reusable-workflow-level + lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 + headers: + Link: *66 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json b/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json index 7280796426..1639d875b6 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.json @@ -267130,6 +267130,528 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + } + } + } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -284452,7 +284974,103 @@ "Location": { "example": "https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D", "schema": { - "type": "string" + "type": "string" + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "workflow-runs" + } + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + "post": { + "summary": "Cancel a workflow run", + "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/cancel-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/workflow-runs#cancel-a-workflow-run" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "The unique identifier of the workflow run.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } } } } @@ -284466,17 +285084,17 @@ } } }, - "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { - "post": { - "summary": "Cancel a workflow run", - "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", "tags": [ "actions" ], - "operationId": "actions/cancel-workflow-run", + "operationId": "actions/list-concurrency-groups-for-workflow-run", "externalDocs": { "description": "API method documentation", - "url": "https://docs.github.com/rest/actions/workflow-runs#cancel-a-workflow-run" + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" }, "parameters": [ { @@ -284505,30 +285123,221 @@ "schema": { "type": "integer" } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "before", + "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { - "202": { + "200": { "description": "Response", "content": { "application/json": { "schema": { - "title": "Empty Object", - "description": "An object without any properties.", + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", "type": "object", - "properties": {}, - "additionalProperties": false + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } }, "examples": { "default": { - "value": null + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } } } } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } } }, - "409": { - "description": "Conflict", + "404": { + "description": "Resource not found", "content": { "application/json": { "schema": { @@ -284552,13 +285361,88 @@ } } } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "actions", - "subcategory": "workflow-runs" + "subcategory": "concurrency-groups" } } }, diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml b/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml index a8d81b4ccb..cbf65efb59 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.2026-03-10.deref.yaml @@ -55253,6 +55253,245 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - *331 + - *332 + - *17 + - *46 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + headers: + Link: *66 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - *331 + - *332 + - name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item + represents a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -58306,6 +58545,198 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - *331 + - *332 + - *369 + - *17 + - *45 + - *46 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow + run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds + the concurrency lease (in_progress), 1 or higher + means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item + in the concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the + item represents a job-level or reusable-workflow-level + lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 + headers: + Link: *66 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.deref.json b/descriptions-next/api.github.com/dereferenced/api.github.com.deref.json index 7541edcc09..e922691040 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.deref.json +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.deref.json @@ -282503,6 +282503,528 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + } + } + } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -300153,7 +300675,103 @@ "Location": { "example": "https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D", "schema": { - "type": "string" + "type": "string" + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "workflow-runs" + } + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + "post": { + "summary": "Cancel a workflow run", + "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/cancel-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/rest/actions/workflow-runs#cancel-a-workflow-run" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "The unique identifier of the workflow run.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } } } } @@ -300167,17 +300785,17 @@ } } }, - "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { - "post": { - "summary": "Cancel a workflow run", - "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", "tags": [ "actions" ], - "operationId": "actions/cancel-workflow-run", + "operationId": "actions/list-concurrency-groups-for-workflow-run", "externalDocs": { "description": "API method documentation", - "url": "https://docs.github.com/rest/actions/workflow-runs#cancel-a-workflow-run" + "url": "https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" }, "parameters": [ { @@ -300206,30 +300824,221 @@ "schema": { "type": "integer" } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "before", + "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { - "202": { + "200": { "description": "Response", "content": { "application/json": { "schema": { - "title": "Empty Object", - "description": "An object without any properties.", + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", "type": "object", - "properties": {}, - "additionalProperties": false + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } }, "examples": { "default": { - "value": null + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } } } } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } } }, - "409": { - "description": "Conflict", + "404": { + "description": "Resource not found", "content": { "application/json": { "schema": { @@ -300253,13 +301062,88 @@ } } } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "actions", - "subcategory": "workflow-runs" + "subcategory": "concurrency-groups" } } }, diff --git a/descriptions-next/api.github.com/dereferenced/api.github.com.deref.yaml b/descriptions-next/api.github.com/dereferenced/api.github.com.deref.yaml index e34dac270e..9e286652b8 100644 --- a/descriptions-next/api.github.com/dereferenced/api.github.com.deref.yaml +++ b/descriptions-next/api.github.com/dereferenced/api.github.com.deref.yaml @@ -56291,6 +56291,245 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - *331 + - *332 + - *17 + - *46 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + headers: + Link: *66 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - *331 + - *332 + - name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item + represents a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -59344,6 +59583,198 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - *331 + - *332 + - *369 + - *17 + - *45 + - *46 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow + run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds + the concurrency lease (in_progress), 1 or higher + means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item + in the concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the + item represents a job-level or reusable-workflow-level + lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 + headers: + Link: *66 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run diff --git a/descriptions-next/ghec/dereferenced/ghec.2022-11-28.deref.json b/descriptions-next/ghec/dereferenced/ghec.2022-11-28.deref.json index 540dc227f7..e08589d985 100644 --- a/descriptions-next/ghec/dereferenced/ghec.2022-11-28.deref.json +++ b/descriptions-next/ghec/dereferenced/ghec.2022-11-28.deref.json @@ -334450,6 +334450,528 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + } + } + } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -351902,7 +352424,103 @@ "Location": { "example": "https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D", "schema": { - "type": "string" + "type": "string" + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "workflow-runs" + } + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + "post": { + "summary": "Cancel a workflow run", + "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/cancel-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/workflow-runs#cancel-a-workflow-run" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "The unique identifier of the workflow run.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } } } } @@ -351916,17 +352534,17 @@ } } }, - "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { - "post": { - "summary": "Cancel a workflow run", - "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", "tags": [ "actions" ], - "operationId": "actions/cancel-workflow-run", + "operationId": "actions/list-concurrency-groups-for-workflow-run", "externalDocs": { "description": "API method documentation", - "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/workflow-runs#cancel-a-workflow-run" + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" }, "parameters": [ { @@ -351955,30 +352573,221 @@ "schema": { "type": "integer" } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "before", + "description": "A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { - "202": { + "200": { "description": "Response", "content": { "application/json": { "schema": { - "title": "Empty Object", - "description": "An object without any properties.", + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", "type": "object", - "properties": {}, - "additionalProperties": false + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } }, "examples": { "default": { - "value": null + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } } } } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } } }, - "409": { - "description": "Conflict", + "404": { + "description": "Resource not found", "content": { "application/json": { "schema": { @@ -352002,13 +352811,88 @@ } } } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "actions", - "subcategory": "workflow-runs" + "subcategory": "concurrency-groups" } } }, diff --git a/descriptions-next/ghec/dereferenced/ghec.2022-11-28.deref.yaml b/descriptions-next/ghec/dereferenced/ghec.2022-11-28.deref.yaml index 8f3d45e06c..f881778d98 100644 --- a/descriptions-next/ghec/dereferenced/ghec.2022-11-28.deref.yaml +++ b/descriptions-next/ghec/dereferenced/ghec.2022-11-28.deref.yaml @@ -68739,6 +68739,245 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - *465 + - *466 + - *17 + - *109 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + headers: + Link: *45 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - *465 + - *466 + - name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item + represents a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -71801,6 +72040,198 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - *465 + - *466 + - *489 + - *17 + - *108 + - *109 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow + run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds + the concurrency lease (in_progress), 1 or higher + means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item + in the concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the + item represents a job-level or reusable-workflow-level + lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 + headers: + Link: *45 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run diff --git a/descriptions-next/ghec/dereferenced/ghec.2026-03-10.deref.json b/descriptions-next/ghec/dereferenced/ghec.2026-03-10.deref.json index f0deb8b20f..0a3a31f04a 100644 --- a/descriptions-next/ghec/dereferenced/ghec.2026-03-10.deref.json +++ b/descriptions-next/ghec/dereferenced/ghec.2026-03-10.deref.json @@ -326547,6 +326547,528 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + } + } + } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -343943,7 +344465,103 @@ "Location": { "example": "https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D", "schema": { - "type": "string" + "type": "string" + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "workflow-runs" + } + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + "post": { + "summary": "Cancel a workflow run", + "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/cancel-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/workflow-runs#cancel-a-workflow-run" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "The unique identifier of the workflow run.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } } } } @@ -343957,17 +344575,17 @@ } } }, - "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { - "post": { - "summary": "Cancel a workflow run", - "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", "tags": [ "actions" ], - "operationId": "actions/cancel-workflow-run", + "operationId": "actions/list-concurrency-groups-for-workflow-run", "externalDocs": { "description": "API method documentation", - "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/workflow-runs#cancel-a-workflow-run" + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" }, "parameters": [ { @@ -343996,30 +344614,221 @@ "schema": { "type": "integer" } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "before", + "description": "A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { - "202": { + "200": { "description": "Response", "content": { "application/json": { "schema": { - "title": "Empty Object", - "description": "An object without any properties.", + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", "type": "object", - "properties": {}, - "additionalProperties": false + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } }, "examples": { "default": { - "value": null + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } } } } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } } }, - "409": { - "description": "Conflict", + "404": { + "description": "Resource not found", "content": { "application/json": { "schema": { @@ -344043,13 +344852,88 @@ } } } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "actions", - "subcategory": "workflow-runs" + "subcategory": "concurrency-groups" } } }, diff --git a/descriptions-next/ghec/dereferenced/ghec.2026-03-10.deref.yaml b/descriptions-next/ghec/dereferenced/ghec.2026-03-10.deref.yaml index 74985f54ea..aa4987767c 100644 --- a/descriptions-next/ghec/dereferenced/ghec.2026-03-10.deref.yaml +++ b/descriptions-next/ghec/dereferenced/ghec.2026-03-10.deref.yaml @@ -68303,6 +68303,245 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - *465 + - *466 + - *17 + - *109 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + headers: + Link: *45 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - *465 + - *466 + - name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item + represents a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -71365,6 +71604,198 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - *465 + - *466 + - *489 + - *17 + - *108 + - *109 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow + run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds + the concurrency lease (in_progress), 1 or higher + means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item + in the concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the + item represents a job-level or reusable-workflow-level + lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 + headers: + Link: *45 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run diff --git a/descriptions-next/ghec/dereferenced/ghec.deref.json b/descriptions-next/ghec/dereferenced/ghec.deref.json index 43ae0154d1..1747936dee 100644 --- a/descriptions-next/ghec/dereferenced/ghec.deref.json +++ b/descriptions-next/ghec/dereferenced/ghec.deref.json @@ -342467,6 +342467,528 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + } + } + } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, + "examples": { + "default": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + } + } + } + } + }, + "404": { + "description": "Resource not found", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } + } + } + } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -360191,7 +360713,103 @@ "Location": { "example": "https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D", "schema": { - "type": "string" + "type": "string" + } + } + } + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "workflow-runs" + } + } + }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { + "post": { + "summary": "Cancel a workflow run", + "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "tags": [ + "actions" + ], + "operationId": "actions/cancel-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/workflow-runs#cancel-a-workflow-run" + }, + "parameters": [ + { + "name": "owner", + "description": "The account owner of the repository. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "description": "The name of the repository without the `.git` extension. The name is not case sensitive.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "description": "The unique identifier of the workflow run.", + "in": "path", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "202": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "title": "Empty Object", + "description": "An object without any properties.", + "type": "object", + "properties": {}, + "additionalProperties": false + }, + "examples": { + "default": { + "value": null + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "title": "Basic Error", + "description": "Basic Error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "url": { + "type": "string" + }, + "status": { + "type": "string" + } + } } } } @@ -360205,17 +360823,17 @@ } } }, - "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": { - "post": { - "summary": "Cancel a workflow run", - "description": "Cancels a workflow run using its `id`.\n\nOAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.", + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", "tags": [ "actions" ], - "operationId": "actions/cancel-workflow-run", + "operationId": "actions/list-concurrency-groups-for-workflow-run", "externalDocs": { "description": "API method documentation", - "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/workflow-runs#cancel-a-workflow-run" + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" }, "parameters": [ { @@ -360244,30 +360862,221 @@ "schema": { "type": "integer" } + }, + { + "name": "per_page", + "description": "The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "schema": { + "type": "integer", + "default": 30 + } + }, + { + "name": "before", + "description": "A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "after", + "description": "A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see \"[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"", + "in": "query", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { - "202": { + "200": { "description": "Response", "content": { "application/json": { "schema": { - "title": "Empty Object", - "description": "An object without any properties.", + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", "type": "object", - "properties": {}, - "additionalProperties": false + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } }, "examples": { "default": { - "value": null + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } } } } + }, + "headers": { + "Link": { + "example": "; rel=\"next\", ; rel=\"last\"", + "schema": { + "type": "string" + } + } } }, - "409": { - "description": "Conflict", + "404": { + "description": "Resource not found", "content": { "application/json": { "schema": { @@ -360291,13 +361100,88 @@ } } } + }, + "422": { + "description": "Validation failed, or the endpoint has been spammed.", + "content": { + "application/json": { + "schema": { + "title": "Validation Error", + "description": "Validation Error", + "type": "object", + "required": [ + "message", + "documentation_url" + ], + "properties": { + "message": { + "type": "string" + }, + "documentation_url": { + "type": "string" + }, + "errors": { + "type": "array", + "items": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "resource": { + "type": "string" + }, + "field": { + "type": "string" + }, + "message": { + "type": "string" + }, + "code": { + "type": "string" + }, + "index": { + "type": "integer" + }, + "value": { + "oneOf": [ + { + "type": [ + "string", + "null" + ] + }, + { + "type": [ + "integer", + "null" + ] + }, + { + "type": [ + "array", + "null" + ], + "items": { + "type": "string" + } + } + ] + } + } + } + } + } + } + } + } } }, "x-github": { "githubCloudOnly": false, "enabledForGitHubApps": true, "category": "actions", - "subcategory": "workflow-runs" + "subcategory": "concurrency-groups" } } }, diff --git a/descriptions-next/ghec/dereferenced/ghec.deref.yaml b/descriptions-next/ghec/dereferenced/ghec.deref.yaml index 4f4ea74edf..2d0b099f0b 100644 --- a/descriptions-next/ghec/dereferenced/ghec.deref.yaml +++ b/descriptions-next/ghec/dereferenced/ghec.deref.yaml @@ -69366,6 +69366,245 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - *465 + - *466 + - *17 + - *109 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + headers: + Link: *45 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - *465 + - *466 + - name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item + represents a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -72428,6 +72667,198 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - *465 + - *466 + - *489 + - *17 + - *108 + - *109 + responses: + '200': + description: Response + content: + application/json: + schema: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow + run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds + the concurrency lease (in_progress), 1 or higher + means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item + in the concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the + item represents a job-level or reusable-workflow-level + lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending + examples: + default: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 + headers: + Link: *45 + '404': *6 + '422': *15 + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run diff --git a/descriptions-next/ghec/ghec.2022-11-28.json b/descriptions-next/ghec/ghec.2022-11-28.json index b91da73f96..d0f7f6134e 100644 --- a/descriptions-next/ghec/ghec.2022-11-28.json +++ b/descriptions-next/ghec/ghec.2022-11-28.json @@ -47924,6 +47924,139 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/concurrency-group-name" + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -50337,6 +50470,74 @@ } } }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/run-id" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-before" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-run-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-run-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { "post": { "summary": "Review custom deployment protection rules for a workflow run", @@ -153120,6 +153321,144 @@ "actions_caches" ] }, + "concurrency-group-list": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "concurrency-group": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, "job": { "title": "Job", "description": "Information of a job execution in a workflow run", @@ -154052,6 +154391,131 @@ "comment" ] }, + "concurrency-group-run-list": { + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } + }, "review-custom-gates-comment-required": { "type": "object", "properties": { @@ -337903,6 +338367,57 @@ ] } }, + "concurrency-group-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + }, + "concurrency-group": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + }, "job": { "value": { "id": 399444496, @@ -338691,6 +339206,47 @@ ] } }, + "concurrency-group-run-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } + }, "pending-deployment-items": { "value": [ { @@ -359656,6 +360212,15 @@ "type": "integer" } }, + "concurrency-group-name": { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, "job-id": { "name": "job_id", "description": "The unique identifier of the job.", diff --git a/descriptions-next/ghec/ghec.2022-11-28.yaml b/descriptions-next/ghec/ghec.2022-11-28.yaml index 8752a5622a..53c2136124 100644 --- a/descriptions-next/ghec/ghec.2022-11-28.yaml +++ b/descriptions-next/ghec/ghec.2022-11-28.yaml @@ -34847,6 +34847,111 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-list" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/concurrency-group-name" + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group" + examples: + default: + "$ref": "#/components/examples/concurrency-group" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -36557,6 +36662,64 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-run-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-run-list" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run @@ -111172,6 +111335,112 @@ components: required: - total_count - actions_caches + concurrency-group-list: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + concurrency-group: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending job: title: Job description: Information of a job execution in a workflow run @@ -111876,6 +112145,116 @@ components: - state - user - comment + concurrency-group-run-list: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds the concurrency + lease (in_progress), 1 or higher means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item in the + concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending review-custom-gates-comment-required: type: object properties: @@ -249650,6 +250029,41 @@ components: last_accessed_at: '2019-01-24T22:45:36.000Z' created_at: '2019-01-24T22:45:36.000Z' size_in_bytes: 1024 + concurrency-group-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + concurrency-group: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending job: value: id: 399444496 @@ -250326,6 +250740,34 @@ components: runner_group_name: my runner group workflow_name: CI head_branch: main + concurrency-group-run-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 pending-deployment-items: value: - environment: @@ -268399,6 +268841,13 @@ components: required: true schema: type: integer + concurrency-group-name: + name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string job-id: name: job_id description: The unique identifier of the job. diff --git a/descriptions-next/ghec/ghec.2026-03-10.json b/descriptions-next/ghec/ghec.2026-03-10.json index 21b7a6c19f..0a0f94783a 100644 --- a/descriptions-next/ghec/ghec.2026-03-10.json +++ b/descriptions-next/ghec/ghec.2026-03-10.json @@ -47855,6 +47855,139 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/concurrency-group-name" + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -50268,6 +50401,74 @@ } } }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/run-id" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-before" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-run-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-run-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { "post": { "summary": "Review custom deployment protection rules for a workflow run", @@ -152460,6 +152661,144 @@ "actions_caches" ] }, + "concurrency-group-list": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "concurrency-group": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, "job": { "title": "Job", "description": "Information of a job execution in a workflow run", @@ -153392,6 +153731,131 @@ "comment" ] }, + "concurrency-group-run-list": { + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } + }, "review-custom-gates-comment-required": { "type": "object", "properties": { @@ -337033,6 +337497,57 @@ ] } }, + "concurrency-group-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + }, + "concurrency-group": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + }, "job": { "value": { "id": 399444496, @@ -337821,6 +338336,47 @@ ] } }, + "concurrency-group-run-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } + }, "pending-deployment-items": { "value": [ { @@ -358696,6 +359252,15 @@ "type": "integer" } }, + "concurrency-group-name": { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, "job-id": { "name": "job_id", "description": "The unique identifier of the job.", diff --git a/descriptions-next/ghec/ghec.2026-03-10.yaml b/descriptions-next/ghec/ghec.2026-03-10.yaml index a35a835a94..519a08aa3d 100644 --- a/descriptions-next/ghec/ghec.2026-03-10.yaml +++ b/descriptions-next/ghec/ghec.2026-03-10.yaml @@ -34796,6 +34796,111 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-list" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/concurrency-group-name" + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group" + examples: + default: + "$ref": "#/components/examples/concurrency-group" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -36506,6 +36611,64 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-run-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-run-list" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run @@ -110688,6 +110851,112 @@ components: required: - total_count - actions_caches + concurrency-group-list: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + concurrency-group: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending job: title: Job description: Information of a job execution in a workflow run @@ -111392,6 +111661,116 @@ components: - state - user - comment + concurrency-group-run-list: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds the concurrency + lease (in_progress), 1 or higher means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item in the + concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending review-custom-gates-comment-required: type: object properties: @@ -248934,6 +249313,41 @@ components: last_accessed_at: '2019-01-24T22:45:36.000Z' created_at: '2019-01-24T22:45:36.000Z' size_in_bytes: 1024 + concurrency-group-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + concurrency-group: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending job: value: id: 399444496 @@ -249610,6 +250024,34 @@ components: runner_group_name: my runner group workflow_name: CI head_branch: main + concurrency-group-run-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 pending-deployment-items: value: - environment: @@ -267598,6 +268040,13 @@ components: required: true schema: type: integer + concurrency-group-name: + name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string job-id: name: job_id description: The unique identifier of the job. diff --git a/descriptions-next/ghec/ghec.json b/descriptions-next/ghec/ghec.json index 6e88bf10ba..563a4a55a4 100644 --- a/descriptions-next/ghec/ghec.json +++ b/descriptions-next/ghec/ghec.json @@ -48162,6 +48162,139 @@ } } }, + "/repos/{owner}/{repo}/actions/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a repository", + "description": "Lists the active concurrency groups for a repository.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": { + "get": { + "summary": "Get a concurrency group for a repository", + "description": "Gets a specific concurrency group for a repository, including all instances in the group's queue.\nReturns 404 if the group is inactive or does not exist.\n\nOptionally, pass `ahead_of_run` or `ahead_of_job` to filter the results to only the items\nahead of the specified workflow run or job in the queue, plus the specified item itself\n(returned as the last element). This is useful for determining what is blocking a particular\nrun or job. Returns 422 if the specified run or job is not in this concurrency group.\n\nWhen using `ahead_of_run`, this matches workflow-level concurrency and any reusable-workflow\nleases held on behalf of that run. Job-level leases within the run are not considered to\nblock the run as a whole. Use `ahead_of_job` to match job-level concurrency and reusable-workflow\nleases on the job's ancestor paths.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/get-concurrency-group-for-repository", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/concurrency-group-name" + }, + { + "name": "ahead_of_run", + "description": "Filter to items ahead of this workflow run ID in the queue, plus the run itself.\nMatches workflow-level concurrency and reusable-workflow leases held on behalf of\nthe run. Mutually exclusive with `ahead_of_job`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "ahead_of_job", + "description": "Filter to items ahead of this job ID in the queue, plus the job itself.\nMatches job-level concurrency and reusable-workflow leases on the job's\nancestor paths. Mutually exclusive with `ahead_of_run`.", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group" + } + } + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/jobs/{job_id}": { "get": { "summary": "Get a job for a workflow run", @@ -50575,6 +50708,74 @@ } } }, + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": { + "get": { + "summary": "List concurrency groups for a workflow run", + "description": "Lists all concurrency groups associated with a workflow run or its jobs.\n\nThe set of groups is derived from the run's configuration, so a group is\nincluded even when the run no longer has any items currently holding or\nwaiting in it. In that case the `group_members` array will be empty.\n`total_count` reflects the number of groups the run participates in by\nconfiguration, not the number with active items.\n\nThis differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`,\nwhich returns 404 when a group has no active items. That endpoint reports\nthe live state of a group repo-wide, while this endpoint reports the\ngroups associated with a specific run by configuration.\n\nResults are sorted by group name and support cursor-based pagination via\n`before` and `after`. The `after` cursor paginates forward only and does\nnot emit a `rel=\"prev\"` Link; use `before` to page backward from a\nforward page's `next` cursor.\n\nOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.", + "tags": [ + "actions" + ], + "operationId": "actions/list-concurrency-groups-for-workflow-run", + "externalDocs": { + "description": "API method documentation", + "url": "https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run" + }, + "parameters": [ + { + "$ref": "#/components/parameters/owner" + }, + { + "$ref": "#/components/parameters/repo" + }, + { + "$ref": "#/components/parameters/run-id" + }, + { + "$ref": "#/components/parameters/per-page" + }, + { + "$ref": "#/components/parameters/pagination-before" + }, + { + "$ref": "#/components/parameters/pagination-after" + } + ], + "responses": { + "200": { + "description": "Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/concurrency-group-run-list" + }, + "examples": { + "default": { + "$ref": "#/components/examples/concurrency-group-run-list" + } + } + } + }, + "headers": { + "Link": { + "$ref": "#/components/headers/link" + } + } + }, + "404": { + "$ref": "#/components/responses/not_found" + }, + "422": { + "$ref": "#/components/responses/validation_failed" + } + }, + "x-github": { + "githubCloudOnly": false, + "enabledForGitHubApps": true, + "category": "actions", + "subcategory": "concurrency-groups" + } + } + }, "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": { "post": { "summary": "Review custom deployment protection rules for a workflow run", @@ -154157,6 +154358,144 @@ "actions_caches" ] }, + "concurrency-group-list": { + "title": "Concurrency Group List", + "description": "A list of active concurrency groups for a repository.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer" + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "last_acquired_at" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "last_acquired_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + } + } + } + } + } + }, + "concurrency-group": { + "title": "Concurrency Group", + "description": "A concurrency group with the workflow runs and jobs that are either currently holding\nor waiting for the concurrency group lease.", + "type": "object", + "required": [ + "group_name", + "group_url", + "total_count", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group." + }, + "total_count": { + "type": "integer" + }, + "group_members": { + "type": "array", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "job_id": { + "type": "integer", + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": "string", + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + }, "job": { "title": "Job", "description": "Information of a job execution in a workflow run", @@ -155089,6 +155428,131 @@ "comment" ] }, + "concurrency-group-run-list": { + "title": "Concurrency Group Run List", + "description": "A list of concurrency groups associated with a workflow run.", + "type": "object", + "required": [ + "total_count", + "concurrency_groups" + ], + "properties": { + "total_count": { + "type": "integer", + "description": "The total number of concurrency groups this workflow run participates in,\nderived from the run's configuration. This count is not filtered by\nwhether the run currently holds or is waiting in each group, so it can\ninclude groups whose `group_members` array is empty (for example, when\nthe run has already released its lease in that group)." + }, + "concurrency_groups": { + "type": "array", + "items": { + "type": "object", + "required": [ + "group_name", + "group_url", + "group_members" + ], + "properties": { + "group_name": { + "type": "string", + "description": "The name of the concurrency group." + }, + "group_url": { + "type": "string", + "format": "uri", + "description": "API URL for this concurrency group. May return 404 if the group\nhas no active items at the time it is requested, since the\nget-by-name endpoint reports the live repo-wide state of a group\nwhile this endpoint lists groups associated with a run by\nconfiguration." + }, + "group_members": { + "type": "array", + "description": "Items belonging to this workflow run that are either currently holding or\nwaiting for the concurrency group lease. May be empty if the run no\nlonger has any active or queued items in this group.", + "items": { + "type": "object", + "required": [ + "run_id", + "run_name", + "run_url", + "run_html_url", + "status", + "position", + "position_url" + ], + "properties": { + "run_id": { + "type": "integer", + "description": "The ID of the workflow run." + }, + "run_name": { + "type": "string", + "description": "The name of the workflow run." + }, + "run_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the workflow run." + }, + "run_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the workflow run." + }, + "position": { + "type": "integer", + "description": "Queue position. 0 means the item holds the concurrency lease (in_progress), 1 or higher means queued (pending)." + }, + "position_url": { + "type": "string", + "format": "uri", + "description": "API URL to get items ahead of this item in the concurrency group." + }, + "job_id": { + "type": [ + "integer", + "null" + ], + "description": "The ID of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_name": { + "type": [ + "string", + "null" + ], + "description": "The display name of the job, when the item represents a job-level or reusable-workflow-level lease." + }, + "job_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "API URL for the job." + }, + "job_html_url": { + "type": [ + "string", + "null" + ], + "format": "uri", + "description": "Web URL for the job." + }, + "status": { + "type": "string", + "enum": [ + "in_progress", + "pending" + ] + } + } + } + } + } + } + } + } + }, "review-custom-gates-comment-required": { "type": "object", "properties": { @@ -339913,6 +340377,57 @@ ] } }, + "concurrency-group-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "last_acquired_at": "2026-01-15T16:14:23Z" + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "last_acquired_at": "2026-01-15T16:13:55Z" + } + ] + } + }, + "concurrency-group": { + "value": { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "total_count": 3, + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress" + }, + { + "run_id": 30433643, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433643", + "status": "pending" + }, + { + "run_id": 30433644, + "run_name": "Deploy hotfix", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644", + "job_id": 798245260, + "job_name": "deploy", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260", + "status": "pending" + } + ] + } + }, "job": { "value": { "id": 399444496, @@ -340701,6 +341216,47 @@ ] } }, + "concurrency-group-run-list": { + "value": { + "total_count": 2, + "concurrency_groups": [ + { + "group_name": "deploy-prod", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "in_progress", + "position": 0, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642" + } + ] + }, + { + "group_name": "ci-build", + "group_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build", + "group_members": [ + { + "run_id": 30433642, + "run_name": "Deploy to production", + "run_url": "https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642", + "run_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642", + "status": "pending", + "position": 2, + "position_url": "https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260", + "job_id": 798245260, + "job_name": "build", + "job_url": "https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260", + "job_html_url": "https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260" + } + ] + } + ] + } + }, "pending-deployment-items": { "value": [ { @@ -361794,6 +362350,15 @@ "type": "integer" } }, + "concurrency-group-name": { + "name": "concurrency_group_name", + "description": "The name of the concurrency group.", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, "job-id": { "name": "job_id", "description": "The unique identifier of the job.", diff --git a/descriptions-next/ghec/ghec.yaml b/descriptions-next/ghec/ghec.yaml index d0511e844d..1b54825454 100644 --- a/descriptions-next/ghec/ghec.yaml +++ b/descriptions-next/ghec/ghec.yaml @@ -34974,6 +34974,111 @@ paths: enabledForGitHubApps: true category: actions subcategory: cache + "/repos/{owner}/{repo}/actions/concurrency_groups": + get: + summary: List concurrency groups for a repository + description: |- + 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. + tags: + - actions + operationId: actions/list-concurrency-groups-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-list" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups + "/repos/{owner}/{repo}/actions/concurrency_groups/{concurrency_group_name}": + get: + summary: Get a concurrency group for a repository + description: |- + 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. + tags: + - actions + operationId: actions/get-concurrency-group-for-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#get-a-concurrency-group-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/concurrency-group-name" + - name: ahead_of_run + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + - name: ahead_of_job + description: |- + 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`. + in: query + required: false + schema: + type: integer + minimum: 1 + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group" + examples: + default: + "$ref": "#/components/examples/concurrency-group" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/jobs/{job_id}": get: summary: Get a job for a workflow run @@ -36684,6 +36789,64 @@ paths: enabledForGitHubApps: true category: actions subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/concurrency_groups": + get: + summary: List concurrency groups for a workflow run + description: |- + Lists all concurrency groups associated with a workflow run or its jobs. + + The set of groups is derived from the run's configuration, so a group is + included even when the run no longer has any items currently holding or + waiting in it. In that case the `group_members` array will be empty. + `total_count` reflects the number of groups the run participates in by + configuration, not the number with active items. + + This differs from `GET /repos/{owner}/{repo}/actions/concurrency_groups/{group_name}`, + which returns 404 when a group has no active items. That endpoint reports + the live state of a group repo-wide, while this endpoint reports the + groups associated with a specific run by configuration. + + Results are sorted by group name and support cursor-based pagination via + `before` and `after`. The `after` cursor paginates forward only and does + not emit a `rel="prev"` Link; use `before` to page backward from a + forward page's `next` cursor. + + OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + tags: + - actions + operationId: actions/list-concurrency-groups-for-workflow-run + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-cloud@latest/rest/actions/concurrency-groups#list-concurrency-groups-for-a-workflow-run + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/concurrency-group-run-list" + examples: + default: + "$ref": "#/components/examples/concurrency-group-run-list" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: concurrency-groups "/repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule": post: summary: Review custom deployment protection rules for a workflow run @@ -111890,6 +112053,112 @@ components: required: - total_count - actions_caches + concurrency-group-list: + title: Concurrency Group List + description: A list of active concurrency groups for a repository. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - last_acquired_at + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + last_acquired_at: + type: + - string + - 'null' + format: date-time + concurrency-group: + title: Concurrency Group + description: |- + A concurrency group with the workflow runs and jobs that are either currently holding + or waiting for the concurrency group lease. + type: object + required: + - group_name + - group_url + - total_count + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: API URL for this concurrency group. + total_count: + type: integer + group_members: + type: array + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + job_id: + type: integer + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: string + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending job: title: Job description: Information of a job execution in a workflow run @@ -112594,6 +112863,116 @@ components: - state - user - comment + concurrency-group-run-list: + title: Concurrency Group Run List + description: A list of concurrency groups associated with a workflow run. + type: object + required: + - total_count + - concurrency_groups + properties: + total_count: + type: integer + description: |- + The total number of concurrency groups this workflow run participates in, + derived from the run's configuration. This count is not filtered by + whether the run currently holds or is waiting in each group, so it can + include groups whose `group_members` array is empty (for example, when + the run has already released its lease in that group). + concurrency_groups: + type: array + items: + type: object + required: + - group_name + - group_url + - group_members + properties: + group_name: + type: string + description: The name of the concurrency group. + group_url: + type: string + format: uri + description: |- + API URL for this concurrency group. May return 404 if the group + has no active items at the time it is requested, since the + get-by-name endpoint reports the live repo-wide state of a group + while this endpoint lists groups associated with a run by + configuration. + group_members: + type: array + description: |- + Items belonging to this workflow run that are either currently holding or + waiting for the concurrency group lease. May be empty if the run no + longer has any active or queued items in this group. + items: + type: object + required: + - run_id + - run_name + - run_url + - run_html_url + - status + - position + - position_url + properties: + run_id: + type: integer + description: The ID of the workflow run. + run_name: + type: string + description: The name of the workflow run. + run_url: + type: + - string + - 'null' + format: uri + description: API URL for the workflow run. + run_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the workflow run. + position: + type: integer + description: Queue position. 0 means the item holds the concurrency + lease (in_progress), 1 or higher means queued (pending). + position_url: + type: string + format: uri + description: API URL to get items ahead of this item in the + concurrency group. + job_id: + type: + - integer + - 'null' + description: The ID of the job, when the item represents a job-level + or reusable-workflow-level lease. + job_name: + type: + - string + - 'null' + description: The display name of the job, when the item represents + a job-level or reusable-workflow-level lease. + job_url: + type: + - string + - 'null' + format: uri + description: API URL for the job. + job_html_url: + type: + - string + - 'null' + format: uri + description: Web URL for the job. + status: + type: string + enum: + - in_progress + - pending review-custom-gates-comment-required: type: object properties: @@ -250938,6 +251317,41 @@ components: last_accessed_at: '2019-01-24T22:45:36.000Z' created_at: '2019-01-24T22:45:36.000Z' size_in_bytes: 1024 + concurrency-group-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + last_acquired_at: '2026-01-15T16:14:23Z' + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + last_acquired_at: '2026-01-15T16:13:55Z' + concurrency-group: + value: + group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + total_count: 3 + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + - run_id: 30433643 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433643 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433643 + status: pending + - run_id: 30433644 + run_name: Deploy hotfix + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433644 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644 + job_id: 798245260 + job_name: deploy + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433644/job/798245260 + status: pending job: value: id: 399444496 @@ -251614,6 +252028,34 @@ components: runner_group_name: my runner group workflow_name: CI head_branch: main + concurrency-group-run-list: + value: + total_count: 2 + concurrency_groups: + - group_name: deploy-prod + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: in_progress + position: 0 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/deploy-prod?ahead_of_run=30433642 + - group_name: ci-build + group_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build + group_members: + - run_id: 30433642 + run_name: Deploy to production + run_url: https://api.github.com/repos/octocat/Hello-World/actions/runs/30433642 + run_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642 + status: pending + position: 2 + position_url: https://api.github.com/repos/octocat/Hello-World/actions/concurrency_groups/ci-build?ahead_of_job=798245260 + job_id: 798245260 + job_name: build + job_url: https://api.github.com/repos/octocat/Hello-World/actions/jobs/798245260 + job_html_url: https://github.com/octocat/Hello-World/actions/runs/30433642/job/798245260 pending-deployment-items: value: - environment: @@ -269751,6 +270193,13 @@ components: required: true schema: type: integer + concurrency-group-name: + name: concurrency_group_name + description: The name of the concurrency group. + in: path + required: true + schema: + type: string job-id: name: job_id description: The unique identifier of the job.