Update checked-in dependencies

This commit is contained in:
github-actions[bot] 2025-04-21 18:01:41 +00:00
parent c9f0d30a86
commit 95d52b7807
647 changed files with 498055 additions and 3880 deletions

View file

@ -1,4 +1,4 @@
const VERSION = "6.1.4";
const VERSION = "6.1.5";
export {
VERSION
};

View file

@ -41,4 +41,9 @@ export type Hooks = {
Error: unknown;
};
};
export type StrictOmit<T, K extends keyof T> = {
[P in keyof T as P extends K ? never : P]: T[P];
} & {
[parameter: string]: unknown;
};
export {};

View file

@ -1 +1 @@
export declare const VERSION = "6.1.4";
export declare const VERSION = "6.1.5";

View file

@ -1,6 +1,6 @@
{
"name": "@octokit/core",
"version": "6.1.4",
"version": "6.1.5",
"publishConfig": {
"access": "public",
"provenance": true
@ -19,10 +19,10 @@
"license": "MIT",
"dependencies": {
"@octokit/auth-token": "^5.0.0",
"@octokit/graphql": "^8.1.2",
"@octokit/request": "^9.2.1",
"@octokit/request-error": "^6.1.7",
"@octokit/types": "^13.6.2",
"@octokit/graphql": "^8.2.2",
"@octokit/request": "^9.2.3",
"@octokit/request-error": "^6.1.8",
"@octokit/types": "^14.0.0",
"before-after-hook": "^3.0.2",
"universal-user-agent": "^7.0.0"
},
@ -39,10 +39,10 @@
"esbuild": "^0.25.0",
"fetch-mock": "^12.0.0",
"glob": "^11.0.0",
"prettier": "3.4.2",
"prettier": "3.5.3",
"proxy": "^2.0.0",
"semantic-release": "^24.0.0",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"semantic-release-plugin-update-version-in-files": "^2.0.0",
"typescript": "^5.0.0",
"undici": "^6.0.0",
"vitest": "^3.0.5"

View file

@ -1,4 +1,4 @@
const VERSION = "8.2.1";
const VERSION = "8.2.2";
export {
VERSION
};

View file

@ -1 +1 @@
export declare const VERSION = "8.2.1";
export declare const VERSION = "8.2.2";

View file

@ -1,6 +1,6 @@
{
"name": "@octokit/graphql",
"version": "8.2.1",
"version": "8.2.2",
"publishConfig": {
"access": "public",
"provenance": true
@ -17,20 +17,19 @@
"author": "Gregor Martynus (https://github.com/gr2m)",
"license": "MIT",
"dependencies": {
"@octokit/request": "^9.2.2",
"@octokit/types": "^13.8.0",
"@octokit/request": "^9.2.3",
"@octokit/types": "^14.0.0",
"universal-user-agent": "^7.0.0"
},
"devDependencies": {
"@octokit/tsconfig": "^4.0.0",
"@types/fetch-mock": "^7.2.5",
"@types/node": "^22.0.0",
"@vitest/coverage-v8": "^3.0.0",
"esbuild": "^0.25.0",
"fetch-mock": "^12.0.0",
"glob": "^11.0.0",
"prettier": "3.4.2",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"prettier": "3.5.3",
"semantic-release-plugin-update-version-in-files": "^2.0.0",
"typescript": "^5.3.0",
"vitest": "^3.0.0"
},

View file

@ -132,8 +132,10 @@ var paginatingEndpoints = [
"GET /notifications",
"GET /organizations",
"GET /orgs/{org}/actions/cache/usage-by-repository",
"GET /orgs/{org}/actions/hosted-runners",
"GET /orgs/{org}/actions/permissions/repositories",
"GET /orgs/{org}/actions/runner-groups",
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners",
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners",
"GET /orgs/{org}/actions/runners",
@ -143,6 +145,7 @@ var paginatingEndpoints = [
"GET /orgs/{org}/actions/variables/{name}/repositories",
"GET /orgs/{org}/attestations/{subject_digest}",
"GET /orgs/{org}/blocks",
"GET /orgs/{org}/campaigns",
"GET /orgs/{org}/code-scanning/alerts",
"GET /orgs/{org}/code-security/configurations",
"GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories",
@ -151,7 +154,6 @@ var paginatingEndpoints = [
"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories",
"GET /orgs/{org}/copilot/billing/seats",
"GET /orgs/{org}/copilot/metrics",
"GET /orgs/{org}/copilot/usage",
"GET /orgs/{org}/dependabot/alerts",
"GET /orgs/{org}/dependabot/secrets",
"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories",
@ -186,10 +188,11 @@ var paginatingEndpoints = [
"GET /orgs/{org}/repos",
"GET /orgs/{org}/rulesets",
"GET /orgs/{org}/rulesets/rule-suites",
"GET /orgs/{org}/rulesets/{ruleset_id}/history",
"GET /orgs/{org}/secret-scanning/alerts",
"GET /orgs/{org}/security-advisories",
"GET /orgs/{org}/settings/network-configurations",
"GET /orgs/{org}/team/{team_slug}/copilot/metrics",
"GET /orgs/{org}/team/{team_slug}/copilot/usage",
"GET /orgs/{org}/teams",
"GET /orgs/{org}/teams/{team_slug}/discussions",
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments",
@ -284,6 +287,7 @@ var paginatingEndpoints = [
"GET /repos/{owner}/{repo}/rules/branches/{branch}",
"GET /repos/{owner}/{repo}/rulesets",
"GET /repos/{owner}/{repo}/rulesets/rule-suites",
"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history",
"GET /repos/{owner}/{repo}/secret-scanning/alerts",
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations",
"GET /repos/{owner}/{repo}/security-advisories",

File diff suppressed because one or more lines are too long

View file

@ -28,8 +28,10 @@ const paginatingEndpoints = [
"GET /notifications",
"GET /organizations",
"GET /orgs/{org}/actions/cache/usage-by-repository",
"GET /orgs/{org}/actions/hosted-runners",
"GET /orgs/{org}/actions/permissions/repositories",
"GET /orgs/{org}/actions/runner-groups",
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners",
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners",
"GET /orgs/{org}/actions/runners",
@ -39,6 +41,7 @@ const paginatingEndpoints = [
"GET /orgs/{org}/actions/variables/{name}/repositories",
"GET /orgs/{org}/attestations/{subject_digest}",
"GET /orgs/{org}/blocks",
"GET /orgs/{org}/campaigns",
"GET /orgs/{org}/code-scanning/alerts",
"GET /orgs/{org}/code-security/configurations",
"GET /orgs/{org}/code-security/configurations/{configuration_id}/repositories",
@ -47,7 +50,6 @@ const paginatingEndpoints = [
"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories",
"GET /orgs/{org}/copilot/billing/seats",
"GET /orgs/{org}/copilot/metrics",
"GET /orgs/{org}/copilot/usage",
"GET /orgs/{org}/dependabot/alerts",
"GET /orgs/{org}/dependabot/secrets",
"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories",
@ -82,10 +84,11 @@ const paginatingEndpoints = [
"GET /orgs/{org}/repos",
"GET /orgs/{org}/rulesets",
"GET /orgs/{org}/rulesets/rule-suites",
"GET /orgs/{org}/rulesets/{ruleset_id}/history",
"GET /orgs/{org}/secret-scanning/alerts",
"GET /orgs/{org}/security-advisories",
"GET /orgs/{org}/settings/network-configurations",
"GET /orgs/{org}/team/{team_slug}/copilot/metrics",
"GET /orgs/{org}/team/{team_slug}/copilot/usage",
"GET /orgs/{org}/teams",
"GET /orgs/{org}/teams/{team_slug}/discussions",
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments",
@ -180,6 +183,7 @@ const paginatingEndpoints = [
"GET /repos/{owner}/{repo}/rules/branches/{branch}",
"GET /repos/{owner}/{repo}/rulesets",
"GET /repos/{owner}/{repo}/rulesets/rule-suites",
"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history",
"GET /repos/{owner}/{repo}/secret-scanning/alerts",
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations",
"GET /repos/{owner}/{repo}/security-advisories",

View file

@ -1,4 +1,4 @@
const VERSION = "11.4.2";
const VERSION = "12.0.0";
export {
VERSION
};

View file

@ -207,6 +207,15 @@ export interface PaginatingEndpoints {
data: Endpoints["GET /orgs/{org}/actions/cache/usage-by-repository"]["response"]["data"]["repository_cache_usages"];
};
};
/**
* @see https://docs.github.com/rest/actions/hosted-runners#list-github-hosted-runners-for-an-organization
*/
"GET /orgs/{org}/actions/hosted-runners": {
parameters: Endpoints["GET /orgs/{org}/actions/hosted-runners"]["parameters"];
response: Endpoints["GET /orgs/{org}/actions/hosted-runners"]["response"] & {
data: Endpoints["GET /orgs/{org}/actions/hosted-runners"]["response"]["data"]["runners"];
};
};
/**
* @see https://docs.github.com/rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization
*/
@ -225,6 +234,15 @@ export interface PaginatingEndpoints {
data: Endpoints["GET /orgs/{org}/actions/runner-groups"]["response"]["data"]["runner_groups"];
};
};
/**
* @see https://docs.github.com/rest/actions/self-hosted-runner-groups#list-github-hosted-runners-in-a-group-for-an-organization
*/
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners": {
parameters: Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners"]["parameters"];
response: Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners"]["response"] & {
data: Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners"]["response"]["data"]["runners"];
};
};
/**
* @see https://docs.github.com/rest/actions/self-hosted-runner-groups#list-repository-access-to-a-self-hosted-runner-group-in-an-organization
*/
@ -304,6 +322,13 @@ export interface PaginatingEndpoints {
parameters: Endpoints["GET /orgs/{org}/blocks"]["parameters"];
response: Endpoints["GET /orgs/{org}/blocks"]["response"];
};
/**
* @see https://docs.github.com/rest/campaigns/campaigns#list-campaigns-for-an-organization
*/
"GET /orgs/{org}/campaigns": {
parameters: Endpoints["GET /orgs/{org}/campaigns"]["parameters"];
response: Endpoints["GET /orgs/{org}/campaigns"]["response"];
};
/**
* @see https://docs.github.com/rest/code-scanning/code-scanning#list-code-scanning-alerts-for-an-organization
*/
@ -368,13 +393,6 @@ export interface PaginatingEndpoints {
parameters: Endpoints["GET /orgs/{org}/copilot/metrics"]["parameters"];
response: Endpoints["GET /orgs/{org}/copilot/metrics"]["response"];
};
/**
* @see https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-organization-members
*/
"GET /orgs/{org}/copilot/usage": {
parameters: Endpoints["GET /orgs/{org}/copilot/usage"]["parameters"];
response: Endpoints["GET /orgs/{org}/copilot/usage"]["response"];
};
/**
* @see https://docs.github.com/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization
*/
@ -623,6 +641,13 @@ export interface PaginatingEndpoints {
parameters: Endpoints["GET /orgs/{org}/rulesets/rule-suites"]["parameters"];
response: Endpoints["GET /orgs/{org}/rulesets/rule-suites"]["response"];
};
/**
* @see https://docs.github.com/rest/orgs/rules#get-organization-ruleset-history
*/
"GET /orgs/{org}/rulesets/{ruleset_id}/history": {
parameters: Endpoints["GET /orgs/{org}/rulesets/{ruleset_id}/history"]["parameters"];
response: Endpoints["GET /orgs/{org}/rulesets/{ruleset_id}/history"]["response"];
};
/**
* @see https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-an-organization
*/
@ -637,6 +662,15 @@ export interface PaginatingEndpoints {
parameters: Endpoints["GET /orgs/{org}/security-advisories"]["parameters"];
response: Endpoints["GET /orgs/{org}/security-advisories"]["response"];
};
/**
* @see https://docs.github.com/rest/orgs/network-configurations#list-hosted-compute-network-configurations-for-an-organization
*/
"GET /orgs/{org}/settings/network-configurations": {
parameters: Endpoints["GET /orgs/{org}/settings/network-configurations"]["parameters"];
response: Endpoints["GET /orgs/{org}/settings/network-configurations"]["response"] & {
data: Endpoints["GET /orgs/{org}/settings/network-configurations"]["response"]["data"]["network_configurations"];
};
};
/**
* @see https://docs.github.com/rest/copilot/copilot-metrics#get-copilot-metrics-for-a-team
*/
@ -644,13 +678,6 @@ export interface PaginatingEndpoints {
parameters: Endpoints["GET /orgs/{org}/team/{team_slug}/copilot/metrics"]["parameters"];
response: Endpoints["GET /orgs/{org}/team/{team_slug}/copilot/metrics"]["response"];
};
/**
* @see https://docs.github.com/rest/copilot/copilot-usage#get-a-summary-of-copilot-usage-for-a-team
*/
"GET /orgs/{org}/team/{team_slug}/copilot/usage": {
parameters: Endpoints["GET /orgs/{org}/team/{team_slug}/copilot/usage"]["parameters"];
response: Endpoints["GET /orgs/{org}/team/{team_slug}/copilot/usage"]["response"];
};
/**
* @see https://docs.github.com/rest/teams/teams#list-teams
*/
@ -1363,6 +1390,13 @@ export interface PaginatingEndpoints {
parameters: Endpoints["GET /repos/{owner}/{repo}/rulesets/rule-suites"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/rulesets/rule-suites"]["response"];
};
/**
* @see https://docs.github.com/rest/repos/rules#get-repository-ruleset-history
*/
"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history": {
parameters: Endpoints["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history"]["response"];
};
/**
* @see https://docs.github.com/rest/secret-scanning/secret-scanning#list-secret-scanning-alerts-for-a-repository
*/

View file

@ -3,11 +3,12 @@ import type * as OctokitTypes from "@octokit/types";
export type { EndpointOptions, RequestInterface, OctokitResponse, RequestParameters, Route, } from "@octokit/types";
export type { PaginatingEndpoints } from "./generated/paginating-endpoints.js";
import type { PaginatingEndpoints } from "./generated/paginating-endpoints.js";
type PaginationMetadataKeys = "repository_selection" | "total_count" | "incomplete_results";
type KnownKeys<T> = Extract<{
[K in keyof T]: string extends K ? never : number extends K ? never : K;
} extends {
[_ in keyof T]: infer U;
} ? U : never, Exclude<keyof T, "repository_selection" | "total_count" | "incomplete_results">>;
} ? U : never, Exclude<keyof T, PaginationMetadataKeys>>;
type KeysMatching<T, V> = {
[K in keyof T]: T[K] extends V ? K : never;
}[keyof T];
@ -19,9 +20,9 @@ type GetResultsType<T> = T extends {
} ? T["data"][KnownKeysMatching<T["data"], any[]>] : never;
type GetPaginationKeys<T> = T extends {
data: any[];
} ? T : T extends {
} ? {} : T extends {
data: object;
} ? Pick<T["data"], Extract<keyof T["data"], "repository_selection" | "total_count" | "incomplete_results">> : never;
} ? Pick<T["data"], Extract<keyof T["data"], PaginationMetadataKeys>> : never;
type NormalizeResponse<T> = Omit<T, "data"> & {
data: GetResultsType<T> & GetPaginationKeys<T>;
};

View file

@ -1 +1 @@
export declare const VERSION = "11.4.2";
export declare const VERSION = "12.0.0";

View file

@ -5,7 +5,7 @@
"provenance": true
},
"type": "module",
"version": "11.4.2",
"version": "12.0.0",
"description": "Octokit plugin to paginate REST API endpoint responses",
"repository": "github:octokit/plugin-paginate-rest.js",
"keywords": [
@ -16,14 +16,14 @@
],
"license": "MIT",
"dependencies": {
"@octokit/types": "^13.7.0"
"@octokit/types": "^14.0.0"
},
"peerDependencies": {
"@octokit/core": ">=6"
},
"devDependencies": {
"@octokit/core": "^6.1.3",
"@octokit/plugin-rest-endpoint-methods": "^13.3.0",
"@octokit/core": "^6.1.5",
"@octokit/plugin-rest-endpoint-methods": "^14.0.0",
"@octokit/tsconfig": "^4.0.0",
"@types/node": "^22.0.0",
"@vitest/coverage-v8": "^3.0.0",
@ -32,8 +32,8 @@
"github-openapi-graphql-query": "^4.0.0",
"glob": "^11.0.0",
"npm-run-all2": "^7.0.0",
"prettier": "3.5.1",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"prettier": "3.5.3",
"semantic-release-plugin-update-version-in-files": "^2.0.0",
"typescript": "^5.0.0",
"vitest": "^3.0.0"
},

View file

@ -24,6 +24,7 @@ const Endpoints = {
createEnvironmentVariable: [
"POST /repos/{owner}/{repo}/environments/{environment_name}/variables"
],
createHostedRunnerForOrg: ["POST /orgs/{org}/actions/hosted-runners"],
createOrUpdateEnvironmentSecret: [
"PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"
],
@ -61,6 +62,9 @@ const Endpoints = {
deleteEnvironmentVariable: [
"DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"
],
deleteHostedRunnerForOrg: [
"DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"
],
deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"],
deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"],
deleteRepoSecret: [
@ -149,6 +153,24 @@ const Endpoints = {
getGithubActionsPermissionsRepository: [
"GET /repos/{owner}/{repo}/actions/permissions"
],
getHostedRunnerForOrg: [
"GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"
],
getHostedRunnersGithubOwnedImagesForOrg: [
"GET /orgs/{org}/actions/hosted-runners/images/github-owned"
],
getHostedRunnersLimitsForOrg: [
"GET /orgs/{org}/actions/hosted-runners/limits"
],
getHostedRunnersMachineSpecsForOrg: [
"GET /orgs/{org}/actions/hosted-runners/machine-sizes"
],
getHostedRunnersPartnerImagesForOrg: [
"GET /orgs/{org}/actions/hosted-runners/images/partner"
],
getHostedRunnersPlatformsForOrg: [
"GET /orgs/{org}/actions/hosted-runners/platforms"
],
getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],
getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"],
getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"],
@ -192,6 +214,10 @@ const Endpoints = {
listEnvironmentVariables: [
"GET /repos/{owner}/{repo}/environments/{environment_name}/variables"
],
listGithubHostedRunnersInGroupForOrg: [
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners"
],
listHostedRunnersForOrg: ["GET /orgs/{org}/actions/hosted-runners"],
listJobsForWorkflowRun: [
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"
],
@ -310,6 +336,9 @@ const Endpoints = {
updateEnvironmentVariable: [
"PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"
],
updateHostedRunnerForOrg: [
"PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"
],
updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"],
updateRepoVariable: [
"PATCH /repos/{owner}/{repo}/actions/variables/{name}"
@ -451,6 +480,13 @@ const Endpoints = {
"GET /users/{username}/settings/billing/shared-storage"
]
},
campaigns: {
createCampaign: ["POST /orgs/{org}/campaigns"],
deleteCampaign: ["DELETE /orgs/{org}/campaigns/{campaign_number}"],
getCampaignSummary: ["GET /orgs/{org}/campaigns/{campaign_number}"],
listOrgCampaigns: ["GET /orgs/{org}/campaigns"],
updateCampaign: ["PATCH /orgs/{org}/campaigns/{campaign_number}"]
},
checks: {
create: ["POST /repos/{owner}/{repo}/check-runs"],
createSuite: ["POST /repos/{owner}/{repo}/check-suites"],
@ -729,9 +765,7 @@ const Endpoints = {
getCopilotSeatDetailsForUser: [
"GET /orgs/{org}/members/{username}/copilot"
],
listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"],
usageMetricsForOrg: ["GET /orgs/{org}/copilot/usage"],
usageMetricsForTeam: ["GET /orgs/{org}/team/{team_slug}/copilot/usage"]
listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"]
},
dependabot: {
addSelectedRepoToOrgSecret: [
@ -827,6 +861,26 @@ const Endpoints = {
getAllTemplates: ["GET /gitignore/templates"],
getTemplate: ["GET /gitignore/templates/{name}"]
},
hostedCompute: {
createNetworkConfigurationForOrg: [
"POST /orgs/{org}/settings/network-configurations"
],
deleteNetworkConfigurationFromOrg: [
"DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id}"
],
getNetworkConfigurationForOrg: [
"GET /orgs/{org}/settings/network-configurations/{network_configuration_id}"
],
getNetworkSettingsForOrg: [
"GET /orgs/{org}/settings/network-settings/{network_settings_id}"
],
listNetworkConfigurationsForOrg: [
"GET /orgs/{org}/settings/network-configurations"
],
updateNetworkConfigurationForOrg: [
"PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id}"
]
},
interactions: {
getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"],
getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"],
@ -1018,6 +1072,7 @@ const Endpoints = {
"PUT /orgs/{org}/outside_collaborators/{username}"
],
createInvitation: ["POST /orgs/{org}/invitations"],
createIssueType: ["POST /orgs/{org}/issue-types"],
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
createOrUpdateCustomPropertiesValuesForRepos: [
"PATCH /orgs/{org}/properties/values"
@ -1027,6 +1082,7 @@ const Endpoints = {
],
createWebhook: ["POST /orgs/{org}/hooks"],
delete: ["DELETE /orgs/{org}"],
deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"],
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
enableOrDisableSecurityProductOnAllOrgRepos: [
"POST /orgs/{org}/{security_product}/{enablement}",
@ -1043,6 +1099,10 @@ const Endpoints = {
getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"],
getOrgRole: ["GET /orgs/{org}/organization-roles/{role_id}"],
getOrgRulesetHistory: ["GET /orgs/{org}/rulesets/{ruleset_id}/history"],
getOrgRulesetVersion: [
"GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}"
],
getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"],
getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"],
getWebhookDelivery: [
@ -1057,6 +1117,7 @@ const Endpoints = {
listForAuthenticatedUser: ["GET /user/orgs"],
listForUser: ["GET /users/{username}/orgs"],
listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"],
listIssueTypes: ["GET /orgs/{org}/issue-types"],
listMembers: ["GET /orgs/{org}/members"],
listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"],
listOrgRoleTeams: ["GET /orgs/{org}/organization-roles/{role_id}/teams"],
@ -1131,6 +1192,7 @@ const Endpoints = {
],
unblockUser: ["DELETE /orgs/{org}/blocks/{username}"],
update: ["PATCH /orgs/{org}"],
updateIssueType: ["PUT /orgs/{org}/issue-types/{issue_type_id}"],
updateMembershipForAuthenticatedUser: [
"PATCH /user/memberships/orgs/{org}"
],
@ -1243,37 +1305,6 @@ const Endpoints = {
"PATCH /orgs/{org}/private-registries/{secret_name}"
]
},
projects: {
addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"],
createCard: ["POST /projects/columns/{column_id}/cards"],
createColumn: ["POST /projects/{project_id}/columns"],
createForAuthenticatedUser: ["POST /user/projects"],
createForOrg: ["POST /orgs/{org}/projects"],
createForRepo: ["POST /repos/{owner}/{repo}/projects"],
delete: ["DELETE /projects/{project_id}"],
deleteCard: ["DELETE /projects/columns/cards/{card_id}"],
deleteColumn: ["DELETE /projects/columns/{column_id}"],
get: ["GET /projects/{project_id}"],
getCard: ["GET /projects/columns/cards/{card_id}"],
getColumn: ["GET /projects/columns/{column_id}"],
getPermissionForUser: [
"GET /projects/{project_id}/collaborators/{username}/permission"
],
listCards: ["GET /projects/columns/{column_id}/cards"],
listCollaborators: ["GET /projects/{project_id}/collaborators"],
listColumns: ["GET /projects/{project_id}/columns"],
listForOrg: ["GET /orgs/{org}/projects"],
listForRepo: ["GET /repos/{owner}/{repo}/projects"],
listForUser: ["GET /users/{username}/projects"],
moveCard: ["POST /projects/columns/cards/{card_id}/moves"],
moveColumn: ["POST /projects/columns/{column_id}/moves"],
removeCollaborator: [
"DELETE /projects/{project_id}/collaborators/{username}"
],
update: ["PATCH /projects/{project_id}"],
updateCard: ["PATCH /projects/columns/cards/{card_id}"],
updateColumn: ["PATCH /projects/columns/{column_id}"]
},
pulls: {
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
create: ["POST /repos/{owner}/{repo}/pulls"],
@ -1645,6 +1676,12 @@ const Endpoints = {
],
getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"],
getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"],
getRepoRulesetHistory: [
"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history"
],
getRepoRulesetVersion: [
"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}"
],
getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"],
getStatusChecksProtection: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"
@ -1818,7 +1855,13 @@ const Endpoints = {
search: {
code: ["GET /search/code"],
commits: ["GET /search/commits"],
issuesAndPullRequests: ["GET /search/issues"],
issuesAndPullRequests: [
"GET /search/issues",
{},
{
deprecated: "octokit.rest.search.issuesAndPullRequests() is deprecated, see https://docs.github.com/rest/search/search#search-issues-and-pull-requests"
}
],
labels: ["GET /search/labels"],
repos: ["GET /search/repositories"],
topics: ["GET /search/topics"],
@ -1872,15 +1915,9 @@ const Endpoints = {
addOrUpdateMembershipForUserInOrg: [
"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"
],
addOrUpdateProjectPermissionsInOrg: [
"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"
],
addOrUpdateRepoPermissionsInOrg: [
"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"
],
checkPermissionsForProjectInOrg: [
"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"
],
checkPermissionsForRepoInOrg: [
"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"
],
@ -1917,14 +1954,10 @@ const Endpoints = {
listPendingInvitationsInOrg: [
"GET /orgs/{org}/teams/{team_slug}/invitations"
],
listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"],
listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"],
removeMembershipForUserInOrg: [
"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"
],
removeProjectInOrg: [
"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"
],
removeRepoInOrg: [
"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"
],

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,4 @@
const VERSION = "13.3.1";
const VERSION = "14.0.0";
export {
VERSION
};

View file

@ -1,7 +1,7 @@
{
"version": 3,
"sources": ["../../src/version.ts"],
"sourcesContent": ["export const VERSION = \"13.3.1\";\n"],
"sourcesContent": ["export const VERSION = \"14.0.0\";\n"],
"mappings": "AAAO,MAAM,UAAU;",
"names": []
}

View file

@ -111,6 +111,17 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Creates a GitHub-hosted runner for an organization.
* OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint.
*/
createHostedRunnerForOrg: {
(params?: RestEndpointMethodTypes["actions"]["createHostedRunnerForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["createHostedRunnerForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Creates or updates an environment secret with an encrypted value. Encrypt your secret using
* [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."
@ -410,6 +421,16 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Deletes a GitHub-hosted runner for an organization.
*/
deleteHostedRunnerForOrg: {
(params?: RestEndpointMethodTypes["actions"]["deleteHostedRunnerForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["deleteHostedRunnerForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Deletes a secret in an organization using the secret name.
*
@ -865,6 +886,68 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Gets a GitHub-hosted runner configured in an organization.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint.
*/
getHostedRunnerForOrg: {
(params?: RestEndpointMethodTypes["actions"]["getHostedRunnerForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getHostedRunnerForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Get the list of GitHub-owned images available for GitHub-hosted runners for an organization.
*/
getHostedRunnersGithubOwnedImagesForOrg: {
(params?: RestEndpointMethodTypes["actions"]["getHostedRunnersGithubOwnedImagesForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getHostedRunnersGithubOwnedImagesForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Get the GitHub-hosted runners limits for an organization.
*/
getHostedRunnersLimitsForOrg: {
(params?: RestEndpointMethodTypes["actions"]["getHostedRunnersLimitsForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getHostedRunnersLimitsForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Get the list of machine specs available for GitHub-hosted runners for an organization.
*/
getHostedRunnersMachineSpecsForOrg: {
(params?: RestEndpointMethodTypes["actions"]["getHostedRunnersMachineSpecsForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getHostedRunnersMachineSpecsForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Get the list of partner images available for GitHub-hosted runners for an organization.
*/
getHostedRunnersPartnerImagesForOrg: {
(params?: RestEndpointMethodTypes["actions"]["getHostedRunnersPartnerImagesForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getHostedRunnersPartnerImagesForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Get the list of platforms available for GitHub-hosted runners for an organization.
*/
getHostedRunnersPlatformsForOrg: {
(params?: RestEndpointMethodTypes["actions"]["getHostedRunnersPlatformsForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["getHostedRunnersPlatformsForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Gets a specific job in a workflow run.
*
@ -1090,6 +1173,9 @@ export type RestEndpointMethods = {
}>;
};
/**
* > [!WARNING]
* > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.
*
* Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
*
* Anyone with read access to the repository can use this endpoint.
@ -1104,6 +1190,9 @@ export type RestEndpointMethods = {
}>;
};
/**
* > [!WARNING]
* > This endpoint is in the process of closing down. Refer to "[Actions Get workflow usage and Get workflow run usage endpoints closing down](https://github.blog/changelog/2025-02-02-actions-get-workflow-usage-and-get-workflow-run-usage-endpoints-closing-down/)" for more information.
*
* Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)".
*
* You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`.
@ -1162,6 +1251,30 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Lists the GitHub-hosted runners in an organization group.
*
* OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.
*/
listGithubHostedRunnersInGroupForOrg: {
(params?: RestEndpointMethodTypes["actions"]["listGithubHostedRunnersInGroupForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["listGithubHostedRunnersInGroupForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists all GitHub-hosted runners configured in an organization.
*
* OAuth app tokens and personal access tokens (classic) need the `manage_runner:org` scope to use this endpoint.
*/
listHostedRunnersForOrg: {
(params?: RestEndpointMethodTypes["actions"]["listHostedRunnersForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["listHostedRunnersForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists jobs for a workflow run. You can use parameters to narrow the list of results. For more information
* about using parameters, see [Parameters](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#parameters).
@ -1819,6 +1932,17 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Updates a GitHub-hosted runner for an organization.
* OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint.
*/
updateHostedRunnerForOrg: {
(params?: RestEndpointMethodTypes["actions"]["updateHostedRunnerForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["actions"]["updateHostedRunnerForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Updates an organization variable that you can reference in a GitHub Actions workflow.
*
@ -2779,6 +2903,81 @@ export type RestEndpointMethods = {
}>;
};
};
campaigns: {
/**
* Create a campaign for an organization.
*
* The authenticated user must be an owner or security manager for the organization to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.
*
* Fine-grained tokens must have the "Code scanning alerts" repository permissions (read) on all repositories included
* in the campaign.
*/
createCampaign: {
(params?: RestEndpointMethodTypes["campaigns"]["createCampaign"]["parameters"]): Promise<RestEndpointMethodTypes["campaigns"]["createCampaign"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Deletes a campaign in an organization.
*
* The authenticated user must be an owner or security manager for the organization to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.
*/
deleteCampaign: {
(params?: RestEndpointMethodTypes["campaigns"]["deleteCampaign"]["parameters"]): Promise<RestEndpointMethodTypes["campaigns"]["deleteCampaign"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Gets a campaign for an organization.
*
* The authenticated user must be an owner or security manager for the organization to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.
*/
getCampaignSummary: {
(params?: RestEndpointMethodTypes["campaigns"]["getCampaignSummary"]["parameters"]): Promise<RestEndpointMethodTypes["campaigns"]["getCampaignSummary"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists campaigns in an organization.
*
* The authenticated user must be an owner or security manager for the organization to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.
*/
listOrgCampaigns: {
(params?: RestEndpointMethodTypes["campaigns"]["listOrgCampaigns"]["parameters"]): Promise<RestEndpointMethodTypes["campaigns"]["listOrgCampaigns"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Updates a campaign in an organization.
*
* The authenticated user must be an owner or security manager for the organization to use this endpoint.
*
* OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.
*/
updateCampaign: {
(params?: RestEndpointMethodTypes["campaigns"]["updateCampaign"]["parameters"]): Promise<RestEndpointMethodTypes["campaigns"]["updateCampaign"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
};
checks: {
/**
* **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array.
@ -2955,7 +3154,7 @@ export type RestEndpointMethods = {
/**
* Commits an autofix for a code scanning alert.
*
* If an autofix is commited as a result of this request, then this endpoint will return a 201 Created response.
* If an autofix is committed as a result of this request, then this endpoint will return a 201 Created response.
*
* OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.
*/
@ -3758,7 +3957,7 @@ export type RestEndpointMethods = {
* Creates or updates a repository development environment secret with an encrypted value. Encrypt your secret using
* [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."
*
* OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
* OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin.
*/
createOrUpdateRepoSecret: {
(params?: RestEndpointMethodTypes["codespaces"]["createOrUpdateRepoSecret"]["parameters"]): Promise<RestEndpointMethodTypes["codespaces"]["createOrUpdateRepoSecret"]["response"]>;
@ -3845,7 +4044,7 @@ export type RestEndpointMethods = {
/**
* Deletes a development environment secret in a repository using the secret name.
*
* OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
* OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint. The associated user must be a repository admin.
*/
deleteRepoSecret: {
(params?: RestEndpointMethodTypes["codespaces"]["deleteRepoSecret"]["parameters"]): Promise<RestEndpointMethodTypes["codespaces"]["deleteRepoSecret"]["response"]>;
@ -4447,55 +4646,6 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* > [!NOTE]
* > This endpoint is in public preview and is subject to change.
*
* You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE
* across an organization, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.
* See the response schema tab for detailed metrics definitions.
*
* The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,
* and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,
* they must have telemetry enabled in their IDE.
*
* Organization owners, and owners and billing managers of the parent enterprise, can view Copilot usage metrics.
*
* OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint.
*/
usageMetricsForOrg: {
(params?: RestEndpointMethodTypes["copilot"]["usageMetricsForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["copilot"]["usageMetricsForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* > [!NOTE]
* > This endpoint is in public preview and is subject to change.
*
* You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDE
* for users within a team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.
* See the response schema tab for detailed metrics definitions.
*
* The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,
* and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,
* they must have telemetry enabled in their IDE.
*
* > [!NOTE]
* > This endpoint will only return results for a given day if the team had five or more members with active Copilot licenses, as evaluated at the end of that day.
*
* Organization owners for the organization that contains this team, and owners and billing managers of the parent enterprise can view Copilot usage metrics for a team.
*
* OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot`, `read:org`, or `read:enterprise` scopes to use this endpoint.
*/
usageMetricsForTeam: {
(params?: RestEndpointMethodTypes["copilot"]["usageMetricsForTeam"]["parameters"]): Promise<RestEndpointMethodTypes["copilot"]["usageMetricsForTeam"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
};
dependabot: {
/**
@ -5379,6 +5529,80 @@ export type RestEndpointMethods = {
}>;
};
};
hostedCompute: {
/**
* Creates a hosted compute network configuration for an organization.
*
* OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint.
*/
createNetworkConfigurationForOrg: {
(params?: RestEndpointMethodTypes["hostedCompute"]["createNetworkConfigurationForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["hostedCompute"]["createNetworkConfigurationForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Deletes a hosted compute network configuration from an organization.
*
* OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint.
*/
deleteNetworkConfigurationFromOrg: {
(params?: RestEndpointMethodTypes["hostedCompute"]["deleteNetworkConfigurationFromOrg"]["parameters"]): Promise<RestEndpointMethodTypes["hostedCompute"]["deleteNetworkConfigurationFromOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Gets a hosted compute network configuration configured in an organization.
*
* OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint.
*/
getNetworkConfigurationForOrg: {
(params?: RestEndpointMethodTypes["hostedCompute"]["getNetworkConfigurationForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["hostedCompute"]["getNetworkConfigurationForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Gets a hosted compute network settings resource configured for an organization.
*
* OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint.
*/
getNetworkSettingsForOrg: {
(params?: RestEndpointMethodTypes["hostedCompute"]["getNetworkSettingsForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["hostedCompute"]["getNetworkSettingsForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists all hosted compute network configurations configured in an organization.
*
* OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint.
*/
listNetworkConfigurationsForOrg: {
(params?: RestEndpointMethodTypes["hostedCompute"]["listNetworkConfigurationsForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["hostedCompute"]["listNetworkConfigurationsForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Updates a hosted compute network configuration for an organization.
*
* OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint.
*/
updateNetworkConfigurationForOrg: {
(params?: RestEndpointMethodTypes["hostedCompute"]["updateNetworkConfigurationForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["hostedCompute"]["updateNetworkConfigurationForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
};
interactions: {
/**
* Shows which type of GitHub user can interact with your public repositories and when the restriction expires.
@ -6543,9 +6767,28 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Create a new issue type for an organization.
*
* You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).
*
* To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
* personal access tokens (classic) need the `admin:org` scope to use this endpoint.
*/
createIssueType: {
(params?: RestEndpointMethodTypes["orgs"]["createIssueType"]["parameters"]): Promise<RestEndpointMethodTypes["orgs"]["createIssueType"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Creates new or updates existing custom properties defined for an organization in a batch.
*
* If the property already exists, the existing property will be replaced with the new values.
* Missing optional values will fall back to default values, previous values will be overwritten.
* E.g. if a property exists with `values_editable_by: org_and_repo_actors` and it's updated without specifying `values_editable_by`, it will be updated to default value `org_actors`.
*
* To use this endpoint, the authenticated user must be one of:
* - An administrator for the organization.
* - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization.
@ -6621,6 +6864,21 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Deletes an issue type for an organization.
*
* You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).
*
* To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
* personal access tokens (classic) need the `admin:org` scope to use this endpoint.
*/
deleteIssueType: {
(params?: RestEndpointMethodTypes["orgs"]["deleteIssueType"]["parameters"]): Promise<RestEndpointMethodTypes["orgs"]["deleteIssueType"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Delete a webhook for an organization.
*
@ -6657,7 +6915,7 @@ export type RestEndpointMethods = {
/**
* Gets information about an organization.
*
* When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).
* When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).
*
* To see the full details about an organization, the authenticated user must be an organization owner.
*
@ -6731,6 +6989,26 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Get the history of an organization ruleset.
*/
getOrgRulesetHistory: {
(params?: RestEndpointMethodTypes["orgs"]["getOrgRulesetHistory"]["parameters"]): Promise<RestEndpointMethodTypes["orgs"]["getOrgRulesetHistory"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Get a version of an organization ruleset.
*/
getOrgRulesetVersion: {
(params?: RestEndpointMethodTypes["orgs"]["getOrgRulesetVersion"]["parameters"]): Promise<RestEndpointMethodTypes["orgs"]["getOrgRulesetVersion"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Returns a webhook configured in an organization. To get only the webhook
* `config` properties, see "[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization).
@ -6887,6 +7165,16 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Lists all issue types for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
*/
listIssueTypes: {
(params?: RestEndpointMethodTypes["orgs"]["listIssueTypes"]["parameters"]): Promise<RestEndpointMethodTypes["orgs"]["listIssueTypes"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.
*/
@ -7333,6 +7621,21 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Updates an issue type for an organization.
*
* You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).
*
* To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
* personal access tokens (classic) need the `admin:org` scope to use this endpoint.
*/
updateIssueType: {
(params?: RestEndpointMethodTypes["orgs"]["updateIssueType"]["parameters"]): Promise<RestEndpointMethodTypes["orgs"]["updateIssueType"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization.
*/
@ -7889,243 +8192,6 @@ export type RestEndpointMethods = {
}>;
};
};
projects: {
/**
* Adds a collaborator to an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator.
*/
addCollaborator: {
(params?: RestEndpointMethodTypes["projects"]["addCollaborator"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["addCollaborator"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
createCard: {
(params?: RestEndpointMethodTypes["projects"]["createCard"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["createCard"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Creates a new project column.
*/
createColumn: {
(params?: RestEndpointMethodTypes["projects"]["createColumn"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["createColumn"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
*/
createForAuthenticatedUser: {
(params?: RestEndpointMethodTypes["projects"]["createForAuthenticatedUser"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["createForAuthenticatedUser"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
*/
createForOrg: {
(params?: RestEndpointMethodTypes["projects"]["createForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["createForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
*/
createForRepo: {
(params?: RestEndpointMethodTypes["projects"]["createForRepo"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["createForRepo"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Deletes a project board. Returns a `404 Not Found` status if projects are disabled.
*/
delete: {
(params?: RestEndpointMethodTypes["projects"]["delete"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["delete"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Deletes a project card
*/
deleteCard: {
(params?: RestEndpointMethodTypes["projects"]["deleteCard"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["deleteCard"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Deletes a project column.
*/
deleteColumn: {
(params?: RestEndpointMethodTypes["projects"]["deleteColumn"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["deleteColumn"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
*/
get: {
(params?: RestEndpointMethodTypes["projects"]["get"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["get"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Gets information about a project card.
*/
getCard: {
(params?: RestEndpointMethodTypes["projects"]["getCard"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["getCard"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Gets information about a project column.
*/
getColumn: {
(params?: RestEndpointMethodTypes["projects"]["getColumn"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["getColumn"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level.
*/
getPermissionForUser: {
(params?: RestEndpointMethodTypes["projects"]["getPermissionForUser"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["getPermissionForUser"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists the project cards in a project.
*/
listCards: {
(params?: RestEndpointMethodTypes["projects"]["listCards"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["listCards"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators.
*/
listCollaborators: {
(params?: RestEndpointMethodTypes["projects"]["listCollaborators"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["listCollaborators"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists the project columns in a project.
*/
listColumns: {
(params?: RestEndpointMethodTypes["projects"]["listColumns"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["listColumns"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
*/
listForOrg: {
(params?: RestEndpointMethodTypes["projects"]["listForOrg"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["listForOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
*/
listForRepo: {
(params?: RestEndpointMethodTypes["projects"]["listForRepo"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["listForRepo"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists projects for a user.
*/
listForUser: {
(params?: RestEndpointMethodTypes["projects"]["listForUser"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["listForUser"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
moveCard: {
(params?: RestEndpointMethodTypes["projects"]["moveCard"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["moveCard"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
moveColumn: {
(params?: RestEndpointMethodTypes["projects"]["moveColumn"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["moveColumn"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator.
*/
removeCollaborator: {
(params?: RestEndpointMethodTypes["projects"]["removeCollaborator"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["removeCollaborator"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned.
*/
update: {
(params?: RestEndpointMethodTypes["projects"]["update"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["update"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
updateCard: {
(params?: RestEndpointMethodTypes["projects"]["updateCard"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["updateCard"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
updateColumn: {
(params?: RestEndpointMethodTypes["projects"]["updateColumn"]["parameters"]): Promise<RestEndpointMethodTypes["projects"]["updateColumn"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
};
pulls: {
/**
* Checks if a pull request has been merged into the base branch. The HTTP status of the response indicates whether or not the pull request has been merged; the response body is empty.
@ -8995,7 +9061,7 @@ export type RestEndpointMethods = {
}>;
};
/**
* Shows whether automated security fixes are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)".
* Shows whether Dependabot security updates are enabled, disabled or paused for a repository. The authenticated user must have admin read access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)".
*/
checkAutomatedSecurityFixes: {
(params?: RestEndpointMethodTypes["repos"]["checkAutomatedSecurityFixes"]["parameters"]): Promise<RestEndpointMethodTypes["repos"]["checkAutomatedSecurityFixes"]["response"]>;
@ -9314,7 +9380,7 @@ export type RestEndpointMethods = {
*
* The authenticated user must have admin or owner permissions to the repository to use this endpoint.
*
* For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app).
* For more information about the app that is providing this custom deployment rule, see the [documentation for the `GET /apps/{app_slug}` endpoint](https://docs.github.com/rest/apps/apps#get-an-app), as well as the [guide to creating custom deployment protection rules](https://docs.github.com/actions/managing-workflow-runs-and-deployments/managing-deployments/creating-custom-deployment-protection-rules).
*
* OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
*/
@ -9768,7 +9834,7 @@ export type RestEndpointMethods = {
}>;
};
/**
* Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)".
* Disables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)".
*/
disableAutomatedSecurityFixes: {
(params?: RestEndpointMethodTypes["repos"]["disableAutomatedSecurityFixes"]["parameters"]): Promise<RestEndpointMethodTypes["repos"]["disableAutomatedSecurityFixes"]["response"]>;
@ -9860,7 +9926,7 @@ export type RestEndpointMethods = {
}>;
};
/**
* Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/articles/configuring-automated-security-fixes)".
* Enables Dependabot security updates for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring Dependabot security updates](https://docs.github.com/articles/configuring-automated-security-fixes)".
*/
enableAutomatedSecurityFixes: {
(params?: RestEndpointMethodTypes["repos"]["enableAutomatedSecurityFixes"]["parameters"]): Promise<RestEndpointMethodTypes["repos"]["enableAutomatedSecurityFixes"]["response"]>;
@ -10598,6 +10664,26 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Get the history of a repository ruleset.
*/
getRepoRulesetHistory: {
(params?: RestEndpointMethodTypes["repos"]["getRepoRulesetHistory"]["parameters"]): Promise<RestEndpointMethodTypes["repos"]["getRepoRulesetHistory"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Get a version of a repository ruleset.
*/
getRepoRulesetVersion: {
(params?: RestEndpointMethodTypes["repos"]["getRepoRulesetVersion"]["parameters"]): Promise<RestEndpointMethodTypes["repos"]["getRepoRulesetVersion"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Get all the rulesets for a repository.
*/
@ -11033,7 +11119,7 @@ export type RestEndpointMethods = {
}>;
};
/**
* Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, will only return open pull requests associated with the commit.
* Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, it will return merged and open pull requests associated with the commit.
*
* To list the open or merged pull requests associated with a branch, you can set the `commit_sha` parameter to the branch name.
*/
@ -11159,8 +11245,8 @@ export type RestEndpointMethods = {
* To use this endpoint, the authenticated user must either be an administrator of the repository or target themselves for removal.
*
* This endpoint also:
* - Cancels any outstanding invitations
* - Unasigns the user from any issues
* - Cancels any outstanding invitations sent by the collaborator
* - Unassigns the user from any issues
* - Removes access to organization projects if the user is not an organization member and is not a collaborator on any other organization repositories.
* - Unstars the repository
* - Updates access permissions to packages
@ -11610,19 +11696,10 @@ export type RestEndpointMethods = {
}>;
};
/**
* Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api).
*
* When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted
* search results, see [Text match metadata](https://docs.github.com/rest/search/search#text-match-metadata).
*
* For example, if you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this.
*
* `q=windows+label:bug+language:python+state:open&sort=created&order=asc`
*
* This query searches for the keyword `windows`, within any open issue that is labeled as `bug`. The search runs across repositories whose primary language is Python. The results are sorted by creation date in ascending order, which means the oldest issues appear first in the search results.
*
* > [!NOTE]
* > For requests made by GitHub Apps with a user access token, you can't retrieve a combination of issues and pull requests in a single query. Requests that don't include the `is:issue` or `is:pull-request` qualifier will receive an HTTP `422 Unprocessable Entity` response. To get results for both issues and pull requests, you must send separate queries for issues and pull requests. For more information about the `is` qualifier, see "[Searching only issues or pull requests](https://docs.github.com/github/searching-for-information-on-github/searching-issues-and-pull-requests#search-only-issues-or-pull-requests)."
* > [!WARNING]
* > **Notice:** Search for issues and pull requests will be overridden by advanced search on September 4, 2025.
* > You can read more about this change on [the GitHub blog](https://github.blog/changelog/2025-03-06-github-issues-projects-api-support-for-issues-advanced-search-and-more/).
* @deprecated octokit.rest.search.issuesAndPullRequests() is deprecated, see https://docs.github.com/rest/search/search#search-issues-and-pull-requests
*/
issuesAndPullRequests: {
(params?: RestEndpointMethodTypes["search"]["issuesAndPullRequests"]["parameters"]): Promise<RestEndpointMethodTypes["search"]["issuesAndPullRequests"]["response"]>;
@ -11981,19 +12058,6 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization.
*
* > [!NOTE]
* > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
*/
addOrUpdateProjectPermissionsInOrg: {
(params?: RestEndpointMethodTypes["teams"]["addOrUpdateProjectPermissionsInOrg"]["parameters"]): Promise<RestEndpointMethodTypes["teams"]["addOrUpdateProjectPermissionsInOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."
*
@ -12009,19 +12073,6 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team.
*
* > [!NOTE]
* > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
*/
checkPermissionsForProjectInOrg: {
(params?: RestEndpointMethodTypes["teams"]["checkPermissionsForProjectInOrg"]["parameters"]): Promise<RestEndpointMethodTypes["teams"]["checkPermissionsForProjectInOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.
*
@ -12288,19 +12339,6 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Lists the organization projects for a team.
*
* > [!NOTE]
* > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`.
*/
listProjectsInOrg: {
(params?: RestEndpointMethodTypes["teams"]["listProjectsInOrg"]["parameters"]): Promise<RestEndpointMethodTypes["teams"]["listProjectsInOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* Lists a team's repositories visible to the authenticated user.
*
@ -12332,19 +12370,6 @@ export type RestEndpointMethods = {
url: string;
}>;
};
/**
* Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project.
*
* > [!NOTE]
* > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/projects/{project_id}`.
*/
removeProjectInOrg: {
(params?: RestEndpointMethodTypes["teams"]["removeProjectInOrg"]["parameters"]): Promise<RestEndpointMethodTypes["teams"]["removeProjectInOrg"]["response"]>;
defaults: RequestInterface["defaults"];
endpoint: EndpointInterface<{
url: string;
}>;
};
/**
* If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.
*
@ -12652,9 +12677,11 @@ export type RestEndpointMethods = {
/**
* Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.
*
* The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).
* If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.
*
* The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)".
* The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).
*
* The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/rest/users/emails).
*/
getById: {
(params?: RestEndpointMethodTypes["users"]["getById"]["parameters"]): Promise<RestEndpointMethodTypes["users"]["getById"]["response"]>;
@ -12666,9 +12693,11 @@ export type RestEndpointMethods = {
/**
* Provides publicly available information about someone with a GitHub account.
*
* The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).
* If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.
*
* The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)".
* The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).
*
* The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/rest/users/emails).
*/
getByUsername: {
(params?: RestEndpointMethodTypes["users"]["getByUsername"]["parameters"]): Promise<RestEndpointMethodTypes["users"]["getByUsername"]["response"]>;

View file

@ -33,6 +33,10 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"]["parameters"];
response: Endpoints["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"]["response"];
};
createHostedRunnerForOrg: {
parameters: RequestParameters & Endpoints["POST /orgs/{org}/actions/hosted-runners"]["parameters"];
response: Endpoints["POST /orgs/{org}/actions/hosted-runners"]["response"];
};
createOrUpdateEnvironmentSecret: {
parameters: RequestParameters & Endpoints["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"]["parameters"];
response: Endpoints["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"]["response"];
@ -93,6 +97,10 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"]["parameters"];
response: Endpoints["DELETE /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"]["response"];
};
deleteHostedRunnerForOrg: {
parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"]["parameters"];
response: Endpoints["DELETE /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"]["response"];
};
deleteOrgSecret: {
parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/actions/secrets/{secret_name}"]["parameters"];
response: Endpoints["DELETE /orgs/{org}/actions/secrets/{secret_name}"]["response"];
@ -229,6 +237,30 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/permissions"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/actions/permissions"]["response"];
};
getHostedRunnerForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"]["parameters"];
response: Endpoints["GET /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"]["response"];
};
getHostedRunnersGithubOwnedImagesForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/hosted-runners/images/github-owned"]["parameters"];
response: Endpoints["GET /orgs/{org}/actions/hosted-runners/images/github-owned"]["response"];
};
getHostedRunnersLimitsForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/hosted-runners/limits"]["parameters"];
response: Endpoints["GET /orgs/{org}/actions/hosted-runners/limits"]["response"];
};
getHostedRunnersMachineSpecsForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/hosted-runners/machine-sizes"]["parameters"];
response: Endpoints["GET /orgs/{org}/actions/hosted-runners/machine-sizes"]["response"];
};
getHostedRunnersPartnerImagesForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/hosted-runners/images/partner"]["parameters"];
response: Endpoints["GET /orgs/{org}/actions/hosted-runners/images/partner"]["response"];
};
getHostedRunnersPlatformsForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/hosted-runners/platforms"]["parameters"];
response: Endpoints["GET /orgs/{org}/actions/hosted-runners/platforms"]["response"];
};
getJobForWorkflowRun: {
parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"]["response"];
@ -313,6 +345,14 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/environments/{environment_name}/variables"]["response"];
};
listGithubHostedRunnersInGroupForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners"]["parameters"];
response: Endpoints["GET /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners"]["response"];
};
listHostedRunnersForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/actions/hosted-runners"]["parameters"];
response: Endpoints["GET /orgs/{org}/actions/hosted-runners"]["response"];
};
listJobsForWorkflowRun: {
parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"]["response"];
@ -497,6 +537,10 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"]["parameters"];
response: Endpoints["PATCH /repos/{owner}/{repo}/environments/{environment_name}/variables/{name}"]["response"];
};
updateHostedRunnerForOrg: {
parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"]["parameters"];
response: Endpoints["PATCH /orgs/{org}/actions/hosted-runners/{hosted_runner_id}"]["response"];
};
updateOrgVariable: {
parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/actions/variables/{name}"]["parameters"];
response: Endpoints["PATCH /orgs/{org}/actions/variables/{name}"]["response"];
@ -824,6 +868,28 @@ export type RestEndpointMethodTypes = {
response: Endpoints["GET /users/{username}/settings/billing/shared-storage"]["response"];
};
};
campaigns: {
createCampaign: {
parameters: RequestParameters & Endpoints["POST /orgs/{org}/campaigns"]["parameters"];
response: Endpoints["POST /orgs/{org}/campaigns"]["response"];
};
deleteCampaign: {
parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/campaigns/{campaign_number}"]["parameters"];
response: Endpoints["DELETE /orgs/{org}/campaigns/{campaign_number}"]["response"];
};
getCampaignSummary: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/campaigns/{campaign_number}"]["parameters"];
response: Endpoints["GET /orgs/{org}/campaigns/{campaign_number}"]["response"];
};
listOrgCampaigns: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/campaigns"]["parameters"];
response: Endpoints["GET /orgs/{org}/campaigns"]["response"];
};
updateCampaign: {
parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/campaigns/{campaign_number}"]["parameters"];
response: Endpoints["PATCH /orgs/{org}/campaigns/{campaign_number}"]["response"];
};
};
checks: {
create: {
parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/check-runs"]["parameters"];
@ -1275,14 +1341,6 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/copilot/billing/seats"]["parameters"];
response: Endpoints["GET /orgs/{org}/copilot/billing/seats"]["response"];
};
usageMetricsForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/copilot/usage"]["parameters"];
response: Endpoints["GET /orgs/{org}/copilot/usage"]["response"];
};
usageMetricsForTeam: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/team/{team_slug}/copilot/usage"]["parameters"];
response: Endpoints["GET /orgs/{org}/team/{team_slug}/copilot/usage"]["response"];
};
};
dependabot: {
addSelectedRepoToOrgSecret: {
@ -1528,6 +1586,32 @@ export type RestEndpointMethodTypes = {
response: Endpoints["GET /gitignore/templates/{name}"]["response"];
};
};
hostedCompute: {
createNetworkConfigurationForOrg: {
parameters: RequestParameters & Endpoints["POST /orgs/{org}/settings/network-configurations"]["parameters"];
response: Endpoints["POST /orgs/{org}/settings/network-configurations"]["response"];
};
deleteNetworkConfigurationFromOrg: {
parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id}"]["parameters"];
response: Endpoints["DELETE /orgs/{org}/settings/network-configurations/{network_configuration_id}"]["response"];
};
getNetworkConfigurationForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/settings/network-configurations/{network_configuration_id}"]["parameters"];
response: Endpoints["GET /orgs/{org}/settings/network-configurations/{network_configuration_id}"]["response"];
};
getNetworkSettingsForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/settings/network-settings/{network_settings_id}"]["parameters"];
response: Endpoints["GET /orgs/{org}/settings/network-settings/{network_settings_id}"]["response"];
};
listNetworkConfigurationsForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/settings/network-configurations"]["parameters"];
response: Endpoints["GET /orgs/{org}/settings/network-configurations"]["response"];
};
updateNetworkConfigurationForOrg: {
parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id}"]["parameters"];
response: Endpoints["PATCH /orgs/{org}/settings/network-configurations/{network_configuration_id}"]["response"];
};
};
interactions: {
getRestrictionsForAuthenticatedUser: {
parameters: RequestParameters & Endpoints["GET /user/interaction-limits"]["parameters"];
@ -1915,6 +1999,10 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["POST /orgs/{org}/invitations"]["parameters"];
response: Endpoints["POST /orgs/{org}/invitations"]["response"];
};
createIssueType: {
parameters: RequestParameters & Endpoints["POST /orgs/{org}/issue-types"]["parameters"];
response: Endpoints["POST /orgs/{org}/issue-types"]["response"];
};
createOrUpdateCustomProperties: {
parameters: RequestParameters & Endpoints["PATCH /orgs/{org}/properties/schema"]["parameters"];
response: Endpoints["PATCH /orgs/{org}/properties/schema"]["response"];
@ -1935,6 +2023,10 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["DELETE /orgs/{org}"]["parameters"];
response: Endpoints["DELETE /orgs/{org}"]["response"];
};
deleteIssueType: {
parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/issue-types/{issue_type_id}"]["parameters"];
response: Endpoints["DELETE /orgs/{org}/issue-types/{issue_type_id}"]["response"];
};
deleteWebhook: {
parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/hooks/{hook_id}"]["parameters"];
response: Endpoints["DELETE /orgs/{org}/hooks/{hook_id}"]["response"];
@ -1967,6 +2059,14 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/organization-roles/{role_id}"]["parameters"];
response: Endpoints["GET /orgs/{org}/organization-roles/{role_id}"]["response"];
};
getOrgRulesetHistory: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/rulesets/{ruleset_id}/history"]["parameters"];
response: Endpoints["GET /orgs/{org}/rulesets/{ruleset_id}/history"]["response"];
};
getOrgRulesetVersion: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}"]["parameters"];
response: Endpoints["GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}"]["response"];
};
getWebhook: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/hooks/{hook_id}"]["parameters"];
response: Endpoints["GET /orgs/{org}/hooks/{hook_id}"]["response"];
@ -2015,6 +2115,10 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/invitations/{invitation_id}/teams"]["parameters"];
response: Endpoints["GET /orgs/{org}/invitations/{invitation_id}/teams"]["response"];
};
listIssueTypes: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/issue-types"]["parameters"];
response: Endpoints["GET /orgs/{org}/issue-types"]["response"];
};
listMembers: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/members"]["parameters"];
response: Endpoints["GET /orgs/{org}/members"]["response"];
@ -2151,6 +2255,10 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["PATCH /orgs/{org}"]["parameters"];
response: Endpoints["PATCH /orgs/{org}"]["response"];
};
updateIssueType: {
parameters: RequestParameters & Endpoints["PUT /orgs/{org}/issue-types/{issue_type_id}"]["parameters"];
response: Endpoints["PUT /orgs/{org}/issue-types/{issue_type_id}"]["response"];
};
updateMembershipForAuthenticatedUser: {
parameters: RequestParameters & Endpoints["PATCH /user/memberships/orgs/{org}"]["parameters"];
response: Endpoints["PATCH /user/memberships/orgs/{org}"]["response"];
@ -2316,108 +2424,6 @@ export type RestEndpointMethodTypes = {
response: Endpoints["PATCH /orgs/{org}/private-registries/{secret_name}"]["response"];
};
};
projects: {
addCollaborator: {
parameters: RequestParameters & Endpoints["PUT /projects/{project_id}/collaborators/{username}"]["parameters"];
response: Endpoints["PUT /projects/{project_id}/collaborators/{username}"]["response"];
};
createCard: {
parameters: RequestParameters & Endpoints["POST /projects/columns/{column_id}/cards"]["parameters"];
response: Endpoints["POST /projects/columns/{column_id}/cards"]["response"];
};
createColumn: {
parameters: RequestParameters & Endpoints["POST /projects/{project_id}/columns"]["parameters"];
response: Endpoints["POST /projects/{project_id}/columns"]["response"];
};
createForAuthenticatedUser: {
parameters: RequestParameters & Endpoints["POST /user/projects"]["parameters"];
response: Endpoints["POST /user/projects"]["response"];
};
createForOrg: {
parameters: RequestParameters & Endpoints["POST /orgs/{org}/projects"]["parameters"];
response: Endpoints["POST /orgs/{org}/projects"]["response"];
};
createForRepo: {
parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/projects"]["parameters"];
response: Endpoints["POST /repos/{owner}/{repo}/projects"]["response"];
};
delete: {
parameters: RequestParameters & Endpoints["DELETE /projects/{project_id}"]["parameters"];
response: Endpoints["DELETE /projects/{project_id}"]["response"];
};
deleteCard: {
parameters: RequestParameters & Endpoints["DELETE /projects/columns/cards/{card_id}"]["parameters"];
response: Endpoints["DELETE /projects/columns/cards/{card_id}"]["response"];
};
deleteColumn: {
parameters: RequestParameters & Endpoints["DELETE /projects/columns/{column_id}"]["parameters"];
response: Endpoints["DELETE /projects/columns/{column_id}"]["response"];
};
get: {
parameters: RequestParameters & Endpoints["GET /projects/{project_id}"]["parameters"];
response: Endpoints["GET /projects/{project_id}"]["response"];
};
getCard: {
parameters: RequestParameters & Endpoints["GET /projects/columns/cards/{card_id}"]["parameters"];
response: Endpoints["GET /projects/columns/cards/{card_id}"]["response"];
};
getColumn: {
parameters: RequestParameters & Endpoints["GET /projects/columns/{column_id}"]["parameters"];
response: Endpoints["GET /projects/columns/{column_id}"]["response"];
};
getPermissionForUser: {
parameters: RequestParameters & Endpoints["GET /projects/{project_id}/collaborators/{username}/permission"]["parameters"];
response: Endpoints["GET /projects/{project_id}/collaborators/{username}/permission"]["response"];
};
listCards: {
parameters: RequestParameters & Endpoints["GET /projects/columns/{column_id}/cards"]["parameters"];
response: Endpoints["GET /projects/columns/{column_id}/cards"]["response"];
};
listCollaborators: {
parameters: RequestParameters & Endpoints["GET /projects/{project_id}/collaborators"]["parameters"];
response: Endpoints["GET /projects/{project_id}/collaborators"]["response"];
};
listColumns: {
parameters: RequestParameters & Endpoints["GET /projects/{project_id}/columns"]["parameters"];
response: Endpoints["GET /projects/{project_id}/columns"]["response"];
};
listForOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/projects"]["parameters"];
response: Endpoints["GET /orgs/{org}/projects"]["response"];
};
listForRepo: {
parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/projects"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/projects"]["response"];
};
listForUser: {
parameters: RequestParameters & Endpoints["GET /users/{username}/projects"]["parameters"];
response: Endpoints["GET /users/{username}/projects"]["response"];
};
moveCard: {
parameters: RequestParameters & Endpoints["POST /projects/columns/cards/{card_id}/moves"]["parameters"];
response: Endpoints["POST /projects/columns/cards/{card_id}/moves"]["response"];
};
moveColumn: {
parameters: RequestParameters & Endpoints["POST /projects/columns/{column_id}/moves"]["parameters"];
response: Endpoints["POST /projects/columns/{column_id}/moves"]["response"];
};
removeCollaborator: {
parameters: RequestParameters & Endpoints["DELETE /projects/{project_id}/collaborators/{username}"]["parameters"];
response: Endpoints["DELETE /projects/{project_id}/collaborators/{username}"]["response"];
};
update: {
parameters: RequestParameters & Endpoints["PATCH /projects/{project_id}"]["parameters"];
response: Endpoints["PATCH /projects/{project_id}"]["response"];
};
updateCard: {
parameters: RequestParameters & Endpoints["PATCH /projects/columns/cards/{card_id}"]["parameters"];
response: Endpoints["PATCH /projects/columns/cards/{card_id}"]["response"];
};
updateColumn: {
parameters: RequestParameters & Endpoints["PATCH /projects/columns/{column_id}"]["parameters"];
response: Endpoints["PATCH /projects/columns/{column_id}"]["response"];
};
};
pulls: {
checkIfMerged: {
parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"]["parameters"];
@ -3113,6 +3119,14 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"]["response"];
};
getRepoRulesetHistory: {
parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history"]["response"];
};
getRepoRulesetVersion: {
parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}/history/{version_id}"]["response"];
};
getRepoRulesets: {
parameters: RequestParameters & Endpoints["GET /repos/{owner}/{repo}/rulesets"]["parameters"];
response: Endpoints["GET /repos/{owner}/{repo}/rulesets"]["response"];
@ -3537,18 +3551,10 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"]["parameters"];
response: Endpoints["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"]["response"];
};
addOrUpdateProjectPermissionsInOrg: {
parameters: RequestParameters & Endpoints["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["parameters"];
response: Endpoints["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["response"];
};
addOrUpdateRepoPermissionsInOrg: {
parameters: RequestParameters & Endpoints["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["parameters"];
response: Endpoints["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["response"];
};
checkPermissionsForProjectInOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["parameters"];
response: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["response"];
};
checkPermissionsForRepoInOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["parameters"];
response: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["response"];
@ -3621,10 +3627,6 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/invitations"]["parameters"];
response: Endpoints["GET /orgs/{org}/teams/{team_slug}/invitations"]["response"];
};
listProjectsInOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["parameters"];
response: Endpoints["GET /orgs/{org}/teams/{team_slug}/projects"]["response"];
};
listReposInOrg: {
parameters: RequestParameters & Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["parameters"];
response: Endpoints["GET /orgs/{org}/teams/{team_slug}/repos"]["response"];
@ -3633,10 +3635,6 @@ export type RestEndpointMethodTypes = {
parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"]["parameters"];
response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"]["response"];
};
removeProjectInOrg: {
parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["parameters"];
response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"]["response"];
};
removeRepoInOrg: {
parameters: RequestParameters & Endpoints["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["parameters"];
response: Endpoints["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"]["response"];

View file

@ -1 +1 @@
export declare const VERSION = "13.3.1";
export declare const VERSION = "14.0.0";

View file

@ -1,6 +1,6 @@
{
"name": "@octokit/plugin-rest-endpoint-methods",
"version": "13.3.1",
"version": "14.0.0",
"type": "module",
"description": "Octokit plugin adding one method for all of api.github.com REST API endpoints",
"repository": "github:octokit/plugin-rest-endpoint-methods.js",
@ -13,7 +13,7 @@
"author": "Gregor Martynus (https://twitter.com/gr2m)",
"license": "MIT",
"dependencies": {
"@octokit/types": "^13.8.0"
"@octokit/types": "^14.0.0"
},
"devDependencies": {
"@octokit/core": "^6.0.0",
@ -21,13 +21,13 @@
"@types/node": "^22.0.0",
"@vitest/coverage-v8": "^3.0.5",
"camelcase": "^8.0.0",
"esbuild": "^0.24.0",
"fetch-mock": "^11.0.0",
"esbuild": "^0.25.0",
"fetch-mock": "^12.0.0",
"github-openapi-graphql-query": "^4.3.1",
"glob": "^11.0.0",
"prettier": "3.3.3",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"sinon": "^19.0.0",
"prettier": "3.5.3",
"semantic-release-plugin-update-version-in-files": "^2.0.0",
"sinon": "^20.0.0",
"sort-keys": "^5.0.0",
"string-to-jsdoc-comment": "^1.0.0",
"typescript": "^5.0.0",

View file

@ -1,6 +1,6 @@
# plugin-retry.js
> Retries requests for server 4xx/5xx responses except `400`, `401`, `403`, `404`, `422`, and `451`.
> Retries requests for server 4xx/5xx responses except `400`, `401`, `403`, `404`, `410`, `422`, and `451`.
[![@latest](https://img.shields.io/npm/v/@octokit/plugin-retry.svg)](https://www.npmjs.com/package/@octokit/plugin-retry)
[![Build Status](https://github.com/octokit/plugin-retry.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-retry.js/actions?workflow=Test)

View file

@ -52,7 +52,7 @@ function retry(octokit, octokitOptions) {
{
enabled: true,
retryAfterBaseValue: 1e3,
doNotRetry: [400, 401, 403, 404, 422, 451],
doNotRetry: [400, 401, 403, 404, 410, 422, 451],
retries: 3
},
octokitOptions.retry

View file

@ -1,7 +1,7 @@
{
"version": 3,
"sources": ["../dist-src/version.js", "../dist-src/error-request.js", "../dist-src/wrap-request.js", "../dist-src/index.js"],
"sourcesContent": ["const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n", "async function errorRequest(state, octokit, error, options) {\n if (!error.request || !error.request.request) {\n throw error;\n }\n if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {\n const retries = options.request.retries != null ? options.request.retries : state.retries;\n const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);\n throw octokit.retry.retryRequest(error, retries, retryAfter);\n }\n throw error;\n}\nexport {\n errorRequest\n};\n", "import Bottleneck from \"bottleneck/light.js\";\nimport { RequestError } from \"@octokit/request-error\";\nimport { errorRequest } from \"./error-request.js\";\nasync function wrapRequest(state, octokit, request, options) {\n const limiter = new Bottleneck();\n limiter.on(\"failed\", function(error, info) {\n const maxRetries = ~~error.request.request.retries;\n const after = ~~error.request.request.retryAfter;\n options.request.retryCount = info.retryCount + 1;\n if (maxRetries > info.retryCount) {\n return after * state.retryAfterBaseValue;\n }\n });\n return limiter.schedule(\n requestWithGraphqlErrorHandling.bind(null, state, octokit, request),\n options\n );\n}\nasync function requestWithGraphqlErrorHandling(state, octokit, request, options) {\n const response = await request(request, options);\n if (response.data && response.data.errors && response.data.errors.length > 0 && /Something went wrong while executing your query/.test(\n response.data.errors[0].message\n )) {\n const error = new RequestError(response.data.errors[0].message, 500, {\n request: options,\n response\n });\n return errorRequest(state, octokit, error, options);\n }\n return response;\n}\nexport {\n wrapRequest\n};\n", "import { VERSION } from \"./version.js\";\nimport { errorRequest } from \"./error-request.js\";\nimport { wrapRequest } from \"./wrap-request.js\";\nimport { VERSION as VERSION2 } from \"./version.js\";\nfunction retry(octokit, octokitOptions) {\n const state = Object.assign(\n {\n enabled: true,\n retryAfterBaseValue: 1e3,\n doNotRetry: [400, 401, 403, 404, 422, 451],\n retries: 3\n },\n octokitOptions.retry\n );\n if (state.enabled) {\n octokit.hook.error(\"request\", errorRequest.bind(null, state, octokit));\n octokit.hook.wrap(\"request\", wrapRequest.bind(null, state, octokit));\n }\n return {\n retry: {\n retryRequest: (error, retries, retryAfter) => {\n error.request.request = Object.assign({}, error.request.request, {\n retries,\n retryAfter\n });\n return error;\n }\n }\n };\n}\nretry.VERSION = VERSION;\nexport {\n VERSION2 as VERSION,\n retry\n};\n"],
"mappings": ";AAAA,IAAM,UAAU;;;ACAhB,eAAe,aAAa,OAAO,SAAS,OAAO,SAAS;AAC1D,MAAI,CAAC,MAAM,WAAW,CAAC,MAAM,QAAQ,SAAS;AAC5C,UAAM;AAAA,EACR;AACA,MAAI,MAAM,UAAU,OAAO,CAAC,MAAM,WAAW,SAAS,MAAM,MAAM,GAAG;AACnE,UAAM,UAAU,QAAQ,QAAQ,WAAW,OAAO,QAAQ,QAAQ,UAAU,MAAM;AAClF,UAAM,aAAa,KAAK,KAAK,QAAQ,QAAQ,cAAc,KAAK,GAAG,CAAC;AACpE,UAAM,QAAQ,MAAM,aAAa,OAAO,SAAS,UAAU;AAAA,EAC7D;AACA,QAAM;AACR;;;ACVA,OAAO,gBAAgB;AACvB,SAAS,oBAAoB;AAE7B,eAAe,YAAY,OAAO,SAAS,SAAS,SAAS;AAC3D,QAAM,UAAU,IAAI,WAAW;AAC/B,UAAQ,GAAG,UAAU,SAAS,OAAO,MAAM;AACzC,UAAM,aAAa,CAAC,CAAC,MAAM,QAAQ,QAAQ;AAC3C,UAAM,QAAQ,CAAC,CAAC,MAAM,QAAQ,QAAQ;AACtC,YAAQ,QAAQ,aAAa,KAAK,aAAa;AAC/C,QAAI,aAAa,KAAK,YAAY;AAChC,aAAO,QAAQ,MAAM;AAAA,IACvB;AAAA,EACF,CAAC;AACD,SAAO,QAAQ;AAAA,IACb,gCAAgC,KAAK,MAAM,OAAO,SAAS,OAAO;AAAA,IAClE;AAAA,EACF;AACF;AACA,eAAe,gCAAgC,OAAO,SAAS,SAAS,SAAS;AAC/E,QAAM,WAAW,MAAM,QAAQ,SAAS,OAAO;AAC/C,MAAI,SAAS,QAAQ,SAAS,KAAK,UAAU,SAAS,KAAK,OAAO,SAAS,KAAK,kDAAkD;AAAA,IAChI,SAAS,KAAK,OAAO,CAAC,EAAE;AAAA,EAC1B,GAAG;AACD,UAAM,QAAQ,IAAI,aAAa,SAAS,KAAK,OAAO,CAAC,EAAE,SAAS,KAAK;AAAA,MACnE,SAAS;AAAA,MACT;AAAA,IACF,CAAC;AACD,WAAO,aAAa,OAAO,SAAS,OAAO,OAAO;AAAA,EACpD;AACA,SAAO;AACT;;;AC1BA,SAAS,MAAM,SAAS,gBAAgB;AACtC,QAAM,QAAQ,OAAO;AAAA,IACnB;AAAA,MACE,SAAS;AAAA,MACT,qBAAqB;AAAA,MACrB,YAAY,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,GAAG;AAAA,MACzC,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,EACjB;AACA,MAAI,MAAM,SAAS;AACjB,YAAQ,KAAK,MAAM,WAAW,aAAa,KAAK,MAAM,OAAO,OAAO,CAAC;AACrE,YAAQ,KAAK,KAAK,WAAW,YAAY,KAAK,MAAM,OAAO,OAAO,CAAC;AAAA,EACrE;AACA,SAAO;AAAA,IACL,OAAO;AAAA,MACL,cAAc,CAAC,OAAO,SAAS,eAAe;AAC5C,cAAM,QAAQ,UAAU,OAAO,OAAO,CAAC,GAAG,MAAM,QAAQ,SAAS;AAAA,UAC/D;AAAA,UACA;AAAA,QACF,CAAC;AACD,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;AACA,MAAM,UAAU;",
"sourcesContent": ["const VERSION = \"0.0.0-development\";\nexport {\n VERSION\n};\n", "async function errorRequest(state, octokit, error, options) {\n if (!error.request || !error.request.request) {\n throw error;\n }\n if (error.status >= 400 && !state.doNotRetry.includes(error.status)) {\n const retries = options.request.retries != null ? options.request.retries : state.retries;\n const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2);\n throw octokit.retry.retryRequest(error, retries, retryAfter);\n }\n throw error;\n}\nexport {\n errorRequest\n};\n", "import Bottleneck from \"bottleneck/light.js\";\nimport { RequestError } from \"@octokit/request-error\";\nimport { errorRequest } from \"./error-request.js\";\nasync function wrapRequest(state, octokit, request, options) {\n const limiter = new Bottleneck();\n limiter.on(\"failed\", function(error, info) {\n const maxRetries = ~~error.request.request.retries;\n const after = ~~error.request.request.retryAfter;\n options.request.retryCount = info.retryCount + 1;\n if (maxRetries > info.retryCount) {\n return after * state.retryAfterBaseValue;\n }\n });\n return limiter.schedule(\n requestWithGraphqlErrorHandling.bind(null, state, octokit, request),\n options\n );\n}\nasync function requestWithGraphqlErrorHandling(state, octokit, request, options) {\n const response = await request(request, options);\n if (response.data && response.data.errors && response.data.errors.length > 0 && /Something went wrong while executing your query/.test(\n response.data.errors[0].message\n )) {\n const error = new RequestError(response.data.errors[0].message, 500, {\n request: options,\n response\n });\n return errorRequest(state, octokit, error, options);\n }\n return response;\n}\nexport {\n wrapRequest\n};\n", "import { VERSION } from \"./version.js\";\nimport { errorRequest } from \"./error-request.js\";\nimport { wrapRequest } from \"./wrap-request.js\";\nimport { VERSION as VERSION2 } from \"./version.js\";\nfunction retry(octokit, octokitOptions) {\n const state = Object.assign(\n {\n enabled: true,\n retryAfterBaseValue: 1e3,\n doNotRetry: [400, 401, 403, 404, 410, 422, 451],\n retries: 3\n },\n octokitOptions.retry\n );\n if (state.enabled) {\n octokit.hook.error(\"request\", errorRequest.bind(null, state, octokit));\n octokit.hook.wrap(\"request\", wrapRequest.bind(null, state, octokit));\n }\n return {\n retry: {\n retryRequest: (error, retries, retryAfter) => {\n error.request.request = Object.assign({}, error.request.request, {\n retries,\n retryAfter\n });\n return error;\n }\n }\n };\n}\nretry.VERSION = VERSION;\nexport {\n VERSION2 as VERSION,\n retry\n};\n"],
"mappings": ";AAAA,IAAM,UAAU;;;ACAhB,eAAe,aAAa,OAAO,SAAS,OAAO,SAAS;AAC1D,MAAI,CAAC,MAAM,WAAW,CAAC,MAAM,QAAQ,SAAS;AAC5C,UAAM;AAAA,EACR;AACA,MAAI,MAAM,UAAU,OAAO,CAAC,MAAM,WAAW,SAAS,MAAM,MAAM,GAAG;AACnE,UAAM,UAAU,QAAQ,QAAQ,WAAW,OAAO,QAAQ,QAAQ,UAAU,MAAM;AAClF,UAAM,aAAa,KAAK,KAAK,QAAQ,QAAQ,cAAc,KAAK,GAAG,CAAC;AACpE,UAAM,QAAQ,MAAM,aAAa,OAAO,SAAS,UAAU;AAAA,EAC7D;AACA,QAAM;AACR;;;ACVA,OAAO,gBAAgB;AACvB,SAAS,oBAAoB;AAE7B,eAAe,YAAY,OAAO,SAAS,SAAS,SAAS;AAC3D,QAAM,UAAU,IAAI,WAAW;AAC/B,UAAQ,GAAG,UAAU,SAAS,OAAO,MAAM;AACzC,UAAM,aAAa,CAAC,CAAC,MAAM,QAAQ,QAAQ;AAC3C,UAAM,QAAQ,CAAC,CAAC,MAAM,QAAQ,QAAQ;AACtC,YAAQ,QAAQ,aAAa,KAAK,aAAa;AAC/C,QAAI,aAAa,KAAK,YAAY;AAChC,aAAO,QAAQ,MAAM;AAAA,IACvB;AAAA,EACF,CAAC;AACD,SAAO,QAAQ;AAAA,IACb,gCAAgC,KAAK,MAAM,OAAO,SAAS,OAAO;AAAA,IAClE;AAAA,EACF;AACF;AACA,eAAe,gCAAgC,OAAO,SAAS,SAAS,SAAS;AAC/E,QAAM,WAAW,MAAM,QAAQ,SAAS,OAAO;AAC/C,MAAI,SAAS,QAAQ,SAAS,KAAK,UAAU,SAAS,KAAK,OAAO,SAAS,KAAK,kDAAkD;AAAA,IAChI,SAAS,KAAK,OAAO,CAAC,EAAE;AAAA,EAC1B,GAAG;AACD,UAAM,QAAQ,IAAI,aAAa,SAAS,KAAK,OAAO,CAAC,EAAE,SAAS,KAAK;AAAA,MACnE,SAAS;AAAA,MACT;AAAA,IACF,CAAC;AACD,WAAO,aAAa,OAAO,SAAS,OAAO,OAAO;AAAA,EACpD;AACA,SAAO;AACT;;;AC1BA,SAAS,MAAM,SAAS,gBAAgB;AACtC,QAAM,QAAQ,OAAO;AAAA,IACnB;AAAA,MACE,SAAS;AAAA,MACT,qBAAqB;AAAA,MACrB,YAAY,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,GAAG;AAAA,MAC9C,SAAS;AAAA,IACX;AAAA,IACA,eAAe;AAAA,EACjB;AACA,MAAI,MAAM,SAAS;AACjB,YAAQ,KAAK,MAAM,WAAW,aAAa,KAAK,MAAM,OAAO,OAAO,CAAC;AACrE,YAAQ,KAAK,KAAK,WAAW,YAAY,KAAK,MAAM,OAAO,OAAO,CAAC;AAAA,EACrE;AACA,SAAO;AAAA,IACL,OAAO;AAAA,MACL,cAAc,CAAC,OAAO,SAAS,eAAe;AAC5C,cAAM,QAAQ,UAAU,OAAO,OAAO,CAAC,GAAG,MAAM,QAAQ,SAAS;AAAA,UAC/D;AAAA,UACA;AAAA,QACF,CAAC;AACD,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;AACA,MAAM,UAAU;",
"names": []
}

View file

@ -7,7 +7,7 @@ function retry(octokit, octokitOptions) {
{
enabled: true,
retryAfterBaseValue: 1e3,
doNotRetry: [400, 401, 403, 404, 422, 451],
doNotRetry: [400, 401, 403, 404, 410, 422, 451],
retries: 3
},
octokitOptions.retry

View file

@ -1,4 +1,4 @@
const VERSION = "7.1.4";
const VERSION = "7.2.1";
export {
VERSION
};

View file

@ -1 +1 @@
export declare const VERSION = "7.1.4";
export declare const VERSION = "7.2.1";

View file

@ -1,6 +1,6 @@
{
"name": "@octokit/plugin-retry",
"version": "7.1.4",
"version": "7.2.1",
"publishConfig": {
"access": "public",
"provenance": true
@ -11,23 +11,23 @@
"author": "Simon Grondin (http://github.com/SGrondin)",
"license": "MIT",
"dependencies": {
"@octokit/request-error": "^6.1.7",
"@octokit/types": "^13.6.2",
"@octokit/request-error": "^6.1.8",
"@octokit/types": "^14.0.0",
"bottleneck": "^2.15.3"
},
"peerDependencies": {
"@octokit/core": ">=6"
},
"devDependencies": {
"@octokit/core": "^6.1.4",
"@octokit/core": "^6.1.5",
"@octokit/tsconfig": "^4.0.0",
"@types/node": "^22.0.0",
"@vitest/coverage-v8": "^3.0.0",
"esbuild": "^0.25.0",
"fetch-mock": "^12.0.0",
"glob": "^11.0.0",
"prettier": "3.5.1",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"prettier": "3.5.3",
"semantic-release-plugin-update-version-in-files": "^2.0.0",
"typescript": "^5.0.0",
"vitest": "^3.0.0"
},

View file

@ -10,8 +10,9 @@ function wrapRequest(state, request, options) {
return state.retryLimiter.schedule(doRequest, state, request, options);
}
async function doRequest(state, request, options) {
const isWrite = options.method !== "GET" && options.method !== "HEAD";
const { pathname } = new URL(options.url, "http://github.test");
const isAuth = isAuthRequest(options.method, pathname);
const isWrite = !isAuth && options.method !== "GET" && options.method !== "HEAD";
const isSearch = options.method === "GET" && pathname.startsWith("/search/");
const isGraphQL = pathname.startsWith("/graphql");
const retryCount = ~~request.retryCount;
@ -28,7 +29,7 @@ async function doRequest(state, request, options) {
if (isSearch) {
await state.search.key(state.id).schedule(jobOptions, noop);
}
const req = state.global.key(state.id).schedule(jobOptions, request, options);
const req = (isAuth ? state.auth : state.global).key(state.id).schedule(jobOptions, request, options);
if (isGraphQL) {
const res = await req;
if (res.data.errors != null && res.data.errors.some((error) => error.type === "RATE_LIMITED")) {
@ -41,6 +42,13 @@ async function doRequest(state, request, options) {
}
return req;
}
function isAuthRequest(method, pathname) {
return method === "PATCH" && // https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-a-scoped-access-token
/^\/applications\/[^/]+\/token\/scoped$/.test(pathname) || method === "POST" && // https://docs.github.com/en/rest/apps/oauth-applications?apiVersion=2022-11-28#reset-a-token
(/^\/applications\/[^/]+\/token$/.test(pathname) || // https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app
/^\/app\/installations\/[^/]+\/access_tokens$/.test(pathname) || // https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps
pathname === "/login/oauth/access_token");
}
// pkg/dist-src/generated/triggers-notification-paths.js
var triggers_notification_paths_default = [
@ -84,6 +92,11 @@ var createGroups = function(Bottleneck, common) {
maxConcurrent: 10,
...common
});
groups.auth = new Bottleneck.Group({
id: "octokit-auth",
maxConcurrent: 1,
...common
});
groups.search = new Bottleneck.Group({
id: "octokit-search",
maxConcurrent: 1,

File diff suppressed because one or more lines are too long

View file

@ -12,6 +12,11 @@ const createGroups = function(Bottleneck, common) {
maxConcurrent: 10,
...common
});
groups.auth = new Bottleneck.Group({
id: "octokit-auth",
maxConcurrent: 1,
...common
});
groups.search = new Bottleneck.Group({
id: "octokit-search",
maxConcurrent: 1,

View file

@ -1,4 +1,4 @@
const VERSION = "9.4.0";
const VERSION = "10.0.0";
export {
VERSION
};

View file

@ -3,8 +3,9 @@ function wrapRequest(state, request, options) {
return state.retryLimiter.schedule(doRequest, state, request, options);
}
async function doRequest(state, request, options) {
const isWrite = options.method !== "GET" && options.method !== "HEAD";
const { pathname } = new URL(options.url, "http://github.test");
const isAuth = isAuthRequest(options.method, pathname);
const isWrite = !isAuth && options.method !== "GET" && options.method !== "HEAD";
const isSearch = options.method === "GET" && pathname.startsWith("/search/");
const isGraphQL = pathname.startsWith("/graphql");
const retryCount = ~~request.retryCount;
@ -21,7 +22,7 @@ async function doRequest(state, request, options) {
if (isSearch) {
await state.search.key(state.id).schedule(jobOptions, noop);
}
const req = state.global.key(state.id).schedule(jobOptions, request, options);
const req = (isAuth ? state.auth : state.global).key(state.id).schedule(jobOptions, request, options);
if (isGraphQL) {
const res = await req;
if (res.data.errors != null && res.data.errors.some((error) => error.type === "RATE_LIMITED")) {
@ -34,6 +35,13 @@ async function doRequest(state, request, options) {
}
return req;
}
function isAuthRequest(method, pathname) {
return method === "PATCH" && // https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-a-scoped-access-token
/^\/applications\/[^/]+\/token\/scoped$/.test(pathname) || method === "POST" && // https://docs.github.com/en/rest/apps/oauth-applications?apiVersion=2022-11-28#reset-a-token
(/^\/applications\/[^/]+\/token$/.test(pathname) || // https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app
/^\/app\/installations\/[^/]+\/access_tokens$/.test(pathname) || // https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps
pathname === "/login/oauth/access_token");
}
export {
wrapRequest
};

View file

@ -27,6 +27,7 @@ export type ThrottlingOptions = (ThrottlingOptionsBase & SecondaryLimitHandler)
});
export type Groups = {
global?: Bottleneck.Group;
auth?: Bottleneck.Group;
write?: Bottleneck.Group;
search?: Bottleneck.Group;
notifications?: Bottleneck.Group;

View file

@ -1 +1 @@
export declare const VERSION = "9.4.0";
export declare const VERSION = "10.0.0";

View file

@ -1,6 +1,6 @@
{
"name": "@octokit/plugin-throttling",
"version": "9.4.0",
"version": "10.0.0",
"publishConfig": {
"access": "public",
"provenance": true
@ -11,27 +11,27 @@
"author": "Simon Grondin (http://github.com/SGrondin)",
"license": "MIT",
"dependencies": {
"@octokit/types": "^13.7.0",
"@octokit/types": "^14.0.0",
"bottleneck": "^2.15.3"
},
"peerDependencies": {
"@octokit/core": "^6.1.3"
},
"devDependencies": {
"@octokit/auth-app": "^7.2.0",
"@octokit/core": "^6.1.3",
"@octokit/request-error": "^6.1.6",
"@octokit/tsconfig": "^4.0.0",
"@types/node": "^22.0.0",
"@vitest/coverage-v8": "^2.0.2",
"esbuild": "^0.24.0",
"fetch-mock": "^11.0.0",
"@vitest/coverage-v8": "^3.0.0",
"esbuild": "^0.25.0",
"github-openapi-graphql-query": "^4.0.0",
"glob": "^11.0.0",
"npm-run-all2": "^7.0.0",
"prettier": "3.4.2",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"prettier": "3.5.3",
"semantic-release-plugin-update-version-in-files": "^2.0.0",
"typescript": "^5.0.0",
"vitest": "^2.0.2"
"vitest": "^3.0.0"
},
"engines": {
"node": ">= 18"