change-string-case/node_modules/@octokit/plugin-rest-endpoint-methods/dist-node/index.js

2107 lines
85 KiB
JavaScript
Raw Normal View History

2023-10-26 04:27:07 +08:00
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2022-11-04 00:55:07 +08:00
2023-10-26 04:27:07 +08:00
// pkg/dist-src/index.js
var dist_src_exports = {};
__export(dist_src_exports, {
legacyRestEndpointMethods: () => legacyRestEndpointMethods,
restEndpointMethods: () => restEndpointMethods
});
module.exports = __toCommonJS(dist_src_exports);
2022-11-04 00:55:07 +08:00
2023-10-26 04:27:07 +08:00
// pkg/dist-src/version.js
var VERSION = "10.1.0";
// pkg/dist-src/generated/endpoints.js
var Endpoints = {
2022-11-04 00:55:07 +08:00
actions: {
2023-10-26 04:27:07 +08:00
addCustomLabelsToSelfHostedRunnerForOrg: [
"POST /orgs/{org}/actions/runners/{runner_id}/labels"
],
addCustomLabelsToSelfHostedRunnerForRepo: [
"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
],
addSelectedRepoToOrgSecret: [
"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"
],
addSelectedRepoToOrgVariable: [
"PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"
],
approveWorkflowRun: [
"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"
],
cancelWorkflowRun: [
"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"
],
createEnvironmentVariable: [
"POST /repositories/{repository_id}/environments/{environment_name}/variables"
],
createOrUpdateEnvironmentSecret: [
"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"
],
2022-11-04 00:55:07 +08:00
createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"],
2023-10-26 04:27:07 +08:00
createOrUpdateRepoSecret: [
"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"
],
createOrgVariable: ["POST /orgs/{org}/actions/variables"],
createRegistrationTokenForOrg: [
"POST /orgs/{org}/actions/runners/registration-token"
],
createRegistrationTokenForRepo: [
"POST /repos/{owner}/{repo}/actions/runners/registration-token"
],
2022-11-04 00:55:07 +08:00
createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"],
2023-10-26 04:27:07 +08:00
createRemoveTokenForRepo: [
"POST /repos/{owner}/{repo}/actions/runners/remove-token"
],
createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"],
createWorkflowDispatch: [
"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"
],
deleteActionsCacheById: [
"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"
],
deleteActionsCacheByKey: [
"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"
],
deleteArtifact: [
"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"
],
deleteEnvironmentSecret: [
"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"
],
deleteEnvironmentVariable: [
"DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}"
],
2022-11-04 00:55:07 +08:00
deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"],
2023-10-26 04:27:07 +08:00
deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"],
deleteRepoSecret: [
"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"
],
deleteRepoVariable: [
"DELETE /repos/{owner}/{repo}/actions/variables/{name}"
],
deleteSelfHostedRunnerFromOrg: [
"DELETE /orgs/{org}/actions/runners/{runner_id}"
],
deleteSelfHostedRunnerFromRepo: [
"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"
],
2022-11-04 00:55:07 +08:00
deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],
2023-10-26 04:27:07 +08:00
deleteWorkflowRunLogs: [
"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"
],
disableSelectedRepositoryGithubActionsOrganization: [
"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"
],
disableWorkflow: [
"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"
],
downloadArtifact: [
"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"
],
downloadJobLogsForWorkflowRun: [
"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"
],
downloadWorkflowRunAttemptLogs: [
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs"
],
downloadWorkflowRunLogs: [
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"
],
enableSelectedRepositoryGithubActionsOrganization: [
"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"
],
enableWorkflow: [
"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"
],
forceCancelWorkflowRun: [
"POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel"
],
generateRunnerJitconfigForOrg: [
"POST /orgs/{org}/actions/runners/generate-jitconfig"
],
generateRunnerJitconfigForRepo: [
"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig"
],
getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"],
getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"],
getActionsCacheUsageByRepoForOrg: [
"GET /orgs/{org}/actions/cache/usage-by-repository"
],
getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"],
getAllowedActionsOrganization: [
"GET /orgs/{org}/actions/permissions/selected-actions"
],
getAllowedActionsRepository: [
"GET /repos/{owner}/{repo}/actions/permissions/selected-actions"
],
2022-11-04 00:55:07 +08:00
getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
2023-10-26 04:27:07 +08:00
getEnvironmentPublicKey: [
"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key"
],
getEnvironmentSecret: [
"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"
],
getEnvironmentVariable: [
"GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}"
],
getGithubActionsDefaultWorkflowPermissionsOrganization: [
"GET /orgs/{org}/actions/permissions/workflow"
],
getGithubActionsDefaultWorkflowPermissionsRepository: [
"GET /repos/{owner}/{repo}/actions/permissions/workflow"
],
getGithubActionsPermissionsOrganization: [
"GET /orgs/{org}/actions/permissions"
],
getGithubActionsPermissionsRepository: [
"GET /repos/{owner}/{repo}/actions/permissions"
],
2022-11-04 00:55:07 +08:00
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}"],
2023-10-26 04:27:07 +08:00
getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"],
getPendingDeploymentsForRun: [
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"
],
getRepoPermissions: [
"GET /repos/{owner}/{repo}/actions/permissions",
{},
{ renamed: ["actions", "getGithubActionsPermissionsRepository"] }
],
2022-11-04 00:55:07 +08:00
getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"],
getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],
2023-10-26 04:27:07 +08:00
getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"],
getReviewsForRun: [
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"
],
2022-11-04 00:55:07 +08:00
getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"],
2023-10-26 04:27:07 +08:00
getSelfHostedRunnerForRepo: [
"GET /repos/{owner}/{repo}/actions/runners/{runner_id}"
],
2022-11-04 00:55:07 +08:00
getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],
2023-10-26 04:27:07 +08:00
getWorkflowAccessToRepository: [
"GET /repos/{owner}/{repo}/actions/permissions/access"
],
2022-11-04 00:55:07 +08:00
getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],
2023-10-26 04:27:07 +08:00
getWorkflowRunAttempt: [
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"
],
getWorkflowRunUsage: [
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"
],
getWorkflowUsage: [
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"
],
2022-11-04 00:55:07 +08:00
listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"],
2023-10-26 04:27:07 +08:00
listEnvironmentSecrets: [
"GET /repositories/{repository_id}/environments/{environment_name}/secrets"
],
listEnvironmentVariables: [
"GET /repositories/{repository_id}/environments/{environment_name}/variables"
],
listJobsForWorkflowRun: [
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"
],
listJobsForWorkflowRunAttempt: [
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"
],
listLabelsForSelfHostedRunnerForOrg: [
"GET /orgs/{org}/actions/runners/{runner_id}/labels"
],
listLabelsForSelfHostedRunnerForRepo: [
"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
],
2022-11-04 00:55:07 +08:00
listOrgSecrets: ["GET /orgs/{org}/actions/secrets"],
2023-10-26 04:27:07 +08:00
listOrgVariables: ["GET /orgs/{org}/actions/variables"],
listRepoOrganizationSecrets: [
"GET /repos/{owner}/{repo}/actions/organization-secrets"
],
listRepoOrganizationVariables: [
"GET /repos/{owner}/{repo}/actions/organization-variables"
],
2022-11-04 00:55:07 +08:00
listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"],
2023-10-26 04:27:07 +08:00
listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"],
2022-11-04 00:55:07 +08:00
listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"],
listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"],
2023-10-26 04:27:07 +08:00
listRunnerApplicationsForRepo: [
"GET /repos/{owner}/{repo}/actions/runners/downloads"
],
listSelectedReposForOrgSecret: [
"GET /orgs/{org}/actions/secrets/{secret_name}/repositories"
],
listSelectedReposForOrgVariable: [
"GET /orgs/{org}/actions/variables/{name}/repositories"
],
listSelectedRepositoriesEnabledGithubActionsOrganization: [
"GET /orgs/{org}/actions/permissions/repositories"
],
2022-11-04 00:55:07 +08:00
listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"],
listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"],
2023-10-26 04:27:07 +08:00
listWorkflowRunArtifacts: [
"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"
],
listWorkflowRuns: [
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"
],
2022-11-04 00:55:07 +08:00
listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"],
2023-10-26 04:27:07 +08:00
reRunJobForWorkflowRun: [
"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"
],
2022-11-04 00:55:07 +08:00
reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],
2023-10-26 04:27:07 +08:00
reRunWorkflowFailedJobs: [
"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"
],
removeAllCustomLabelsFromSelfHostedRunnerForOrg: [
"DELETE /orgs/{org}/actions/runners/{runner_id}/labels"
],
removeAllCustomLabelsFromSelfHostedRunnerForRepo: [
"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
],
removeCustomLabelFromSelfHostedRunnerForOrg: [
"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}"
],
removeCustomLabelFromSelfHostedRunnerForRepo: [
"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}"
],
removeSelectedRepoFromOrgSecret: [
"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"
],
removeSelectedRepoFromOrgVariable: [
"DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"
],
reviewCustomGatesForRun: [
"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule"
],
reviewPendingDeploymentsForRun: [
"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"
],
setAllowedActionsOrganization: [
"PUT /orgs/{org}/actions/permissions/selected-actions"
],
setAllowedActionsRepository: [
"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"
],
setCustomLabelsForSelfHostedRunnerForOrg: [
"PUT /orgs/{org}/actions/runners/{runner_id}/labels"
],
setCustomLabelsForSelfHostedRunnerForRepo: [
"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"
],
setGithubActionsDefaultWorkflowPermissionsOrganization: [
"PUT /orgs/{org}/actions/permissions/workflow"
],
setGithubActionsDefaultWorkflowPermissionsRepository: [
"PUT /repos/{owner}/{repo}/actions/permissions/workflow"
],
setGithubActionsPermissionsOrganization: [
"PUT /orgs/{org}/actions/permissions"
],
setGithubActionsPermissionsRepository: [
"PUT /repos/{owner}/{repo}/actions/permissions"
],
setSelectedReposForOrgSecret: [
"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"
],
setSelectedReposForOrgVariable: [
"PUT /orgs/{org}/actions/variables/{name}/repositories"
],
setSelectedRepositoriesEnabledGithubActionsOrganization: [
"PUT /orgs/{org}/actions/permissions/repositories"
],
setWorkflowAccessToRepository: [
"PUT /repos/{owner}/{repo}/actions/permissions/access"
],
updateEnvironmentVariable: [
"PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}"
],
updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"],
updateRepoVariable: [
"PATCH /repos/{owner}/{repo}/actions/variables/{name}"
]
2022-11-04 00:55:07 +08:00
},
activity: {
checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"],
deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"],
2023-10-26 04:27:07 +08:00
deleteThreadSubscription: [
"DELETE /notifications/threads/{thread_id}/subscription"
],
2022-11-04 00:55:07 +08:00
getFeeds: ["GET /feeds"],
getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"],
getThread: ["GET /notifications/threads/{thread_id}"],
2023-10-26 04:27:07 +08:00
getThreadSubscriptionForAuthenticatedUser: [
"GET /notifications/threads/{thread_id}/subscription"
],
2022-11-04 00:55:07 +08:00
listEventsForAuthenticatedUser: ["GET /users/{username}/events"],
listNotificationsForAuthenticatedUser: ["GET /notifications"],
2023-10-26 04:27:07 +08:00
listOrgEventsForAuthenticatedUser: [
"GET /users/{username}/events/orgs/{org}"
],
2022-11-04 00:55:07 +08:00
listPublicEvents: ["GET /events"],
listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"],
listPublicEventsForUser: ["GET /users/{username}/events/public"],
listPublicOrgEvents: ["GET /orgs/{org}/events"],
listReceivedEventsForUser: ["GET /users/{username}/received_events"],
2023-10-26 04:27:07 +08:00
listReceivedPublicEventsForUser: [
"GET /users/{username}/received_events/public"
],
2022-11-04 00:55:07 +08:00
listRepoEvents: ["GET /repos/{owner}/{repo}/events"],
2023-10-26 04:27:07 +08:00
listRepoNotificationsForAuthenticatedUser: [
"GET /repos/{owner}/{repo}/notifications"
],
2022-11-04 00:55:07 +08:00
listReposStarredByAuthenticatedUser: ["GET /user/starred"],
listReposStarredByUser: ["GET /users/{username}/starred"],
listReposWatchedByUser: ["GET /users/{username}/subscriptions"],
listStargazersForRepo: ["GET /repos/{owner}/{repo}/stargazers"],
listWatchedReposForAuthenticatedUser: ["GET /user/subscriptions"],
listWatchersForRepo: ["GET /repos/{owner}/{repo}/subscribers"],
markNotificationsAsRead: ["PUT /notifications"],
markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"],
markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"],
setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"],
2023-10-26 04:27:07 +08:00
setThreadSubscription: [
"PUT /notifications/threads/{thread_id}/subscription"
],
2022-11-04 00:55:07 +08:00
starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"],
unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"]
},
apps: {
2023-10-26 04:27:07 +08:00
addRepoToInstallation: [
"PUT /user/installations/{installation_id}/repositories/{repository_id}",
{},
{ renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] }
],
addRepoToInstallationForAuthenticatedUser: [
"PUT /user/installations/{installation_id}/repositories/{repository_id}"
],
2022-11-04 00:55:07 +08:00
checkToken: ["POST /applications/{client_id}/token"],
createFromManifest: ["POST /app-manifests/{code}/conversions"],
2023-10-26 04:27:07 +08:00
createInstallationAccessToken: [
"POST /app/installations/{installation_id}/access_tokens"
],
2022-11-04 00:55:07 +08:00
deleteAuthorization: ["DELETE /applications/{client_id}/grant"],
2023-10-26 04:27:07 +08:00
deleteInstallation: ["DELETE /app/installations/{installation_id}"],
2022-11-04 00:55:07 +08:00
deleteToken: ["DELETE /applications/{client_id}/token"],
2023-10-26 04:27:07 +08:00
getAuthenticated: ["GET /app"],
getBySlug: ["GET /apps/{app_slug}"],
getInstallation: ["GET /app/installations/{installation_id}"],
getOrgInstallation: ["GET /orgs/{org}/installation"],
getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"],
getSubscriptionPlanForAccount: [
"GET /marketplace_listing/accounts/{account_id}"
],
getSubscriptionPlanForAccountStubbed: [
"GET /marketplace_listing/stubbed/accounts/{account_id}"
],
getUserInstallation: ["GET /users/{username}/installation"],
getWebhookConfigForApp: ["GET /app/hook/config"],
getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"],
2022-11-04 00:55:07 +08:00
listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"],
2023-10-26 04:27:07 +08:00
listAccountsForPlanStubbed: [
"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"
],
listInstallationReposForAuthenticatedUser: [
"GET /user/installations/{installation_id}/repositories"
],
listInstallationRequestsForAuthenticatedApp: [
"GET /app/installation-requests"
],
listInstallations: ["GET /app/installations"],
listInstallationsForAuthenticatedUser: ["GET /user/installations"],
2022-11-04 00:55:07 +08:00
listPlans: ["GET /marketplace_listing/plans"],
listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"],
2023-10-26 04:27:07 +08:00
listReposAccessibleToInstallation: ["GET /installation/repositories"],
2022-11-04 00:55:07 +08:00
listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"],
2023-10-26 04:27:07 +08:00
listSubscriptionsForAuthenticatedUserStubbed: [
"GET /user/marketplace_purchases/stubbed"
],
listWebhookDeliveries: ["GET /app/hook/deliveries"],
redeliverWebhookDelivery: [
"POST /app/hook/deliveries/{delivery_id}/attempts"
],
removeRepoFromInstallation: [
"DELETE /user/installations/{installation_id}/repositories/{repository_id}",
{},
{ renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] }
],
removeRepoFromInstallationForAuthenticatedUser: [
"DELETE /user/installations/{installation_id}/repositories/{repository_id}"
],
2022-11-04 00:55:07 +08:00
resetToken: ["PATCH /applications/{client_id}/token"],
revokeInstallationAccessToken: ["DELETE /installation/token"],
2023-10-26 04:27:07 +08:00
scopeToken: ["POST /applications/{client_id}/token/scoped"],
2022-11-04 00:55:07 +08:00
suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"],
2023-10-26 04:27:07 +08:00
unsuspendInstallation: [
"DELETE /app/installations/{installation_id}/suspended"
],
updateWebhookConfigForApp: ["PATCH /app/hook/config"]
2022-11-04 00:55:07 +08:00
},
billing: {
getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"],
2023-10-26 04:27:07 +08:00
getGithubActionsBillingUser: [
"GET /users/{username}/settings/billing/actions"
],
2022-11-04 00:55:07 +08:00
getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"],
2023-10-26 04:27:07 +08:00
getGithubPackagesBillingUser: [
"GET /users/{username}/settings/billing/packages"
],
getSharedStorageBillingOrg: [
"GET /orgs/{org}/settings/billing/shared-storage"
],
getSharedStorageBillingUser: [
"GET /users/{username}/settings/billing/shared-storage"
]
2022-11-04 00:55:07 +08:00
},
checks: {
2023-10-26 04:27:07 +08:00
create: ["POST /repos/{owner}/{repo}/check-runs"],
createSuite: ["POST /repos/{owner}/{repo}/check-suites"],
get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],
getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],
listAnnotations: [
"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"
],
listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],
listForSuite: [
"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"
],
listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],
rerequestRun: [
"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"
],
rerequestSuite: [
"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"
],
setSuitesPreferences: [
"PATCH /repos/{owner}/{repo}/check-suites/preferences"
],
update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]
2022-11-04 00:55:07 +08:00
},
codeScanning: {
2023-10-26 04:27:07 +08:00
deleteAnalysis: [
"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"
],
getAlert: [
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",
{},
{ renamedParameters: { alert_id: "alert_number" } }
],
getAnalysis: [
"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"
],
getCodeqlDatabase: [
"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}"
],
getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"],
getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],
listAlertInstances: [
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"
],
listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"],
listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"],
listAlertsInstances: [
"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances",
{},
{ renamed: ["codeScanning", "listAlertInstances"] }
],
listCodeqlDatabases: [
"GET /repos/{owner}/{repo}/code-scanning/codeql/databases"
],
listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"],
updateAlert: [
"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"
],
updateDefaultSetup: [
"PATCH /repos/{owner}/{repo}/code-scanning/default-setup"
],
uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"]
2022-11-04 00:55:07 +08:00
},
codesOfConduct: {
2023-10-26 04:27:07 +08:00
getAllCodesOfConduct: ["GET /codes_of_conduct"],
getConductCode: ["GET /codes_of_conduct/{key}"]
2022-11-04 00:55:07 +08:00
},
2023-10-26 04:27:07 +08:00
codespaces: {
addRepositoryForSecretForAuthenticatedUser: [
"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"
],
addSelectedRepoToOrgSecret: [
"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"
],
checkPermissionsForDevcontainer: [
"GET /repos/{owner}/{repo}/codespaces/permissions_check"
],
codespaceMachinesForAuthenticatedUser: [
"GET /user/codespaces/{codespace_name}/machines"
],
createForAuthenticatedUser: ["POST /user/codespaces"],
createOrUpdateOrgSecret: [
"PUT /orgs/{org}/codespaces/secrets/{secret_name}"
],
createOrUpdateRepoSecret: [
"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
],
createOrUpdateSecretForAuthenticatedUser: [
"PUT /user/codespaces/secrets/{secret_name}"
],
createWithPrForAuthenticatedUser: [
"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces"
],
createWithRepoForAuthenticatedUser: [
"POST /repos/{owner}/{repo}/codespaces"
],
deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"],
deleteFromOrganization: [
"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}"
],
deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"],
deleteRepoSecret: [
"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
],
deleteSecretForAuthenticatedUser: [
"DELETE /user/codespaces/secrets/{secret_name}"
],
exportForAuthenticatedUser: [
"POST /user/codespaces/{codespace_name}/exports"
],
getCodespacesForUserInOrg: [
"GET /orgs/{org}/members/{username}/codespaces"
],
getExportDetailsForAuthenticatedUser: [
"GET /user/codespaces/{codespace_name}/exports/{export_id}"
],
getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"],
getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"],
getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"],
getPublicKeyForAuthenticatedUser: [
"GET /user/codespaces/secrets/public-key"
],
getRepoPublicKey: [
"GET /repos/{owner}/{repo}/codespaces/secrets/public-key"
],
getRepoSecret: [
"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}"
],
getSecretForAuthenticatedUser: [
"GET /user/codespaces/secrets/{secret_name}"
],
listDevcontainersInRepositoryForAuthenticatedUser: [
"GET /repos/{owner}/{repo}/codespaces/devcontainers"
],
listForAuthenticatedUser: ["GET /user/codespaces"],
listInOrganization: [
"GET /orgs/{org}/codespaces",
{},
{ renamedParameters: { org_id: "org" } }
],
listInRepositoryForAuthenticatedUser: [
"GET /repos/{owner}/{repo}/codespaces"
],
listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"],
listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"],
listRepositoriesForSecretForAuthenticatedUser: [
"GET /user/codespaces/secrets/{secret_name}/repositories"
],
listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"],
listSelectedReposForOrgSecret: [
"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories"
],
preFlightWithRepoForAuthenticatedUser: [
"GET /repos/{owner}/{repo}/codespaces/new"
],
publishForAuthenticatedUser: [
"POST /user/codespaces/{codespace_name}/publish"
],
removeRepositoryForSecretForAuthenticatedUser: [
"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"
],
removeSelectedRepoFromOrgSecret: [
"DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}"
],
repoMachinesForAuthenticatedUser: [
"GET /repos/{owner}/{repo}/codespaces/machines"
],
setRepositoriesForSecretForAuthenticatedUser: [
"PUT /user/codespaces/secrets/{secret_name}/repositories"
],
setSelectedReposForOrgSecret: [
"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories"
],
startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"],
stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"],
stopInOrganization: [
"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop"
],
updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"]
2022-11-04 00:55:07 +08:00
},
2023-10-26 04:27:07 +08:00
copilot: {
addCopilotForBusinessSeatsForTeams: [
"POST /orgs/{org}/copilot/billing/selected_teams"
],
addCopilotForBusinessSeatsForUsers: [
"POST /orgs/{org}/copilot/billing/selected_users"
],
cancelCopilotSeatAssignmentForTeams: [
"DELETE /orgs/{org}/copilot/billing/selected_teams"
],
cancelCopilotSeatAssignmentForUsers: [
"DELETE /orgs/{org}/copilot/billing/selected_users"
],
getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"],
getCopilotSeatDetailsForUser: [
"GET /orgs/{org}/members/{username}/copilot"
],
listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"]
},
dependabot: {
addSelectedRepoToOrgSecret: [
"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"
],
createOrUpdateOrgSecret: [
"PUT /orgs/{org}/dependabot/secrets/{secret_name}"
],
createOrUpdateRepoSecret: [
"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"
],
deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"],
deleteRepoSecret: [
"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"
],
getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"],
getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"],
getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"],
getRepoPublicKey: [
"GET /repos/{owner}/{repo}/dependabot/secrets/public-key"
],
getRepoSecret: [
"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}"
],
listAlertsForEnterprise: [
"GET /enterprises/{enterprise}/dependabot/alerts"
],
listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"],
listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"],
listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"],
listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"],
listSelectedReposForOrgSecret: [
"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories"
],
removeSelectedRepoFromOrgSecret: [
"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}"
],
setSelectedReposForOrgSecret: [
"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories"
],
updateAlert: [
"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"
]
},
dependencyGraph: {
createRepositorySnapshot: [
"POST /repos/{owner}/{repo}/dependency-graph/snapshots"
],
diffRange: [
"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"
],
exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"]
},
emojis: { get: ["GET /emojis"] },
2022-11-04 00:55:07 +08:00
gists: {
checkIsStarred: ["GET /gists/{gist_id}/star"],
create: ["POST /gists"],
createComment: ["POST /gists/{gist_id}/comments"],
delete: ["DELETE /gists/{gist_id}"],
deleteComment: ["DELETE /gists/{gist_id}/comments/{comment_id}"],
fork: ["POST /gists/{gist_id}/forks"],
get: ["GET /gists/{gist_id}"],
getComment: ["GET /gists/{gist_id}/comments/{comment_id}"],
getRevision: ["GET /gists/{gist_id}/{sha}"],
list: ["GET /gists"],
listComments: ["GET /gists/{gist_id}/comments"],
listCommits: ["GET /gists/{gist_id}/commits"],
listForUser: ["GET /users/{username}/gists"],
listForks: ["GET /gists/{gist_id}/forks"],
listPublic: ["GET /gists/public"],
listStarred: ["GET /gists/starred"],
star: ["PUT /gists/{gist_id}/star"],
unstar: ["DELETE /gists/{gist_id}/star"],
update: ["PATCH /gists/{gist_id}"],
updateComment: ["PATCH /gists/{gist_id}/comments/{comment_id}"]
},
git: {
createBlob: ["POST /repos/{owner}/{repo}/git/blobs"],
createCommit: ["POST /repos/{owner}/{repo}/git/commits"],
createRef: ["POST /repos/{owner}/{repo}/git/refs"],
createTag: ["POST /repos/{owner}/{repo}/git/tags"],
createTree: ["POST /repos/{owner}/{repo}/git/trees"],
deleteRef: ["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],
getBlob: ["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],
getCommit: ["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],
getRef: ["GET /repos/{owner}/{repo}/git/ref/{ref}"],
getTag: ["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],
getTree: ["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],
listMatchingRefs: ["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],
updateRef: ["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]
},
gitignore: {
getAllTemplates: ["GET /gitignore/templates"],
getTemplate: ["GET /gitignore/templates/{name}"]
},
interactions: {
2023-10-26 04:27:07 +08:00
getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"],
getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"],
getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"],
getRestrictionsForYourPublicRepos: [
"GET /user/interaction-limits",
{},
{ renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] }
],
removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"],
removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"],
removeRestrictionsForRepo: [
"DELETE /repos/{owner}/{repo}/interaction-limits"
],
removeRestrictionsForYourPublicRepos: [
"DELETE /user/interaction-limits",
{},
{ renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] }
],
setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"],
setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"],
setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"],
setRestrictionsForYourPublicRepos: [
"PUT /user/interaction-limits",
{},
{ renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] }
]
2022-11-04 00:55:07 +08:00
},
issues: {
2023-10-26 04:27:07 +08:00
addAssignees: [
"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"
],
2022-11-04 00:55:07 +08:00
addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],
checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"],
2023-10-26 04:27:07 +08:00
checkUserCanBeAssignedToIssue: [
"GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}"
],
2022-11-04 00:55:07 +08:00
create: ["POST /repos/{owner}/{repo}/issues"],
2023-10-26 04:27:07 +08:00
createComment: [
"POST /repos/{owner}/{repo}/issues/{issue_number}/comments"
],
2022-11-04 00:55:07 +08:00
createLabel: ["POST /repos/{owner}/{repo}/labels"],
createMilestone: ["POST /repos/{owner}/{repo}/milestones"],
2023-10-26 04:27:07 +08:00
deleteComment: [
"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"
],
2022-11-04 00:55:07 +08:00
deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"],
2023-10-26 04:27:07 +08:00
deleteMilestone: [
"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"
],
2022-11-04 00:55:07 +08:00
get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"],
getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],
getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"],
getLabel: ["GET /repos/{owner}/{repo}/labels/{name}"],
getMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],
list: ["GET /issues"],
listAssignees: ["GET /repos/{owner}/{repo}/assignees"],
listComments: ["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],
listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"],
listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],
listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"],
2023-10-26 04:27:07 +08:00
listEventsForTimeline: [
"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"
],
2022-11-04 00:55:07 +08:00
listForAuthenticatedUser: ["GET /user/issues"],
listForOrg: ["GET /orgs/{org}/issues"],
listForRepo: ["GET /repos/{owner}/{repo}/issues"],
2023-10-26 04:27:07 +08:00
listLabelsForMilestone: [
"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"
],
2022-11-04 00:55:07 +08:00
listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"],
2023-10-26 04:27:07 +08:00
listLabelsOnIssue: [
"GET /repos/{owner}/{repo}/issues/{issue_number}/labels"
],
2022-11-04 00:55:07 +08:00
listMilestones: ["GET /repos/{owner}/{repo}/milestones"],
lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],
2023-10-26 04:27:07 +08:00
removeAllLabels: [
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"
],
removeAssignees: [
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"
],
removeLabel: [
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"
],
2022-11-04 00:55:07 +08:00
setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],
unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],
update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],
updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],
updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"],
2023-10-26 04:27:07 +08:00
updateMilestone: [
"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"
]
2022-11-04 00:55:07 +08:00
},
licenses: {
get: ["GET /licenses/{license}"],
getAllCommonlyUsed: ["GET /licenses"],
getForRepo: ["GET /repos/{owner}/{repo}/license"]
},
markdown: {
render: ["POST /markdown"],
2023-10-26 04:27:07 +08:00
renderRaw: [
"POST /markdown/raw",
{ headers: { "content-type": "text/plain; charset=utf-8" } }
]
2022-11-04 00:55:07 +08:00
},
meta: {
2023-10-26 04:27:07 +08:00
get: ["GET /meta"],
getAllVersions: ["GET /versions"],
getOctocat: ["GET /octocat"],
getZen: ["GET /zen"],
root: ["GET /"]
2022-11-04 00:55:07 +08:00
},
migrations: {
2023-10-26 04:27:07 +08:00
cancelImport: [
"DELETE /repos/{owner}/{repo}/import",
{},
{
deprecated: "octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import"
}
],
deleteArchiveForAuthenticatedUser: [
"DELETE /user/migrations/{migration_id}/archive"
],
deleteArchiveForOrg: [
"DELETE /orgs/{org}/migrations/{migration_id}/archive"
],
downloadArchiveForOrg: [
"GET /orgs/{org}/migrations/{migration_id}/archive"
],
getArchiveForAuthenticatedUser: [
"GET /user/migrations/{migration_id}/archive"
],
getCommitAuthors: [
"GET /repos/{owner}/{repo}/import/authors",
{},
{
deprecated: "octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors"
}
],
getImportStatus: [
"GET /repos/{owner}/{repo}/import",
{},
{
deprecated: "octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status"
}
],
getLargeFiles: [
"GET /repos/{owner}/{repo}/import/large_files",
{},
{
deprecated: "octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files"
}
],
getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"],
getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"],
listForAuthenticatedUser: ["GET /user/migrations"],
listForOrg: ["GET /orgs/{org}/migrations"],
listReposForAuthenticatedUser: [
"GET /user/migrations/{migration_id}/repositories"
],
listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"],
listReposForUser: [
"GET /user/migrations/{migration_id}/repositories",
{},
{ renamed: ["migrations", "listReposForAuthenticatedUser"] }
],
mapCommitAuthor: [
"PATCH /repos/{owner}/{repo}/import/authors/{author_id}",
{},
{
deprecated: "octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author"
}
],
setLfsPreference: [
"PATCH /repos/{owner}/{repo}/import/lfs",
{},
{
deprecated: "octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference"
}
],
2022-11-04 00:55:07 +08:00
startForAuthenticatedUser: ["POST /user/migrations"],
startForOrg: ["POST /orgs/{org}/migrations"],
2023-10-26 04:27:07 +08:00
startImport: [
"PUT /repos/{owner}/{repo}/import",
{},
{
deprecated: "octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import"
}
],
unlockRepoForAuthenticatedUser: [
"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"
],
unlockRepoForOrg: [
"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"
],
updateImport: [
"PATCH /repos/{owner}/{repo}/import",
{},
{
deprecated: "octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import"
}
]
2022-11-04 00:55:07 +08:00
},
orgs: {
2023-10-26 04:27:07 +08:00
addSecurityManagerTeam: [
"PUT /orgs/{org}/security-managers/teams/{team_slug}"
],
2022-11-04 00:55:07 +08:00
blockUser: ["PUT /orgs/{org}/blocks/{username}"],
2023-10-26 04:27:07 +08:00
cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"],
2022-11-04 00:55:07 +08:00
checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"],
checkMembershipForUser: ["GET /orgs/{org}/members/{username}"],
checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"],
2023-10-26 04:27:07 +08:00
convertMemberToOutsideCollaborator: [
"PUT /orgs/{org}/outside_collaborators/{username}"
],
2022-11-04 00:55:07 +08:00
createInvitation: ["POST /orgs/{org}/invitations"],
2023-10-26 04:27:07 +08:00
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
createOrUpdateCustomPropertiesValuesForRepos: [
"PATCH /orgs/{org}/properties/values"
],
createOrUpdateCustomProperty: [
"PUT /orgs/{org}/properties/schema/{custom_property_name}"
],
2022-11-04 00:55:07 +08:00
createWebhook: ["POST /orgs/{org}/hooks"],
2023-10-26 04:27:07 +08:00
delete: ["DELETE /orgs/{org}"],
2022-11-04 00:55:07 +08:00
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
2023-10-26 04:27:07 +08:00
enableOrDisableSecurityProductOnAllOrgRepos: [
"POST /orgs/{org}/{security_product}/{enablement}"
],
2022-11-04 00:55:07 +08:00
get: ["GET /orgs/{org}"],
2023-10-26 04:27:07 +08:00
getAllCustomProperties: ["GET /orgs/{org}/properties/schema"],
getCustomProperty: [
"GET /orgs/{org}/properties/schema/{custom_property_name}"
],
2022-11-04 00:55:07 +08:00
getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"],
getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"],
2023-10-26 04:27:07 +08:00
getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"],
getWebhookDelivery: [
"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"
],
2022-11-04 00:55:07 +08:00
list: ["GET /organizations"],
2023-10-26 04:27:07 +08:00
listAppInstallations: ["GET /orgs/{org}/installations"],
2022-11-04 00:55:07 +08:00
listBlockedUsers: ["GET /orgs/{org}/blocks"],
2023-10-26 04:27:07 +08:00
listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"],
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
2022-11-04 00:55:07 +08:00
listForAuthenticatedUser: ["GET /user/orgs"],
listForUser: ["GET /users/{username}/orgs"],
listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"],
listMembers: ["GET /orgs/{org}/members"],
listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"],
listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"],
2023-10-26 04:27:07 +08:00
listPatGrantRepositories: [
"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories"
],
listPatGrantRequestRepositories: [
"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories"
],
listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"],
listPatGrants: ["GET /orgs/{org}/personal-access-tokens"],
2022-11-04 00:55:07 +08:00
listPendingInvitations: ["GET /orgs/{org}/invitations"],
listPublicMembers: ["GET /orgs/{org}/public_members"],
2023-10-26 04:27:07 +08:00
listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"],
listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"],
2022-11-04 00:55:07 +08:00
listWebhooks: ["GET /orgs/{org}/hooks"],
pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"],
2023-10-26 04:27:07 +08:00
redeliverWebhookDelivery: [
"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"
],
removeCustomProperty: [
"DELETE /orgs/{org}/properties/schema/{custom_property_name}"
],
2022-11-04 00:55:07 +08:00
removeMember: ["DELETE /orgs/{org}/members/{username}"],
removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"],
2023-10-26 04:27:07 +08:00
removeOutsideCollaborator: [
"DELETE /orgs/{org}/outside_collaborators/{username}"
],
removePublicMembershipForAuthenticatedUser: [
"DELETE /orgs/{org}/public_members/{username}"
],
removeSecurityManagerTeam: [
"DELETE /orgs/{org}/security-managers/teams/{team_slug}"
],
reviewPatGrantRequest: [
"POST /orgs/{org}/personal-access-token-requests/{pat_request_id}"
],
reviewPatGrantRequestsInBulk: [
"POST /orgs/{org}/personal-access-token-requests"
],
2022-11-04 00:55:07 +08:00
setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"],
2023-10-26 04:27:07 +08:00
setPublicMembershipForAuthenticatedUser: [
"PUT /orgs/{org}/public_members/{username}"
],
2022-11-04 00:55:07 +08:00
unblockUser: ["DELETE /orgs/{org}/blocks/{username}"],
update: ["PATCH /orgs/{org}"],
2023-10-26 04:27:07 +08:00
updateMembershipForAuthenticatedUser: [
"PATCH /user/memberships/orgs/{org}"
],
updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"],
updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"],
updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"],
updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"]
},
packages: {
deletePackageForAuthenticatedUser: [
"DELETE /user/packages/{package_type}/{package_name}"
],
deletePackageForOrg: [
"DELETE /orgs/{org}/packages/{package_type}/{package_name}"
],
deletePackageForUser: [
"DELETE /users/{username}/packages/{package_type}/{package_name}"
],
deletePackageVersionForAuthenticatedUser: [
"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"
],
deletePackageVersionForOrg: [
"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"
],
deletePackageVersionForUser: [
"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"
],
getAllPackageVersionsForAPackageOwnedByAnOrg: [
"GET /orgs/{org}/packages/{package_type}/{package_name}/versions",
{},
{ renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] }
],
getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [
"GET /user/packages/{package_type}/{package_name}/versions",
{},
{
renamed: [
"packages",
"getAllPackageVersionsForPackageOwnedByAuthenticatedUser"
]
}
],
getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [
"GET /user/packages/{package_type}/{package_name}/versions"
],
getAllPackageVersionsForPackageOwnedByOrg: [
"GET /orgs/{org}/packages/{package_type}/{package_name}/versions"
],
getAllPackageVersionsForPackageOwnedByUser: [
"GET /users/{username}/packages/{package_type}/{package_name}/versions"
],
getPackageForAuthenticatedUser: [
"GET /user/packages/{package_type}/{package_name}"
],
getPackageForOrganization: [
"GET /orgs/{org}/packages/{package_type}/{package_name}"
],
getPackageForUser: [
"GET /users/{username}/packages/{package_type}/{package_name}"
],
getPackageVersionForAuthenticatedUser: [
"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"
],
getPackageVersionForOrganization: [
"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"
],
getPackageVersionForUser: [
"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"
],
listDockerMigrationConflictingPackagesForAuthenticatedUser: [
"GET /user/docker/conflicts"
],
listDockerMigrationConflictingPackagesForOrganization: [
"GET /orgs/{org}/docker/conflicts"
],
listDockerMigrationConflictingPackagesForUser: [
"GET /users/{username}/docker/conflicts"
],
listPackagesForAuthenticatedUser: ["GET /user/packages"],
listPackagesForOrganization: ["GET /orgs/{org}/packages"],
listPackagesForUser: ["GET /users/{username}/packages"],
restorePackageForAuthenticatedUser: [
"POST /user/packages/{package_type}/{package_name}/restore{?token}"
],
restorePackageForOrg: [
"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}"
],
restorePackageForUser: [
"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}"
],
restorePackageVersionForAuthenticatedUser: [
"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"
],
restorePackageVersionForOrg: [
"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"
],
restorePackageVersionForUser: [
"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"
]
2022-11-04 00:55:07 +08:00
},
projects: {
2023-10-26 04:27:07 +08:00
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}"]
2022-11-04 00:55:07 +08:00
},
pulls: {
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
create: ["POST /repos/{owner}/{repo}/pulls"],
2023-10-26 04:27:07 +08:00
createReplyForReviewComment: [
"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"
],
2022-11-04 00:55:07 +08:00
createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],
2023-10-26 04:27:07 +08:00
createReviewComment: [
"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"
],
deletePendingReview: [
"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"
],
deleteReviewComment: [
"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"
],
dismissReview: [
"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"
],
2022-11-04 00:55:07 +08:00
get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"],
2023-10-26 04:27:07 +08:00
getReview: [
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"
],
2022-11-04 00:55:07 +08:00
getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],
list: ["GET /repos/{owner}/{repo}/pulls"],
2023-10-26 04:27:07 +08:00
listCommentsForReview: [
"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"
],
2022-11-04 00:55:07 +08:00
listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],
listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],
2023-10-26 04:27:07 +08:00
listRequestedReviewers: [
"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"
],
listReviewComments: [
"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"
],
2022-11-04 00:55:07 +08:00
listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"],
listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],
merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
2023-10-26 04:27:07 +08:00
removeRequestedReviewers: [
"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"
],
requestReviewers: [
"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"
],
submitReview: [
"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"
],
2022-11-04 00:55:07 +08:00
update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],
2023-10-26 04:27:07 +08:00
updateBranch: [
"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"
],
updateReview: [
"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"
],
updateReviewComment: [
"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"
]
2022-11-04 00:55:07 +08:00
},
2023-10-26 04:27:07 +08:00
rateLimit: { get: ["GET /rate_limit"] },
2022-11-04 00:55:07 +08:00
reactions: {
2023-10-26 04:27:07 +08:00
createForCommitComment: [
"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"
],
createForIssue: [
"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"
],
createForIssueComment: [
"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"
],
createForPullRequestReviewComment: [
"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"
],
createForRelease: [
"POST /repos/{owner}/{repo}/releases/{release_id}/reactions"
],
createForTeamDiscussionCommentInOrg: [
"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"
],
createForTeamDiscussionInOrg: [
"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"
],
deleteForCommitComment: [
"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}"
],
deleteForIssue: [
"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}"
],
deleteForIssueComment: [
"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}"
],
deleteForPullRequestComment: [
"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}"
],
deleteForRelease: [
"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}"
],
deleteForTeamDiscussion: [
"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}"
],
deleteForTeamDiscussionComment: [
"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}"
],
listForCommitComment: [
"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions"
],
listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"],
listForIssueComment: [
"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"
],
listForPullRequestReviewComment: [
"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions"
],
listForRelease: [
"GET /repos/{owner}/{repo}/releases/{release_id}/reactions"
],
listForTeamDiscussionCommentInOrg: [
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions"
],
listForTeamDiscussionInOrg: [
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions"
]
2022-11-04 00:55:07 +08:00
},
repos: {
2023-10-26 04:27:07 +08:00
acceptInvitation: [
"PATCH /user/repository_invitations/{invitation_id}",
{},
{ renamed: ["repos", "acceptInvitationForAuthenticatedUser"] }
],
acceptInvitationForAuthenticatedUser: [
"PATCH /user/repository_invitations/{invitation_id}"
],
addAppAccessRestrictions: [
"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
{},
{ mapToData: "apps" }
],
2022-11-04 00:55:07 +08:00
addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"],
2023-10-26 04:27:07 +08:00
addStatusCheckContexts: [
"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
{},
{ mapToData: "contexts" }
],
addTeamAccessRestrictions: [
"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
{},
{ mapToData: "teams" }
],
addUserAccessRestrictions: [
"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
{},
{ mapToData: "users" }
],
checkAutomatedSecurityFixes: [
"GET /repos/{owner}/{repo}/automated-security-fixes"
],
2022-11-04 00:55:07 +08:00
checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"],
2023-10-26 04:27:07 +08:00
checkVulnerabilityAlerts: [
"GET /repos/{owner}/{repo}/vulnerability-alerts"
],
codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"],
2022-11-04 00:55:07 +08:00
compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"],
2023-10-26 04:27:07 +08:00
compareCommitsWithBasehead: [
"GET /repos/{owner}/{repo}/compare/{basehead}"
],
createAutolink: ["POST /repos/{owner}/{repo}/autolinks"],
createCommitComment: [
"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"
],
createCommitSignatureProtection: [
"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"
],
2022-11-04 00:55:07 +08:00
createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"],
createDeployKey: ["POST /repos/{owner}/{repo}/keys"],
createDeployment: ["POST /repos/{owner}/{repo}/deployments"],
2023-10-26 04:27:07 +08:00
createDeploymentBranchPolicy: [
"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"
],
createDeploymentProtectionRule: [
"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"
],
createDeploymentStatus: [
"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"
],
2022-11-04 00:55:07 +08:00
createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"],
createForAuthenticatedUser: ["POST /user/repos"],
createFork: ["POST /repos/{owner}/{repo}/forks"],
createInOrg: ["POST /orgs/{org}/repos"],
2023-10-26 04:27:07 +08:00
createOrUpdateEnvironment: [
"PUT /repos/{owner}/{repo}/environments/{environment_name}"
],
2022-11-04 00:55:07 +08:00
createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"],
2023-10-26 04:27:07 +08:00
createOrgRuleset: ["POST /orgs/{org}/rulesets"],
createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployment"],
createPagesSite: ["POST /repos/{owner}/{repo}/pages"],
2022-11-04 00:55:07 +08:00
createRelease: ["POST /repos/{owner}/{repo}/releases"],
2023-10-26 04:27:07 +08:00
createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"],
createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"],
createUsingTemplate: [
"POST /repos/{template_owner}/{template_repo}/generate"
],
2022-11-04 00:55:07 +08:00
createWebhook: ["POST /repos/{owner}/{repo}/hooks"],
2023-10-26 04:27:07 +08:00
declineInvitation: [
"DELETE /user/repository_invitations/{invitation_id}",
{},
{ renamed: ["repos", "declineInvitationForAuthenticatedUser"] }
],
declineInvitationForAuthenticatedUser: [
"DELETE /user/repository_invitations/{invitation_id}"
],
2022-11-04 00:55:07 +08:00
delete: ["DELETE /repos/{owner}/{repo}"],
2023-10-26 04:27:07 +08:00
deleteAccessRestrictions: [
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"
],
deleteAdminBranchProtection: [
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"
],
deleteAnEnvironment: [
"DELETE /repos/{owner}/{repo}/environments/{environment_name}"
],
deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"],
deleteBranchProtection: [
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection"
],
2022-11-04 00:55:07 +08:00
deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],
2023-10-26 04:27:07 +08:00
deleteCommitSignatureProtection: [
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"
],
2022-11-04 00:55:07 +08:00
deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"],
2023-10-26 04:27:07 +08:00
deleteDeployment: [
"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"
],
deleteDeploymentBranchPolicy: [
"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"
],
2022-11-04 00:55:07 +08:00
deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"],
2023-10-26 04:27:07 +08:00
deleteInvitation: [
"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"
],
deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"],
deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"],
deletePullRequestReviewProtection: [
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"
],
2022-11-04 00:55:07 +08:00
deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"],
2023-10-26 04:27:07 +08:00
deleteReleaseAsset: [
"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"
],
deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"],
deleteTagProtection: [
"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}"
],
2022-11-04 00:55:07 +08:00
deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],
2023-10-26 04:27:07 +08:00
disableAutomatedSecurityFixes: [
"DELETE /repos/{owner}/{repo}/automated-security-fixes"
],
disableDeploymentProtectionRule: [
"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"
],
disablePrivateVulnerabilityReporting: [
"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"
],
disableVulnerabilityAlerts: [
"DELETE /repos/{owner}/{repo}/vulnerability-alerts"
],
downloadArchive: [
"GET /repos/{owner}/{repo}/zipball/{ref}",
{},
{ renamed: ["repos", "downloadZipballArchive"] }
],
downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"],
downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"],
enableAutomatedSecurityFixes: [
"PUT /repos/{owner}/{repo}/automated-security-fixes"
],
enablePrivateVulnerabilityReporting: [
"PUT /repos/{owner}/{repo}/private-vulnerability-reporting"
],
enableVulnerabilityAlerts: [
"PUT /repos/{owner}/{repo}/vulnerability-alerts"
],
generateReleaseNotes: [
"POST /repos/{owner}/{repo}/releases/generate-notes"
],
2022-11-04 00:55:07 +08:00
get: ["GET /repos/{owner}/{repo}"],
2023-10-26 04:27:07 +08:00
getAccessRestrictions: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"
],
getAdminBranchProtection: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"
],
getAllDeploymentProtectionRules: [
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules"
],
getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"],
getAllStatusCheckContexts: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"
],
getAllTopics: ["GET /repos/{owner}/{repo}/topics"],
getAppsWithAccessToProtectedBranch: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"
],
getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"],
2022-11-04 00:55:07 +08:00
getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"],
2023-10-26 04:27:07 +08:00
getBranchProtection: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection"
],
getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"],
2022-11-04 00:55:07 +08:00
getClones: ["GET /repos/{owner}/{repo}/traffic/clones"],
getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"],
2023-10-26 04:27:07 +08:00
getCollaboratorPermissionLevel: [
"GET /repos/{owner}/{repo}/collaborators/{username}/permission"
],
2022-11-04 00:55:07 +08:00
getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"],
getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"],
getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"],
getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"],
2023-10-26 04:27:07 +08:00
getCommitSignatureProtection: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"
],
getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"],
2022-11-04 00:55:07 +08:00
getContent: ["GET /repos/{owner}/{repo}/contents/{path}"],
getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"],
2023-10-26 04:27:07 +08:00
getCustomDeploymentProtectionRule: [
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"
],
getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"],
2022-11-04 00:55:07 +08:00
getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"],
getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],
2023-10-26 04:27:07 +08:00
getDeploymentBranchPolicy: [
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"
],
getDeploymentStatus: [
"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"
],
getEnvironment: [
"GET /repos/{owner}/{repo}/environments/{environment_name}"
],
2022-11-04 00:55:07 +08:00
getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"],
getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"],
2023-10-26 04:27:07 +08:00
getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"],
getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"],
getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"],
getOrgRulesets: ["GET /orgs/{org}/rulesets"],
2022-11-04 00:55:07 +08:00
getPages: ["GET /repos/{owner}/{repo}/pages"],
getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],
2023-10-26 04:27:07 +08:00
getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"],
2022-11-04 00:55:07 +08:00
getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"],
2023-10-26 04:27:07 +08:00
getPullRequestReviewProtection: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"
],
2022-11-04 00:55:07 +08:00
getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"],
getReadme: ["GET /repos/{owner}/{repo}/readme"],
2023-10-26 04:27:07 +08:00
getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"],
2022-11-04 00:55:07 +08:00
getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"],
getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],
getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"],
2023-10-26 04:27:07 +08:00
getRepoRuleSuite: [
"GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}"
],
getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"],
getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"],
getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"],
getStatusChecksProtection: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"
],
getTeamsWithAccessToProtectedBranch: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"
],
2022-11-04 00:55:07 +08:00
getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"],
getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"],
2023-10-26 04:27:07 +08:00
getUsersWithAccessToProtectedBranch: [
"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"
],
2022-11-04 00:55:07 +08:00
getViews: ["GET /repos/{owner}/{repo}/traffic/views"],
getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"],
2023-10-26 04:27:07 +08:00
getWebhookConfigForRepo: [
"GET /repos/{owner}/{repo}/hooks/{hook_id}/config"
],
getWebhookDelivery: [
"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"
],
listActivities: ["GET /repos/{owner}/{repo}/activity"],
listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"],
2022-11-04 00:55:07 +08:00
listBranches: ["GET /repos/{owner}/{repo}/branches"],
2023-10-26 04:27:07 +08:00
listBranchesForHeadCommit: [
"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"
],
2022-11-04 00:55:07 +08:00
listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"],
2023-10-26 04:27:07 +08:00
listCommentsForCommit: [
"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"
],
2022-11-04 00:55:07 +08:00
listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"],
2023-10-26 04:27:07 +08:00
listCommitStatusesForRef: [
"GET /repos/{owner}/{repo}/commits/{ref}/statuses"
],
2022-11-04 00:55:07 +08:00
listCommits: ["GET /repos/{owner}/{repo}/commits"],
listContributors: ["GET /repos/{owner}/{repo}/contributors"],
2023-10-26 04:27:07 +08:00
listCustomDeploymentRuleIntegrations: [
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps"
],
2022-11-04 00:55:07 +08:00
listDeployKeys: ["GET /repos/{owner}/{repo}/keys"],
2023-10-26 04:27:07 +08:00
listDeploymentBranchPolicies: [
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies"
],
listDeploymentStatuses: [
"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"
],
2022-11-04 00:55:07 +08:00
listDeployments: ["GET /repos/{owner}/{repo}/deployments"],
listForAuthenticatedUser: ["GET /user/repos"],
listForOrg: ["GET /orgs/{org}/repos"],
listForUser: ["GET /users/{username}/repos"],
listForks: ["GET /repos/{owner}/{repo}/forks"],
listInvitations: ["GET /repos/{owner}/{repo}/invitations"],
listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"],
listLanguages: ["GET /repos/{owner}/{repo}/languages"],
listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"],
listPublic: ["GET /repositories"],
2023-10-26 04:27:07 +08:00
listPullRequestsAssociatedWithCommit: [
"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"
],
listReleaseAssets: [
"GET /repos/{owner}/{repo}/releases/{release_id}/assets"
],
2022-11-04 00:55:07 +08:00
listReleases: ["GET /repos/{owner}/{repo}/releases"],
2023-10-26 04:27:07 +08:00
listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"],
2022-11-04 00:55:07 +08:00
listTags: ["GET /repos/{owner}/{repo}/tags"],
listTeams: ["GET /repos/{owner}/{repo}/teams"],
2023-10-26 04:27:07 +08:00
listWebhookDeliveries: [
"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"
],
2022-11-04 00:55:07 +08:00
listWebhooks: ["GET /repos/{owner}/{repo}/hooks"],
merge: ["POST /repos/{owner}/{repo}/merges"],
2023-10-26 04:27:07 +08:00
mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"],
2022-11-04 00:55:07 +08:00
pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],
2023-10-26 04:27:07 +08:00
redeliverWebhookDelivery: [
"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"
],
removeAppAccessRestrictions: [
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
{},
{ mapToData: "apps" }
],
removeCollaborator: [
"DELETE /repos/{owner}/{repo}/collaborators/{username}"
],
removeStatusCheckContexts: [
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
{},
{ mapToData: "contexts" }
],
removeStatusCheckProtection: [
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"
],
removeTeamAccessRestrictions: [
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
{},
{ mapToData: "teams" }
],
removeUserAccessRestrictions: [
"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
{},
{ mapToData: "users" }
],
renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"],
replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"],
2022-11-04 00:55:07 +08:00
requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"],
2023-10-26 04:27:07 +08:00
setAdminBranchProtection: [
"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"
],
setAppAccessRestrictions: [
"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",
{},
{ mapToData: "apps" }
],
setStatusCheckContexts: [
"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",
{},
{ mapToData: "contexts" }
],
setTeamAccessRestrictions: [
"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",
{},
{ mapToData: "teams" }
],
setUserAccessRestrictions: [
"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",
{},
{ mapToData: "users" }
],
2022-11-04 00:55:07 +08:00
testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],
transfer: ["POST /repos/{owner}/{repo}/transfer"],
update: ["PATCH /repos/{owner}/{repo}"],
2023-10-26 04:27:07 +08:00
updateBranchProtection: [
"PUT /repos/{owner}/{repo}/branches/{branch}/protection"
],
2022-11-04 00:55:07 +08:00
updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],
2023-10-26 04:27:07 +08:00
updateDeploymentBranchPolicy: [
"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}"
],
2022-11-04 00:55:07 +08:00
updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"],
2023-10-26 04:27:07 +08:00
updateInvitation: [
"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"
],
updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"],
updatePullRequestReviewProtection: [
"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"
],
2022-11-04 00:55:07 +08:00
updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"],
2023-10-26 04:27:07 +08:00
updateReleaseAsset: [
"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"
],
updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"],
updateStatusCheckPotection: [
"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",
{},
{ renamed: ["repos", "updateStatusCheckProtection"] }
],
updateStatusCheckProtection: [
"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"
],
2022-11-04 00:55:07 +08:00
updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],
2023-10-26 04:27:07 +08:00
updateWebhookConfigForRepo: [
"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"
],
uploadReleaseAsset: [
"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",
{ baseUrl: "https://uploads.github.com" }
]
2022-11-04 00:55:07 +08:00
},
search: {
code: ["GET /search/code"],
2023-10-26 04:27:07 +08:00
commits: ["GET /search/commits"],
2022-11-04 00:55:07 +08:00
issuesAndPullRequests: ["GET /search/issues"],
labels: ["GET /search/labels"],
repos: ["GET /search/repositories"],
2023-10-26 04:27:07 +08:00
topics: ["GET /search/topics"],
2022-11-04 00:55:07 +08:00
users: ["GET /search/users"]
},
2023-10-26 04:27:07 +08:00
secretScanning: {
getAlert: [
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
],
listAlertsForEnterprise: [
"GET /enterprises/{enterprise}/secret-scanning/alerts"
],
listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"],
listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"],
listLocationsForAlert: [
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations"
],
updateAlert: [
"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
]
},
securityAdvisories: {
createPrivateVulnerabilityReport: [
"POST /repos/{owner}/{repo}/security-advisories/reports"
],
createRepositoryAdvisory: [
"POST /repos/{owner}/{repo}/security-advisories"
],
createRepositoryAdvisoryCveRequest: [
"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve"
],
getGlobalAdvisory: ["GET /advisories/{ghsa_id}"],
getRepositoryAdvisory: [
"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}"
],
listGlobalAdvisories: ["GET /advisories"],
listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"],
listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"],
updateRepositoryAdvisory: [
"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}"
]
},
2022-11-04 00:55:07 +08:00
teams: {
2023-10-26 04:27:07 +08:00
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}"
],
2022-11-04 00:55:07 +08:00
create: ["POST /orgs/{org}/teams"],
2023-10-26 04:27:07 +08:00
createDiscussionCommentInOrg: [
"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"
],
2022-11-04 00:55:07 +08:00
createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"],
2023-10-26 04:27:07 +08:00
deleteDiscussionCommentInOrg: [
"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"
],
deleteDiscussionInOrg: [
"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"
],
2022-11-04 00:55:07 +08:00
deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"],
getByName: ["GET /orgs/{org}/teams/{team_slug}"],
2023-10-26 04:27:07 +08:00
getDiscussionCommentInOrg: [
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"
],
getDiscussionInOrg: [
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"
],
getMembershipForUserInOrg: [
"GET /orgs/{org}/teams/{team_slug}/memberships/{username}"
],
2022-11-04 00:55:07 +08:00
list: ["GET /orgs/{org}/teams"],
listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"],
2023-10-26 04:27:07 +08:00
listDiscussionCommentsInOrg: [
"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"
],
2022-11-04 00:55:07 +08:00
listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"],
listForAuthenticatedUser: ["GET /user/teams"],
listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"],
2023-10-26 04:27:07 +08:00
listPendingInvitationsInOrg: [
"GET /orgs/{org}/teams/{team_slug}/invitations"
],
listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"],
2022-11-04 00:55:07 +08:00
listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"],
2023-10-26 04:27:07 +08:00
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}"
],
updateDiscussionCommentInOrg: [
"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"
],
updateDiscussionInOrg: [
"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"
],
2022-11-04 00:55:07 +08:00
updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"]
},
users: {
2023-10-26 04:27:07 +08:00
addEmailForAuthenticated: [
"POST /user/emails",
{},
{ renamed: ["users", "addEmailForAuthenticatedUser"] }
],
addEmailForAuthenticatedUser: ["POST /user/emails"],
addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"],
2022-11-04 00:55:07 +08:00
block: ["PUT /user/blocks/{username}"],
checkBlocked: ["GET /user/blocks/{username}"],
checkFollowingForUser: ["GET /users/{username}/following/{target_user}"],
checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"],
2023-10-26 04:27:07 +08:00
createGpgKeyForAuthenticated: [
"POST /user/gpg_keys",
{},
{ renamed: ["users", "createGpgKeyForAuthenticatedUser"] }
],
createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"],
createPublicSshKeyForAuthenticated: [
"POST /user/keys",
{},
{ renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] }
],
createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"],
createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"],
deleteEmailForAuthenticated: [
"DELETE /user/emails",
{},
{ renamed: ["users", "deleteEmailForAuthenticatedUser"] }
],
deleteEmailForAuthenticatedUser: ["DELETE /user/emails"],
deleteGpgKeyForAuthenticated: [
"DELETE /user/gpg_keys/{gpg_key_id}",
{},
{ renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] }
],
deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"],
deletePublicSshKeyForAuthenticated: [
"DELETE /user/keys/{key_id}",
{},
{ renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] }
],
deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"],
deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"],
deleteSshSigningKeyForAuthenticatedUser: [
"DELETE /user/ssh_signing_keys/{ssh_signing_key_id}"
],
2022-11-04 00:55:07 +08:00
follow: ["PUT /user/following/{username}"],
getAuthenticated: ["GET /user"],
getByUsername: ["GET /users/{username}"],
getContextForUser: ["GET /users/{username}/hovercard"],
2023-10-26 04:27:07 +08:00
getGpgKeyForAuthenticated: [
"GET /user/gpg_keys/{gpg_key_id}",
{},
{ renamed: ["users", "getGpgKeyForAuthenticatedUser"] }
],
getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"],
getPublicSshKeyForAuthenticated: [
"GET /user/keys/{key_id}",
{},
{ renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] }
],
getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"],
getSshSigningKeyForAuthenticatedUser: [
"GET /user/ssh_signing_keys/{ssh_signing_key_id}"
],
2022-11-04 00:55:07 +08:00
list: ["GET /users"],
2023-10-26 04:27:07 +08:00
listBlockedByAuthenticated: [
"GET /user/blocks",
{},
{ renamed: ["users", "listBlockedByAuthenticatedUser"] }
],
listBlockedByAuthenticatedUser: ["GET /user/blocks"],
listEmailsForAuthenticated: [
"GET /user/emails",
{},
{ renamed: ["users", "listEmailsForAuthenticatedUser"] }
],
listEmailsForAuthenticatedUser: ["GET /user/emails"],
listFollowedByAuthenticated: [
"GET /user/following",
{},
{ renamed: ["users", "listFollowedByAuthenticatedUser"] }
],
listFollowedByAuthenticatedUser: ["GET /user/following"],
2022-11-04 00:55:07 +08:00
listFollowersForAuthenticatedUser: ["GET /user/followers"],
listFollowersForUser: ["GET /users/{username}/followers"],
listFollowingForUser: ["GET /users/{username}/following"],
2023-10-26 04:27:07 +08:00
listGpgKeysForAuthenticated: [
"GET /user/gpg_keys",
{},
{ renamed: ["users", "listGpgKeysForAuthenticatedUser"] }
],
listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"],
2022-11-04 00:55:07 +08:00
listGpgKeysForUser: ["GET /users/{username}/gpg_keys"],
2023-10-26 04:27:07 +08:00
listPublicEmailsForAuthenticated: [
"GET /user/public_emails",
{},
{ renamed: ["users", "listPublicEmailsForAuthenticatedUser"] }
],
listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"],
2022-11-04 00:55:07 +08:00
listPublicKeysForUser: ["GET /users/{username}/keys"],
2023-10-26 04:27:07 +08:00
listPublicSshKeysForAuthenticated: [
"GET /user/keys",
{},
{ renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] }
],
listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"],
listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"],
listSocialAccountsForUser: ["GET /users/{username}/social_accounts"],
listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"],
listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"],
setPrimaryEmailVisibilityForAuthenticated: [
"PATCH /user/email/visibility",
{},
{ renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] }
],
setPrimaryEmailVisibilityForAuthenticatedUser: [
"PATCH /user/email/visibility"
],
2022-11-04 00:55:07 +08:00
unblock: ["DELETE /user/blocks/{username}"],
unfollow: ["DELETE /user/following/{username}"],
updateAuthenticated: ["PATCH /user"]
}
};
2023-10-26 04:27:07 +08:00
var endpoints_default = Endpoints;
2022-11-04 00:55:07 +08:00
2023-10-26 04:27:07 +08:00
// pkg/dist-src/endpoints-to-methods.js
var endpointMethodsMap = /* @__PURE__ */ new Map();
for (const [scope, endpoints] of Object.entries(endpoints_default)) {
for (const [methodName, endpoint] of Object.entries(endpoints)) {
const [route, defaults, decorations] = endpoint;
const [method, url] = route.split(/ /);
const endpointDefaults = Object.assign(
{
2022-11-04 00:55:07 +08:00
method,
url
2023-10-26 04:27:07 +08:00
},
defaults
);
if (!endpointMethodsMap.has(scope)) {
endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());
2022-11-04 00:55:07 +08:00
}
2023-10-26 04:27:07 +08:00
endpointMethodsMap.get(scope).set(methodName, {
scope,
methodName,
endpointDefaults,
decorations
});
}
}
var handler = {
has({ scope }, methodName) {
return endpointMethodsMap.get(scope).has(methodName);
},
getOwnPropertyDescriptor(target, methodName) {
return {
value: this.get(target, methodName),
// ensures method is in the cache
configurable: true,
writable: true,
enumerable: true
};
},
defineProperty(target, methodName, descriptor) {
Object.defineProperty(target.cache, methodName, descriptor);
return true;
},
deleteProperty(target, methodName) {
delete target.cache[methodName];
return true;
},
ownKeys({ scope }) {
return [...endpointMethodsMap.get(scope).keys()];
},
set(target, methodName, value) {
return target.cache[methodName] = value;
},
get({ octokit, scope, cache }, methodName) {
if (cache[methodName]) {
return cache[methodName];
}
const method = endpointMethodsMap.get(scope).get(methodName);
if (!method) {
return void 0;
}
const { endpointDefaults, decorations } = method;
if (decorations) {
cache[methodName] = decorate(
octokit,
scope,
methodName,
endpointDefaults,
decorations
);
} else {
cache[methodName] = octokit.request.defaults(endpointDefaults);
}
return cache[methodName];
}
};
function endpointsToMethods(octokit) {
const newMethods = {};
for (const scope of endpointMethodsMap.keys()) {
newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);
2022-11-04 00:55:07 +08:00
}
return newMethods;
}
function decorate(octokit, scope, methodName, defaults, decorations) {
const requestWithDefaults = octokit.request.defaults(defaults);
function withDecorations(...args) {
2023-10-26 04:27:07 +08:00
let options = requestWithDefaults.endpoint.merge(...args);
2022-11-04 00:55:07 +08:00
if (decorations.mapToData) {
options = Object.assign({}, options, {
data: options[decorations.mapToData],
2023-10-26 04:27:07 +08:00
[decorations.mapToData]: void 0
2022-11-04 00:55:07 +08:00
});
return requestWithDefaults(options);
}
if (decorations.renamed) {
const [newScope, newMethodName] = decorations.renamed;
2023-10-26 04:27:07 +08:00
octokit.log.warn(
`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`
);
2022-11-04 00:55:07 +08:00
}
if (decorations.deprecated) {
octokit.log.warn(decorations.deprecated);
}
if (decorations.renamedParameters) {
2023-10-26 04:27:07 +08:00
const options2 = requestWithDefaults.endpoint.merge(...args);
for (const [name, alias] of Object.entries(
decorations.renamedParameters
)) {
if (name in options2) {
octokit.log.warn(
`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`
);
if (!(alias in options2)) {
options2[alias] = options2[name];
2022-11-04 00:55:07 +08:00
}
2023-10-26 04:27:07 +08:00
delete options2[name];
2022-11-04 00:55:07 +08:00
}
}
2023-10-26 04:27:07 +08:00
return requestWithDefaults(options2);
}
2022-11-04 00:55:07 +08:00
return requestWithDefaults(...args);
}
return Object.assign(withDecorations, requestWithDefaults);
}
2023-10-26 04:27:07 +08:00
// pkg/dist-src/index.js
2022-11-04 00:55:07 +08:00
function restEndpointMethods(octokit) {
2023-10-26 04:27:07 +08:00
const api = endpointsToMethods(octokit);
return {
rest: api
};
2022-11-04 00:55:07 +08:00
}
restEndpointMethods.VERSION = VERSION;
2023-10-26 04:27:07 +08:00
function legacyRestEndpointMethods(octokit) {
const api = endpointsToMethods(octokit);
return {
...api,
rest: api
};
}
legacyRestEndpointMethods.VERSION = VERSION;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
legacyRestEndpointMethods,
restEndpointMethods
});