2020-03-02 21:16:42 +08:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
const Endpoints = {
|
2020-03-02 21:16:42 +08:00
|
|
|
actions: {
|
2020-06-06 22:11:37 +08:00
|
|
|
addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],
|
|
|
|
cancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],
|
|
|
|
createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"],
|
|
|
|
createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}", {}, {
|
|
|
|
renamedParameters: {
|
|
|
|
name: "secret_name"
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createOrUpdateSecretForRepo: ["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}", {}, {
|
|
|
|
renamed: ["actions", "createOrUpdateRepoSecret"],
|
|
|
|
renamedParameters: {
|
|
|
|
name: "secret_name"
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createRegistrationToken: ["POST /repos/{owner}/{repo}/actions/runners/registration-token", {}, {
|
|
|
|
renamed: ["actions", "createRegistrationTokenForRepo"]
|
|
|
|
}],
|
|
|
|
createRegistrationTokenForOrg: ["POST /orgs/{org}/actions/runners/registration-token"],
|
|
|
|
createRegistrationTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/registration-token"],
|
|
|
|
createRemoveToken: ["POST /repos/{owner}/{repo}/actions/runners/remove-token", {}, {
|
|
|
|
renamed: ["actions", "createRemoveTokenForRepo"]
|
|
|
|
}],
|
|
|
|
createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"],
|
|
|
|
createRemoveTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/remove-token"],
|
|
|
|
deleteArtifact: ["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
|
|
|
|
deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"],
|
|
|
|
deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}", {}, {
|
|
|
|
renamedParameters: {
|
|
|
|
name: "secret_name"
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteSecretFromRepo: ["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}", {}, {
|
|
|
|
renamed: ["actions", "deleteRepoSecret"],
|
|
|
|
renamedParameters: {
|
|
|
|
name: "secret_name"
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteSelfHostedRunnerFromOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}"],
|
|
|
|
deleteSelfHostedRunnerFromRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],
|
|
|
|
deleteWorkflowRunLogs: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],
|
|
|
|
downloadArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],
|
|
|
|
downloadWorkflowJobLogs: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],
|
|
|
|
downloadWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],
|
|
|
|
getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
|
|
|
|
getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"],
|
|
|
|
getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"],
|
|
|
|
getPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key", {}, {
|
|
|
|
renamed: ["actions", "getRepoPublicKey"]
|
|
|
|
}],
|
|
|
|
getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"],
|
|
|
|
getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}", {}, {
|
|
|
|
renamedParameters: {
|
|
|
|
name: "secret_name"
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}", {}, {
|
|
|
|
renamed: ["actions", "getRepoSecret"],
|
|
|
|
renamedParameters: {
|
|
|
|
name: "secret_name"
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getSelfHostedRunner: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}", {}, {
|
|
|
|
renamed: ["actions", "getSelfHostedRunnerForRepo"]
|
|
|
|
}],
|
|
|
|
getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"],
|
|
|
|
getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],
|
|
|
|
getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],
|
|
|
|
getWorkflowJob: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],
|
|
|
|
getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],
|
|
|
|
getWorkflowRunUsage: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],
|
|
|
|
getWorkflowUsage: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],
|
|
|
|
listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"],
|
|
|
|
listDownloadsForSelfHostedRunnerApplication: ["GET /repos/{owner}/{repo}/actions/runners/downloads", {}, {
|
|
|
|
renamed: ["actions", "listRunnerApplicationsForRepo"]
|
|
|
|
}],
|
|
|
|
listJobsForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],
|
|
|
|
listOrgSecrets: ["GET /orgs/{org}/actions/secrets"],
|
|
|
|
listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"],
|
|
|
|
listRepoWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/runs"],
|
|
|
|
listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"],
|
|
|
|
listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"],
|
|
|
|
listRunnerApplicationsForRepo: ["GET /repos/{owner}/{repo}/actions/runners/downloads"],
|
|
|
|
listSecretsForRepo: ["GET /repos/{owner}/{repo}/actions/secrets", {}, {
|
|
|
|
renamed: ["actions", "listRepoSecrets"]
|
|
|
|
}],
|
|
|
|
listSelectedReposForOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],
|
|
|
|
listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"],
|
|
|
|
listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"],
|
|
|
|
listWorkflowJobLogs: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs", {}, {
|
|
|
|
renamed: ["actions", "downloadWorkflowJobLogs"]
|
|
|
|
}],
|
|
|
|
listWorkflowRunArtifacts: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],
|
|
|
|
listWorkflowRunLogs: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs", {}, {
|
|
|
|
renamed: ["actions", "downloadWorkflowRunLogs"]
|
|
|
|
}],
|
|
|
|
listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],
|
|
|
|
reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],
|
|
|
|
removeSelectedRepoFromOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],
|
|
|
|
removeSelfHostedRunner: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}", {}, {
|
|
|
|
renamed: ["actions", "deleteSelfHostedRunnerFromRepo"]
|
|
|
|
}],
|
|
|
|
setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
activity: {
|
2020-06-06 22:11:37 +08:00
|
|
|
checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"],
|
|
|
|
checkStarringRepo: ["GET /user/starred/{owner}/{repo}", {}, {
|
|
|
|
renamed: ["activity", "checkRepoIsStarredByAuthenticatedUser"]
|
|
|
|
}],
|
|
|
|
deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"],
|
|
|
|
deleteThreadSubscription: ["DELETE /notifications/threads/{thread_id}/subscription"],
|
|
|
|
getFeeds: ["GET /feeds"],
|
|
|
|
getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"],
|
|
|
|
getThread: ["GET /notifications/threads/{thread_id}"],
|
|
|
|
getThreadSubscription: ["PUT /notifications", {}, {
|
|
|
|
renamed: ["activity", "getThreadSubscriptionForAuthenticatedUser"]
|
|
|
|
}],
|
|
|
|
getThreadSubscriptionForAuthenticatedUser: ["GET /notifications/threads/{thread_id}/subscription"],
|
|
|
|
listEventsForAuthenticatedUser: ["GET /users/{username}/events"],
|
|
|
|
listEventsForOrg: ["GET /users/{username}/events/orgs/{org}", {}, {
|
|
|
|
renamed: ["activity", "listOrgEventsForAuthenticatedUser"]
|
|
|
|
}],
|
|
|
|
listEventsForUser: ["GET /users/{username}/events", {}, {
|
|
|
|
renamed: ["activity", "listEventsForAuthenticatedUser"]
|
|
|
|
}],
|
|
|
|
listFeeds: ["GET /feeds", {}, {
|
|
|
|
renamed: ["activity", "getFeeds"]
|
|
|
|
}],
|
|
|
|
listNotifications: ["GET /notifications", {}, {
|
|
|
|
renamed: ["activity", "listNotificationsForAuthenticatedUser"]
|
|
|
|
}],
|
|
|
|
listNotificationsForAuthenticatedUser: ["GET /notifications"],
|
|
|
|
listNotificationsForRepo: ["GET /repos/{owner}/{repo}/notifications", {}, {
|
|
|
|
renamed: ["activity", "listRepoNotificationsForAuthenticatedUser"]
|
|
|
|
}],
|
|
|
|
listOrgEventsForAuthenticatedUser: ["GET /users/{username}/events/orgs/{org}"],
|
|
|
|
listPublicEvents: ["GET /events"],
|
|
|
|
listPublicEventsForOrg: ["GET /orgs/{org}/events", {}, {
|
|
|
|
renamed: ["activity", "listPublicOrgEvents"]
|
|
|
|
}],
|
|
|
|
listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"],
|
|
|
|
listPublicEventsForUser: ["GET /users/{username}/events/public"],
|
|
|
|
listPublicOrgEvents: ["GET /orgs/{org}/events"],
|
|
|
|
listReceivedEventsForUser: ["GET /users/{username}/received_events"],
|
|
|
|
listReceivedPublicEventsForUser: ["GET /users/{username}/received_events/public"],
|
|
|
|
listRepoEvents: ["GET /repos/{owner}/{repo}/events"],
|
|
|
|
listRepoNotificationsForAuthenticatedUser: ["GET /repos/{owner}/{repo}/notifications"],
|
|
|
|
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"],
|
|
|
|
markAsRead: ["PUT /notifications", {}, {
|
|
|
|
renamed: ["activity", "markNotificationsAsRead"]
|
|
|
|
}],
|
|
|
|
markNotificationsAsRead: ["PUT /notifications"],
|
|
|
|
markNotificationsAsReadForRepo: ["PUT /repos/{owner}/{repo}/notifications", {}, {
|
|
|
|
renamed: ["activity", "markRepoNotificationsAsRead"]
|
|
|
|
}],
|
|
|
|
markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"],
|
|
|
|
markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"],
|
|
|
|
setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"],
|
|
|
|
setThreadSubscription: ["PUT /notifications/threads/{thread_id}/subscription"],
|
|
|
|
starRepo: ["PUT /user/starred/{owner}/{repo}", {}, {
|
|
|
|
renamed: ["activity", "starRepoForAuthenticatedUser"]
|
|
|
|
}],
|
|
|
|
starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"],
|
|
|
|
unstarRepo: ["DELETE /user/starred/{owner}/{repo}", {}, {
|
|
|
|
renamed: ["activity", "unstarRepoForAuthenticatedUser"]
|
|
|
|
}],
|
|
|
|
unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
apps: {
|
2020-06-06 22:11:37 +08:00
|
|
|
addRepoToInstallation: ["PUT /user/installations/{installation_id}/repositories/{repository_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
checkAccountIsAssociatedWithAny: ["GET /marketplace_listing/accounts/{account_id}", {}, {
|
|
|
|
renamed: ["apps", "getSubscriptionPlanForAccount"]
|
|
|
|
}],
|
|
|
|
checkAccountIsAssociatedWithAnyStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}", {}, {
|
|
|
|
renamed: ["apps", "getSubscriptionPlanForAccountStubbed"]
|
|
|
|
}],
|
|
|
|
checkToken: ["POST /applications/{client_id}/token"],
|
|
|
|
createContentAttachment: ["POST /content_references/{content_reference_id}/attachments", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["corsair"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createFromManifest: ["POST /app-manifests/{code}/conversions"],
|
|
|
|
createInstallationToken: ["POST /app/installations/{installation_id}/access_tokens", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteAuthorization: ["DELETE /applications/{client_id}/grant"],
|
|
|
|
deleteInstallation: ["DELETE /app/installations/{installation_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteToken: ["DELETE /applications/{client_id}/token"],
|
|
|
|
getAuthenticated: ["GET /app", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getBySlug: ["GET /apps/{app_slug}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getInstallation: ["GET /app/installations/{installation_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getOrgInstallation: ["GET /orgs/{org}/installation", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getRepoInstallation: ["GET /repos/{owner}/{repo}/installation", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getSubscriptionPlanForAccount: ["GET /marketplace_listing/accounts/{account_id}"],
|
|
|
|
getSubscriptionPlanForAccountStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}"],
|
|
|
|
getUserInstallation: ["GET /users/{username}/installation", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"],
|
|
|
|
listAccountsForPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],
|
|
|
|
listAccountsUserOrOrgOnPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts", {}, {
|
|
|
|
renamed: ["apps", "listAccountsForPlan"]
|
|
|
|
}],
|
|
|
|
listAccountsUserOrOrgOnPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", {}, {
|
|
|
|
renamed: ["apps", "listAccountsForPlanStubbed"]
|
|
|
|
}],
|
|
|
|
listInstallationReposForAuthenticatedUser: ["GET /user/installations/{installation_id}/repositories", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listInstallations: ["GET /app/installations", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listInstallationsForAuthenticatedUser: ["GET /user/installations", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listMarketplacePurchasesForAuthenticatedUser: ["GET /user/marketplace_purchases", {}, {
|
|
|
|
renamed: ["apps", "listSubscriptionsForAuthenticatedUser"]
|
|
|
|
}],
|
|
|
|
listMarketplacePurchasesForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed", {}, {
|
|
|
|
renamed: ["apps", "listSubscriptionsForAuthenticatedUserStubbed"]
|
|
|
|
}],
|
|
|
|
listPlans: ["GET /marketplace_listing/plans"],
|
|
|
|
listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"],
|
|
|
|
listRepos: ["GET /installation/repositories", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"],
|
|
|
|
listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"],
|
|
|
|
removeRepoFromInstallation: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
resetToken: ["PATCH /applications/{client_id}/token"],
|
|
|
|
revokeInstallationToken: ["DELETE /installation/token"],
|
|
|
|
suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"],
|
|
|
|
unsuspendInstallation: ["DELETE /app/installations/{installation_id}/suspended"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
checks: {
|
2020-06-06 22:11:37 +08:00
|
|
|
create: ["POST /repos/{owner}/{repo}/check-runs", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createSuite: ["POST /repos/{owner}/{repo}/check-suites", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listAnnotations: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["antiope"]
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
codeScanning: {
|
|
|
|
getAlert: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}"],
|
|
|
|
listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
codesOfConduct: {
|
2020-06-06 22:11:37 +08:00
|
|
|
getAllCodesOfConduct: ["GET /codes_of_conduct", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["scarlet-witch"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getConductCode: ["GET /codes_of_conduct/{key}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["scarlet-witch"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getForRepo: ["GET /repos/{owner}/{repo}/community/code_of_conduct", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["scarlet-witch"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listConductCodes: ["GET /codes_of_conduct", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["scarlet-witch"]
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
renamed: ["codesOfConduct", "getAllCodesOfConduct"]
|
|
|
|
}]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
emojis: {
|
2020-06-06 22:11:37 +08:00
|
|
|
get: ["GET /emojis"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
gists: {
|
2020-06-06 22:11:37 +08:00
|
|
|
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"],
|
|
|
|
listPublicForUser: ["GET /users/{username}/gists", {}, {
|
|
|
|
renamed: ["gists", "listForUser"]
|
|
|
|
}],
|
|
|
|
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}"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
git: {
|
2020-06-06 22:11:37 +08:00
|
|
|
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}"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
gitignore: {
|
2020-06-06 22:11:37 +08:00
|
|
|
getTemplate: ["GET /gitignore/templates/{name}"],
|
|
|
|
listTemplates: ["GET /gitignore/templates"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
interactions: {
|
2020-06-06 22:11:37 +08:00
|
|
|
addOrUpdateRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["sombra"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
addOrUpdateRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["sombra"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["sombra"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["sombra"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["sombra"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["sombra"]
|
|
|
|
}
|
|
|
|
}]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
issues: {
|
2020-06-06 22:11:37 +08:00
|
|
|
addAssignees: ["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],
|
|
|
|
addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
|
|
|
checkAssignee: ["GET /repos/{owner}/{repo}/assignees/{assignee}", {}, {
|
|
|
|
renamed: ["issues", "checkUserCanBeAssigned"]
|
|
|
|
}],
|
|
|
|
checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"],
|
|
|
|
create: ["POST /repos/{owner}/{repo}/issues"],
|
|
|
|
createComment: ["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],
|
|
|
|
createLabel: ["POST /repos/{owner}/{repo}/labels"],
|
|
|
|
createMilestone: ["POST /repos/{owner}/{repo}/milestones"],
|
|
|
|
deleteComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],
|
|
|
|
deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"],
|
|
|
|
deleteMilestone: ["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],
|
|
|
|
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"],
|
|
|
|
listEventsForTimeline: ["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["mockingbird"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForAuthenticatedUser: ["GET /user/issues"],
|
|
|
|
listForOrg: ["GET /orgs/{org}/issues"],
|
|
|
|
listForRepo: ["GET /repos/{owner}/{repo}/issues"],
|
|
|
|
listLabelsForMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],
|
|
|
|
listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"],
|
|
|
|
listLabelsOnIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],
|
|
|
|
listMilestones: ["GET /repos/{owner}/{repo}/milestones"],
|
|
|
|
listMilestonesForRepo: ["GET /repos/{owner}/{repo}/milestones", {}, {
|
|
|
|
renamed: ["issues", "listMilestones"]
|
|
|
|
}],
|
|
|
|
lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],
|
|
|
|
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}"],
|
|
|
|
removeLabels: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels", {}, {
|
|
|
|
renamed: ["issues", "removeAllLabels"]
|
|
|
|
}],
|
|
|
|
replaceLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels", {}, {
|
|
|
|
renamed: ["issues", "replaceAllLabels"]
|
|
|
|
}],
|
|
|
|
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}"],
|
|
|
|
updateMilestone: ["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
licenses: {
|
2020-06-06 22:11:37 +08:00
|
|
|
get: ["GET /licenses/{license}"],
|
|
|
|
getForRepo: ["GET /repos/{owner}/{repo}/license"],
|
|
|
|
listCommonlyUsed: ["GET /licenses"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
markdown: {
|
2020-06-06 22:11:37 +08:00
|
|
|
render: ["POST /markdown"],
|
|
|
|
renderRaw: ["POST /markdown/raw", {
|
2020-03-02 21:16:42 +08:00
|
|
|
headers: {
|
|
|
|
"content-type": "text/plain; charset=utf-8"
|
2020-06-06 22:11:37 +08:00
|
|
|
}
|
|
|
|
}]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
meta: {
|
2020-06-06 22:11:37 +08:00
|
|
|
get: ["GET /meta"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
migrations: {
|
2020-06-06 22:11:37 +08:00
|
|
|
cancelImport: ["DELETE /repos/{owner}/{repo}/import"],
|
|
|
|
deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
downloadArchiveForOrg: ["GET /orgs/{org}/migrations/{migration_id}/archive", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getArchiveForAuthenticatedUser: ["GET /user/migrations/{migration_id}/archive", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"],
|
|
|
|
getImportProgress: ["GET /repos/{owner}/{repo}/import", {}, {
|
|
|
|
renamed: ["migrations", "getImportStatus"]
|
|
|
|
}],
|
|
|
|
getImportStatus: ["GET /repos/{owner}/{repo}/import"],
|
|
|
|
getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"],
|
|
|
|
getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForAuthenticatedUser: ["GET /user/migrations", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForOrg: ["GET /orgs/{org}/migrations", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listReposForUser: ["GET /user/{migration_id}/repositories", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
mapCommitAuthor: ["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"],
|
|
|
|
setLfsPreference: ["PATCH /repos/{owner}/{repo}/import/lfs"],
|
|
|
|
startForAuthenticatedUser: ["POST /user/migrations"],
|
|
|
|
startForOrg: ["POST /orgs/{org}/migrations"],
|
|
|
|
startImport: ["PUT /repos/{owner}/{repo}/import"],
|
|
|
|
unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["wyandotte"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
updateImport: ["PATCH /repos/{owner}/{repo}/import"]
|
|
|
|
},
|
|
|
|
orgs: {
|
|
|
|
addOrUpdateMembership: ["PUT /orgs/{org}/memberships/{username}"],
|
|
|
|
blockUser: ["PUT /orgs/{org}/blocks/{username}"],
|
|
|
|
checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"],
|
|
|
|
checkMembership: ["GET /orgs/{org}/members/{username}"],
|
|
|
|
checkPublicMembership: ["GET /orgs/{org}/public_members/{username}"],
|
|
|
|
concealMembership: ["DELETE /orgs/{org}/public_members/{username}"],
|
|
|
|
convertMemberToOutsideCollaborator: ["PUT /orgs/{org}/outside_collaborators/{username}"],
|
|
|
|
createHook: ["POST /orgs/{org}/hooks"],
|
|
|
|
createInvitation: ["POST /orgs/{org}/invitations"],
|
|
|
|
deleteHook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
|
|
|
|
get: ["GET /orgs/{org}"],
|
|
|
|
getHook: ["GET /orgs/{org}/hooks/{hook_id}"],
|
|
|
|
getMembership: ["GET /orgs/{org}/memberships/{username}"],
|
|
|
|
getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
|
|
|
|
list: ["GET /organizations"],
|
|
|
|
listBlockedUsers: ["GET /orgs/{org}/blocks"],
|
|
|
|
listForAuthenticatedUser: ["GET /user/orgs"],
|
|
|
|
listForUser: ["GET /users/{username}/orgs"],
|
|
|
|
listHooks: ["GET /orgs/{org}/hooks"],
|
|
|
|
listInstallations: ["GET /orgs/{org}/installations", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["machine-man"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listInvitationTeams: ["GET /orgs/{org}/invitations/{invitation_id}/teams"],
|
|
|
|
listMembers: ["GET /orgs/{org}/members"],
|
|
|
|
listMemberships: ["GET /user/memberships/orgs"],
|
|
|
|
listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"],
|
|
|
|
listPendingInvitations: ["GET /orgs/{org}/invitations"],
|
|
|
|
listPublicMembers: ["GET /orgs/{org}/public_members"],
|
|
|
|
pingHook: ["POST /orgs/{org}/hooks/{hook_id}/pings"],
|
|
|
|
publicizeMembership: ["PUT /orgs/{org}/public_members/{username}"],
|
|
|
|
removeMember: ["DELETE /orgs/{org}/members/{username}"],
|
|
|
|
removeMembership: ["DELETE /orgs/{org}/memberships/{username}"],
|
|
|
|
removeOutsideCollaborator: ["DELETE /orgs/{org}/outside_collaborators/{username}"],
|
|
|
|
unblockUser: ["DELETE /orgs/{org}/blocks/{username}"],
|
|
|
|
update: ["PATCH /orgs/{org}"],
|
|
|
|
updateHook: ["PATCH /orgs/{org}/hooks/{hook_id}"],
|
|
|
|
updateMembership: ["PATCH /user/memberships/orgs/{org}"]
|
|
|
|
},
|
|
|
|
projects: {
|
|
|
|
addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createCard: ["POST /projects/columns/{column_id}/cards", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createColumn: ["POST /projects/{project_id}/columns", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createForAuthenticatedUser: ["POST /user/projects", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createForOrg: ["POST /orgs/{org}/projects", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createForRepo: ["POST /repos/{owner}/{repo}/projects", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
delete: ["DELETE /projects/{project_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteCard: ["DELETE /projects/columns/cards/{card_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteColumn: ["DELETE /projects/columns/{column_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
get: ["GET /projects/{project_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getCard: ["GET /projects/columns/cards/{card_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getColumn: ["GET /projects/columns/{column_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listCards: ["GET /projects/columns/{column_id}/cards", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listCollaborators: ["GET /projects/{project_id}/collaborators", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listColumns: ["GET /projects/{project_id}/columns", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForOrg: ["GET /orgs/{org}/projects", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForRepo: ["GET /repos/{owner}/{repo}/projects", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForUser: ["GET /users/{username}/projects", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
moveCard: ["POST /projects/columns/cards/{card_id}/moves", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
moveColumn: ["POST /projects/columns/{column_id}/moves", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
removeCollaborator: ["DELETE /projects/{project_id}/collaborators/{username}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
reviewUserPermissionLevel: ["GET /projects/{project_id}/collaborators/{username}/permission", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
update: ["PATCH /projects/{project_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
updateCard: ["PATCH /projects/columns/cards/{card_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
updateColumn: ["PATCH /projects/columns/{column_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
pulls: {
|
|
|
|
checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
|
|
|
create: ["POST /repos/{owner}/{repo}/pulls"],
|
|
|
|
createComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],
|
|
|
|
createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],
|
|
|
|
createReviewCommentReply: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],
|
|
|
|
createReviewRequest: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
|
|
|
deleteComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],
|
|
|
|
deletePendingReview: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],
|
|
|
|
deleteReviewRequest: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
|
|
|
dismissReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],
|
|
|
|
get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"],
|
|
|
|
getComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],
|
|
|
|
getCommentsForReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],
|
|
|
|
getReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],
|
|
|
|
list: ["GET /repos/{owner}/{repo}/pulls"],
|
|
|
|
listComments: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],
|
|
|
|
listCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"],
|
|
|
|
listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],
|
|
|
|
listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],
|
|
|
|
listReviewRequests: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],
|
|
|
|
listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],
|
|
|
|
merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],
|
|
|
|
submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],
|
|
|
|
update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],
|
|
|
|
updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["lydian"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
updateComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"],
|
|
|
|
updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"]
|
|
|
|
},
|
|
|
|
rateLimit: {
|
|
|
|
get: ["GET /rate_limit"]
|
|
|
|
},
|
|
|
|
reactions: {
|
|
|
|
createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createForPullRequestReviewComment: ["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createForTeamDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
createForTeamDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
delete: ["DELETE /reactions/{reaction_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
renamed: ["reactions", "deleteLegacy"]
|
|
|
|
}],
|
|
|
|
deleteForCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteForIssue: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteForIssueComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteForPullRequestComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteForTeamDiscussion: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteForTeamDiscussionComment: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
deleteLegacy: ["DELETE /reactions/{reaction_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
deprecated: "octokit.reactions.deleteLegacy() is deprecated, see https://developer.github.com/v3/reactions/#delete-a-reaction-legacy"
|
|
|
|
}],
|
|
|
|
listForCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForIssueComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForPullRequestReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForTeamDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listForTeamDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["squirrel-girl"]
|
|
|
|
}
|
|
|
|
}]
|
|
|
|
},
|
|
|
|
repos: {
|
|
|
|
acceptInvitation: ["PATCH /user/repository_invitations/{invitation_id}"],
|
|
|
|
addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"],
|
|
|
|
addDeployKey: ["POST /repos/{owner}/{repo}/keys"],
|
|
|
|
addProtectedBranchAdminEnforcement: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
|
|
|
addProtectedBranchAppRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, {
|
|
|
|
mapToData: "apps"
|
|
|
|
}],
|
|
|
|
addProtectedBranchRequiredSignatures: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["zzzax"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
addProtectedBranchRequiredStatusChecksContexts: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, {
|
|
|
|
mapToData: "contexts"
|
|
|
|
}],
|
|
|
|
addProtectedBranchTeamRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, {
|
|
|
|
mapToData: "teams"
|
|
|
|
}],
|
|
|
|
addProtectedBranchUserRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, {
|
|
|
|
mapToData: "users"
|
|
|
|
}],
|
|
|
|
checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"],
|
|
|
|
checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["dorian"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"],
|
|
|
|
createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],
|
|
|
|
createDeployment: ["POST /repos/{owner}/{repo}/deployments"],
|
|
|
|
createDeploymentStatus: ["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],
|
|
|
|
createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"],
|
|
|
|
createForAuthenticatedUser: ["POST /user/repos"],
|
|
|
|
createFork: ["POST /repos/{owner}/{repo}/forks"],
|
|
|
|
createHook: ["POST /repos/{owner}/{repo}/hooks"],
|
|
|
|
createInOrg: ["POST /orgs/{org}/repos"],
|
|
|
|
createOrUpdateFile: ["PUT /repos/{owner}/{repo}/contents/{path}"],
|
|
|
|
createRelease: ["POST /repos/{owner}/{repo}/releases"],
|
|
|
|
createStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"],
|
|
|
|
createUsingTemplate: ["POST /repos/{template_owner}/{template_repo}/generate", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["baptiste"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
declineInvitation: ["DELETE /user/repository_invitations/{invitation_id}"],
|
|
|
|
delete: ["DELETE /repos/{owner}/{repo}"],
|
|
|
|
deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],
|
|
|
|
deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],
|
|
|
|
deleteDownload: ["DELETE /repos/{owner}/{repo}/downloads/{download_id}"],
|
|
|
|
deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"],
|
|
|
|
deleteHook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],
|
|
|
|
deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],
|
|
|
|
deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"],
|
|
|
|
deleteReleaseAsset: ["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
|
|
|
disableAutomatedSecurityFixes: ["DELETE /repos/{owner}/{repo}/automated-security-fixes", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["london"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
disablePagesSite: ["DELETE /repos/{owner}/{repo}/pages", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["switcheroo"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
disableVulnerabilityAlerts: ["DELETE /repos/{owner}/{repo}/vulnerability-alerts", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["dorian"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
enableAutomatedSecurityFixes: ["PUT /repos/{owner}/{repo}/automated-security-fixes", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["london"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
enablePagesSite: ["POST /repos/{owner}/{repo}/pages", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["switcheroo"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["dorian"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
get: ["GET /repos/{owner}/{repo}"],
|
|
|
|
getAllTopics: ["GET /repos/{owner}/{repo}/topics", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["mercy"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getAppsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],
|
|
|
|
getArchiveLink: ["GET /repos/{owner}/{repo}/{archive_format}/{ref}"],
|
|
|
|
getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"],
|
|
|
|
getBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection"],
|
|
|
|
getClones: ["GET /repos/{owner}/{repo}/traffic/clones"],
|
|
|
|
getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"],
|
|
|
|
getCollaboratorPermissionLevel: ["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],
|
|
|
|
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}"],
|
|
|
|
getContents: ["GET /repos/{owner}/{repo}/contents/{path}"],
|
|
|
|
getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"],
|
|
|
|
getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"],
|
|
|
|
getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],
|
|
|
|
getDeploymentStatus: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],
|
|
|
|
getDownload: ["GET /repos/{owner}/{repo}/downloads/{download_id}"],
|
|
|
|
getHook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"],
|
|
|
|
getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"],
|
|
|
|
getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"],
|
|
|
|
getPages: ["GET /repos/{owner}/{repo}/pages"],
|
|
|
|
getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],
|
|
|
|
getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"],
|
|
|
|
getProtectedBranchAdminEnforcement: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
|
|
|
getProtectedBranchPullRequestReviewEnforcement: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
|
|
|
getProtectedBranchRequiredSignatures: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["zzzax"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
getProtectedBranchRequiredStatusChecks: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
|
|
|
getProtectedBranchRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],
|
|
|
|
getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"],
|
|
|
|
getReadme: ["GET /repos/{owner}/{repo}/readme"],
|
|
|
|
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}"],
|
|
|
|
getTeamsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],
|
|
|
|
getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"],
|
|
|
|
getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"],
|
|
|
|
getUsersWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],
|
|
|
|
getViews: ["GET /repos/{owner}/{repo}/traffic/views"],
|
|
|
|
list: ["GET /user/repos", {}, {
|
|
|
|
renamed: ["repos", "listForAuthenticatedUser"]
|
|
|
|
}],
|
|
|
|
listAssetsForRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],
|
|
|
|
listBranches: ["GET /repos/{owner}/{repo}/branches"],
|
|
|
|
listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["groot"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"],
|
|
|
|
listCommentsForCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],
|
|
|
|
listCommitComments: ["GET /repos/{owner}/{repo}/comments"],
|
|
|
|
listCommits: ["GET /repos/{owner}/{repo}/commits"],
|
|
|
|
listContributors: ["GET /repos/{owner}/{repo}/contributors"],
|
|
|
|
listDeployKeys: ["GET /repos/{owner}/{repo}/keys"],
|
|
|
|
listDeploymentStatuses: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],
|
|
|
|
listDeployments: ["GET /repos/{owner}/{repo}/deployments"],
|
|
|
|
listDownloads: ["GET /repos/{owner}/{repo}/downloads"],
|
|
|
|
listForAuthenticatedUser: ["GET /user/repos"],
|
|
|
|
listForOrg: ["GET /orgs/{org}/repos"],
|
|
|
|
listForUser: ["GET /users/{username}/repos"],
|
|
|
|
listForks: ["GET /repos/{owner}/{repo}/forks"],
|
|
|
|
listHooks: ["GET /repos/{owner}/{repo}/hooks"],
|
|
|
|
listInvitations: ["GET /repos/{owner}/{repo}/invitations"],
|
|
|
|
listInvitationsForAuthenticatedUser: ["GET /user/repository_invitations"],
|
|
|
|
listLanguages: ["GET /repos/{owner}/{repo}/languages"],
|
|
|
|
listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"],
|
|
|
|
listProtectedBranchRequiredStatusChecksContexts: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],
|
|
|
|
listPublic: ["GET /repositories"],
|
|
|
|
listPullRequestsAssociatedWithCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["groot"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listReleases: ["GET /repos/{owner}/{repo}/releases"],
|
|
|
|
listStatusesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],
|
|
|
|
listTags: ["GET /repos/{owner}/{repo}/tags"],
|
|
|
|
listTeams: ["GET /repos/{owner}/{repo}/teams"],
|
|
|
|
listTopics: ["GET /repos/{owner}/{repo}/topics", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["mercy"]
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
renamed: ["repos", "getAllTopics"]
|
|
|
|
}],
|
|
|
|
merge: ["POST /repos/{owner}/{repo}/merges"],
|
|
|
|
pingHook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],
|
|
|
|
removeBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],
|
|
|
|
removeCollaborator: ["DELETE /repos/{owner}/{repo}/collaborators/{username}"],
|
|
|
|
removeDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"],
|
|
|
|
removeProtectedBranchAdminEnforcement: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],
|
|
|
|
removeProtectedBranchAppRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, {
|
|
|
|
mapToData: "apps"
|
|
|
|
}],
|
|
|
|
removeProtectedBranchPullRequestReviewEnforcement: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
|
|
|
removeProtectedBranchRequiredSignatures: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["zzzax"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
removeProtectedBranchRequiredStatusChecks: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
|
|
|
removeProtectedBranchRequiredStatusChecksContexts: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, {
|
|
|
|
mapToData: "contexts"
|
|
|
|
}],
|
|
|
|
removeProtectedBranchRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],
|
|
|
|
removeProtectedBranchTeamRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, {
|
|
|
|
mapToData: "teams"
|
|
|
|
}],
|
|
|
|
removeProtectedBranchUserRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, {
|
|
|
|
mapToData: "users"
|
|
|
|
}],
|
|
|
|
replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["mercy"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
replaceProtectedBranchAppRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, {
|
|
|
|
mapToData: "apps"
|
|
|
|
}],
|
|
|
|
replaceProtectedBranchRequiredStatusChecksContexts: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, {
|
|
|
|
mapToData: "contexts"
|
|
|
|
}],
|
|
|
|
replaceProtectedBranchTeamRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, {
|
|
|
|
mapToData: "teams"
|
|
|
|
}],
|
|
|
|
replaceProtectedBranchUserRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, {
|
|
|
|
mapToData: "users"
|
|
|
|
}],
|
|
|
|
replaceTopics: ["PUT /repos/{owner}/{repo}/topics", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["mercy"]
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
renamed: ["repos", "replaceAllTopics"]
|
|
|
|
}],
|
|
|
|
requestPageBuild: ["POST /repos/{owner}/{repo}/pages/builds"],
|
|
|
|
retrieveCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"],
|
|
|
|
testPushHook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],
|
|
|
|
transfer: ["POST /repos/{owner}/{repo}/transfer"],
|
|
|
|
update: ["PATCH /repos/{owner}/{repo}"],
|
|
|
|
updateBranchProtection: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],
|
|
|
|
updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],
|
|
|
|
updateHook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],
|
|
|
|
updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"],
|
|
|
|
updateInvitation: ["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],
|
|
|
|
updateProtectedBranchPullRequestReviewEnforcement: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],
|
|
|
|
updateProtectedBranchRequiredStatusChecks: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],
|
|
|
|
updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"],
|
|
|
|
updateReleaseAsset: ["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],
|
|
|
|
uploadReleaseAsset: ["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", {
|
|
|
|
baseUrl: "https://uploads.github.com"
|
|
|
|
}]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
search: {
|
2020-06-06 22:11:37 +08:00
|
|
|
code: ["GET /search/code"],
|
|
|
|
commits: ["GET /search/commits", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["cloak"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
issuesAndPullRequests: ["GET /search/issues"],
|
|
|
|
labels: ["GET /search/labels"],
|
|
|
|
repos: ["GET /search/repositories"],
|
|
|
|
topics: ["GET /search/topics"],
|
|
|
|
users: ["GET /search/users"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
teams: {
|
2020-06-06 22:11:37 +08:00
|
|
|
addOrUpdateMembershipForUserInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
|
|
|
addOrUpdateMembershipInOrg: ["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}", {}, {
|
|
|
|
renamed: ["teams", "addOrUpdateMembershipForUserInOrg"]
|
|
|
|
}],
|
|
|
|
addOrUpdateProjectInOrg: ["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
renamed: ["teams", "addOrUpdateProjectPermissionsInOrg"]
|
|
|
|
}],
|
|
|
|
addOrUpdateProjectPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
addOrUpdateRepoInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", {}, {
|
|
|
|
renamed: ["teams", "addOrUpdateRepoPermissionsInOrg"]
|
|
|
|
}],
|
|
|
|
addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
|
|
|
checkManagesRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}", {}, {
|
|
|
|
renamed: ["teams", "checkPermissionsForRepoInOrg"]
|
|
|
|
}],
|
|
|
|
checkPermissionsForProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
|
|
|
create: ["POST /orgs/{org}/teams"],
|
|
|
|
createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],
|
|
|
|
createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"],
|
|
|
|
deleteDiscussionCommentInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],
|
|
|
|
deleteDiscussionInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],
|
|
|
|
deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"],
|
|
|
|
getByName: ["GET /orgs/{org}/teams/{team_slug}"],
|
|
|
|
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}"],
|
|
|
|
getMembershipInOrg: ["GET /orgs/{org}/teams/{team_slug}/memberships/{username}", {}, {
|
|
|
|
renamed: ["teams", "getMembershipForUserInOrg"]
|
|
|
|
}],
|
|
|
|
list: ["GET /orgs/{org}/teams"],
|
|
|
|
listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"],
|
|
|
|
listDiscussionCommentsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],
|
|
|
|
listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"],
|
|
|
|
listForAuthenticatedUser: ["GET /user/teams"],
|
|
|
|
listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"],
|
|
|
|
listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"],
|
|
|
|
listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}],
|
|
|
|
listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"],
|
|
|
|
removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],
|
|
|
|
removeMembershipInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}", {}, {
|
|
|
|
renamed: ["teams", "removeMembershipForUserInOrg"]
|
|
|
|
}],
|
|
|
|
removeProjectInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],
|
|
|
|
removeRepoInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],
|
|
|
|
reviewProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}", {
|
|
|
|
mediaType: {
|
|
|
|
previews: ["inertia"]
|
|
|
|
}
|
|
|
|
}, {
|
|
|
|
renamed: ["teams", "checkPermissionsForProjectInOrg"]
|
|
|
|
}],
|
|
|
|
updateDiscussionCommentInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],
|
|
|
|
updateDiscussionInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],
|
|
|
|
updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"]
|
2020-03-02 21:16:42 +08:00
|
|
|
},
|
|
|
|
users: {
|
2020-06-06 22:11:37 +08:00
|
|
|
addEmails: ["POST /user/emails"],
|
|
|
|
block: ["PUT /user/blocks/{username}"],
|
|
|
|
checkBlocked: ["GET /user/blocks/{username}"],
|
|
|
|
checkFollowing: ["GET /user/following/{username}"],
|
|
|
|
checkFollowingForUser: ["GET /users/{username}/following/{target_user}"],
|
|
|
|
createGpgKey: ["POST /user/gpg_keys"],
|
|
|
|
createPublicKey: ["POST /user/keys"],
|
|
|
|
deleteEmails: ["DELETE /user/emails"],
|
|
|
|
deleteGpgKey: ["DELETE /user/gpg_keys/{gpg_key_id}"],
|
|
|
|
deletePublicKey: ["DELETE /user/keys/{key_id}"],
|
|
|
|
follow: ["PUT /user/following/{username}"],
|
|
|
|
getAuthenticated: ["GET /user"],
|
|
|
|
getByUsername: ["GET /users/{username}"],
|
|
|
|
getContextForUser: ["GET /users/{username}/hovercard"],
|
|
|
|
getGpgKey: ["GET /user/gpg_keys/{gpg_key_id}"],
|
|
|
|
getPublicKey: ["GET /user/keys/{key_id}"],
|
|
|
|
list: ["GET /users"],
|
|
|
|
listBlocked: ["GET /user/blocks"],
|
|
|
|
listEmails: ["GET /user/emails"],
|
|
|
|
listFollowedByAuthenticated: ["GET /user/following"],
|
|
|
|
listFollowersForAuthenticatedUser: ["GET /user/followers"],
|
|
|
|
listFollowersForUser: ["GET /users/{username}/followers"],
|
|
|
|
listFollowingForAuthenticatedUser: ["GET /user/following", {}, {
|
|
|
|
renamed: ["users", "listFollowedByAuthenticated"]
|
|
|
|
}],
|
|
|
|
listFollowingForUser: ["GET /users/{username}/following"],
|
|
|
|
listGpgKeys: ["GET /user/gpg_keys"],
|
|
|
|
listGpgKeysForUser: ["GET /users/{username}/gpg_keys"],
|
|
|
|
listPublicEmails: ["GET /user/public_emails"],
|
|
|
|
listPublicKeys: ["GET /user/keys"],
|
|
|
|
listPublicKeysForUser: ["GET /users/{username}/keys"],
|
|
|
|
togglePrimaryEmailVisibility: ["PATCH /user/email/visibility"],
|
|
|
|
unblock: ["DELETE /user/blocks/{username}"],
|
|
|
|
unfollow: ["DELETE /user/following/{username}"],
|
|
|
|
updateAuthenticated: ["PATCH /user"]
|
2020-03-02 21:16:42 +08:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
const VERSION = "3.14.0";
|
2020-03-02 21:16:42 +08:00
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
function endpointsToMethods(octokit, endpointsMap) {
|
|
|
|
const newMethods = {};
|
2020-03-02 21:16:42 +08:00
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
for (const [scope, endpoints] of Object.entries(endpointsMap)) {
|
|
|
|
for (const [methodName, endpoint] of Object.entries(endpoints)) {
|
|
|
|
const [route, defaults, decorations] = endpoint;
|
|
|
|
const [method, url] = route.split(/ /);
|
|
|
|
const endpointDefaults = Object.assign({
|
|
|
|
method,
|
|
|
|
url
|
|
|
|
}, defaults);
|
2020-03-02 21:16:42 +08:00
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
if (!newMethods[scope]) {
|
|
|
|
newMethods[scope] = {};
|
|
|
|
}
|
2020-03-02 21:16:42 +08:00
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
const scopeMethods = newMethods[scope];
|
2020-03-02 21:16:42 +08:00
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
if (decorations) {
|
|
|
|
scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations);
|
|
|
|
continue;
|
2020-03-02 21:16:42 +08:00
|
|
|
}
|
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
scopeMethods[methodName] = octokit.request.defaults(endpointDefaults);
|
|
|
|
}
|
|
|
|
}
|
2020-03-02 21:16:42 +08:00
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
return newMethods;
|
2020-03-02 21:16:42 +08:00
|
|
|
}
|
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
function decorate(octokit, scope, methodName, defaults, decorations) {
|
|
|
|
const requestWithDefaults = octokit.request.defaults(defaults);
|
2020-03-02 21:16:42 +08:00
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
function withDecorations(...args) {
|
|
|
|
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488
|
|
|
|
let options = requestWithDefaults.endpoint.merge(...args); // There are currently no other decorations than `.mapToData`
|
|
|
|
|
|
|
|
if (decorations.mapToData) {
|
|
|
|
options = Object.assign({}, options, {
|
|
|
|
data: options[decorations.mapToData],
|
|
|
|
[decorations.mapToData]: undefined
|
|
|
|
});
|
|
|
|
return requestWithDefaults(options);
|
|
|
|
} // NOTE: there are currently no deprecations. But we keep the code
|
|
|
|
// below for future reference
|
|
|
|
|
|
|
|
|
|
|
|
if (decorations.renamed) {
|
|
|
|
const [newScope, newMethodName] = decorations.renamed;
|
|
|
|
octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (decorations.deprecated) {
|
|
|
|
octokit.log.warn(decorations.deprecated);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (decorations.renamedParameters) {
|
|
|
|
// @ts-ignore https://github.com/microsoft/TypeScript/issues/25488
|
|
|
|
const options = requestWithDefaults.endpoint.merge(...args);
|
2020-03-02 21:16:42 +08:00
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
for (const [name, alias] of Object.entries(decorations.renamedParameters)) {
|
|
|
|
// There is currently no deprecated parameter that is optional,
|
|
|
|
// so we never hit the else branch below at this point.
|
|
|
|
|
|
|
|
/* istanbul ignore else */
|
|
|
|
if (name in options) {
|
|
|
|
octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`);
|
|
|
|
|
|
|
|
if (!(alias in options)) {
|
|
|
|
options[alias] = options[name];
|
|
|
|
}
|
|
|
|
|
|
|
|
delete options[name];
|
|
|
|
}
|
2020-03-02 21:16:42 +08:00
|
|
|
}
|
|
|
|
|
2020-06-06 22:11:37 +08:00
|
|
|
return requestWithDefaults(options);
|
|
|
|
} // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488
|
|
|
|
|
|
|
|
|
|
|
|
return requestWithDefaults(...args);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Object.assign(withDecorations, requestWithDefaults);
|
2020-03-02 21:16:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This plugin is a 1:1 copy of internal @octokit/rest plugins. The primary
|
|
|
|
* goal is to rebuild @octokit/rest on top of @octokit/core. Once that is
|
|
|
|
* done, we will remove the registerEndpoints methods and return the methods
|
|
|
|
* directly as with the other plugins. At that point we will also remove the
|
|
|
|
* legacy workarounds and deprecations.
|
|
|
|
*
|
|
|
|
* See the plan at
|
|
|
|
* https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/1
|
|
|
|
*/
|
|
|
|
|
|
|
|
function restEndpointMethods(octokit) {
|
2020-06-06 22:11:37 +08:00
|
|
|
return endpointsToMethods(octokit, Endpoints);
|
2020-03-02 21:16:42 +08:00
|
|
|
}
|
|
|
|
restEndpointMethods.VERSION = VERSION;
|
|
|
|
|
|
|
|
exports.restEndpointMethods = restEndpointMethods;
|
|
|
|
//# sourceMappingURL=index.js.map
|