From ba0ffaa6863cea3a4d71566d40a241eec4aa6d32 Mon Sep 17 00:00:00 2001 From: Gregor Martynus Date: Sun, 26 Jan 2020 15:40:46 -0800 Subject: [PATCH] fix(Typescript): update to latest --- src/generated/rest-endpoint-methods-types.ts | 28036 ++++++++++------- 1 file changed, 16543 insertions(+), 11493 deletions(-) diff --git a/src/generated/rest-endpoint-methods-types.ts b/src/generated/rest-endpoint-methods-types.ts index 111810dd5..950939805 100644 --- a/src/generated/rest-endpoint-methods-types.ts +++ b/src/generated/rest-endpoint-methods-types.ts @@ -444,6 +444,292 @@ type UsersAddEmailsResponseItem = { verified: boolean; visibility: string | null; }; +type TeamsUpdateLegacyResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; +}; +type TeamsUpdateLegacyResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsUpdateLegacyResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; +}; +type TeamsUpdateInOrgResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; +}; +type TeamsUpdateInOrgResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsUpdateInOrgResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; +}; +type TeamsUpdateDiscussionLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; +}; +type TeamsUpdateDiscussionLegacyResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type TeamsUpdateDiscussionLegacyResponse = { + author: TeamsUpdateDiscussionLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsUpdateDiscussionLegacyResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; +}; +type TeamsUpdateDiscussionInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; +}; +type TeamsUpdateDiscussionInOrgResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type TeamsUpdateDiscussionInOrgResponse = { + author: TeamsUpdateDiscussionInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsUpdateDiscussionInOrgResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; +}; +type TeamsUpdateDiscussionCommentLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; +}; +type TeamsUpdateDiscussionCommentLegacyResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type TeamsUpdateDiscussionCommentLegacyResponse = { + author: TeamsUpdateDiscussionCommentLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + reactions: TeamsUpdateDiscussionCommentLegacyResponseReactions; + updated_at: string; + url: string; +}; +type TeamsUpdateDiscussionCommentInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; +}; +type TeamsUpdateDiscussionCommentInOrgResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type TeamsUpdateDiscussionCommentInOrgResponse = { + author: TeamsUpdateDiscussionCommentInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: string; + node_id: string; + number: number; + reactions: TeamsUpdateDiscussionCommentInOrgResponseReactions; + updated_at: string; + url: string; +}; type TeamsUpdateDiscussionCommentResponseReactions = { "+1": number; "-1": number; @@ -587,6 +873,92 @@ type TeamsUpdateResponse = { updated_at: string; url: string; }; +type TeamsReviewProjectLegacyResponsePermissions = { + admin: boolean; + read: boolean; + write: boolean; +}; +type TeamsReviewProjectLegacyResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type TeamsReviewProjectLegacyResponse = { + body: string; + columns_url: string; + created_at: string; + creator: TeamsReviewProjectLegacyResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsReviewProjectLegacyResponsePermissions; + private: boolean; + state: string; + updated_at: string; + url: string; +}; +type TeamsReviewProjectInOrgResponsePermissions = { + admin: boolean; + read: boolean; + write: boolean; +}; +type TeamsReviewProjectInOrgResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type TeamsReviewProjectInOrgResponse = { + body: string; + columns_url: string; + created_at: string; + creator: TeamsReviewProjectInOrgResponseCreator; + html_url: string; + id: number; + name: string; + node_id: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsReviewProjectInOrgResponsePermissions; + private: boolean; + state: string; + updated_at: string; + url: string; +}; type TeamsReviewProjectResponsePermissions = { admin: boolean; read: boolean; @@ -630,12 +1002,12 @@ type TeamsReviewProjectResponse = { updated_at: string; url: string; }; -type TeamsListReposResponseItemPermissions = { +type TeamsListReposLegacyResponseItemPermissions = { admin: boolean; pull: boolean; push: boolean; }; -type TeamsListReposResponseItemOwner = { +type TeamsListReposLegacyResponseItemOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -655,14 +1027,14 @@ type TeamsListReposResponseItemOwner = { type: string; url: string; }; -type TeamsListReposResponseItemLicense = { +type TeamsListReposLegacyResponseItemLicense = { key: string; name: string; node_id: string; spdx_id: string; url: string; }; -type TeamsListReposResponseItem = { +type TeamsListReposLegacyResponseItem = { archive_url: string; archived: boolean; assignees_url: string; @@ -707,7 +1079,7 @@ type TeamsListReposResponseItem = { labels_url: string; language: null; languages_url: string; - license: TeamsListReposResponseItemLicense; + license: TeamsListReposLegacyResponseItemLicense; merges_url: string; milestones_url: string; mirror_url: string; @@ -716,8 +1088,8 @@ type TeamsListReposResponseItem = { node_id: string; notifications_url: string; open_issues_count: number; - owner: TeamsListReposResponseItemOwner; - permissions: TeamsListReposResponseItemPermissions; + owner: TeamsListReposLegacyResponseItemOwner; + permissions: TeamsListReposLegacyResponseItemPermissions; private: boolean; pulls_url: string; pushed_at: string; @@ -733,19 +1105,21 @@ type TeamsListReposResponseItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; -type TeamsListProjectsResponseItemPermissions = { +type TeamsListReposInOrgResponseItemPermissions = { admin: boolean; - read: boolean; - write: boolean; + pull: boolean; + push: boolean; }; -type TeamsListProjectsResponseItemCreator = { +type TeamsListReposInOrgResponseItemOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -765,25 +1139,99 @@ type TeamsListProjectsResponseItemCreator = { type: string; url: string; }; -type TeamsListProjectsResponseItem = { - body: string; - columns_url: string; +type TeamsListReposInOrgResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; +}; +type TeamsListReposInOrgResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; created_at: string; - creator: TeamsListProjectsResponseItemCreator; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; html_url: string; id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: TeamsListReposInOrgResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; name: string; + network_count: number; node_id: string; - number: number; - organization_permission: string; - owner_url: string; - permissions: TeamsListProjectsResponseItemPermissions; + notifications_url: string; + open_issues_count: number; + owner: TeamsListReposInOrgResponseItemOwner; + permissions: TeamsListReposInOrgResponseItemPermissions; private: boolean; - state: string; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; updated_at: string; url: string; + visibility: string; + watchers_count: number; }; -type TeamsListPendingInvitationsResponseItemInviter = { +type TeamsListReposResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type TeamsListReposResponseItemOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -803,95 +1251,142 @@ type TeamsListPendingInvitationsResponseItemInviter = { type: string; url: string; }; -type TeamsListPendingInvitationsResponseItem = { - created_at: string; - email: string; - id: number; - invitation_team_url: string; - inviter: TeamsListPendingInvitationsResponseItemInviter; - login: string; - role: string; - team_count: number; -}; -type TeamsListMembersResponseItem = { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; - id: number; - login: string; +type TeamsListReposResponseItemLicense = { + key: string; + name: string; node_id: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; + spdx_id: string; url: string; }; -type TeamsListForAuthenticatedUserResponseItemOrganization = { - avatar_url: string; - blog: string; - company: string; +type TeamsListReposResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; created_at: string; + default_branch: string; + deployments_url: string; description: string; - email: string; + disabled: boolean; + downloads_url: string; events_url: string; - followers: number; - following: number; - has_organization_projects: boolean; - has_repository_projects: boolean; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; hooks_url: string; html_url: string; id: number; - is_verified: boolean; - issues_url: string; - location: string; - login: string; - members_url: string; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: TeamsListReposResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; name: string; + network_count: number; node_id: string; - public_gists: number; - public_members_url: string; - public_repos: number; + notifications_url: string; + open_issues_count: number; + owner: TeamsListReposResponseItemOwner; + permissions: TeamsListReposResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; +}; +type TeamsListProjectsLegacyResponseItemPermissions = { + admin: boolean; + read: boolean; + write: boolean; +}; +type TeamsListProjectsLegacyResponseItemCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; type: string; url: string; }; -type TeamsListForAuthenticatedUserResponseItem = { +type TeamsListProjectsLegacyResponseItem = { + body: string; + columns_url: string; created_at: string; - description: string; + creator: TeamsListProjectsLegacyResponseItemCreator; html_url: string; id: number; - members_count: number; - members_url: string; name: string; node_id: string; - organization: TeamsListForAuthenticatedUserResponseItemOrganization; - parent: null; - permission: string; - privacy: string; - repos_count: number; - repositories_url: string; - slug: string; + number: number; + organization_permission: string; + owner_url: string; + permissions: TeamsListProjectsLegacyResponseItemPermissions; + private: boolean; + state: string; updated_at: string; url: string; }; -type TeamsListDiscussionsResponseItemReactions = { - "+1": number; - "-1": number; - confused: number; - heart: number; - hooray: number; - laugh: number; - total_count: number; - url: string; +type TeamsListProjectsInOrgResponseItemPermissions = { + admin: boolean; + read: boolean; + write: boolean; }; -type TeamsListDiscussionsResponseItemAuthor = { +type TeamsListProjectsInOrgResponseItemCreator = { avatar_url: string; events_url: string; followers_url: string; @@ -911,37 +1406,30 @@ type TeamsListDiscussionsResponseItemAuthor = { type: string; url: string; }; -type TeamsListDiscussionsResponseItem = { - author: TeamsListDiscussionsResponseItemAuthor; +type TeamsListProjectsInOrgResponseItem = { body: string; - body_html: string; - body_version: string; - comments_count: number; - comments_url: string; + columns_url: string; created_at: string; + creator: TeamsListProjectsInOrgResponseItemCreator; html_url: string; - last_edited_at: null; + id: number; + name: string; node_id: string; number: number; - pinned: boolean; + organization_permission: string; + owner_url: string; + permissions: TeamsListProjectsInOrgResponseItemPermissions; private: boolean; - reactions: TeamsListDiscussionsResponseItemReactions; - team_url: string; - title: string; + state: string; updated_at: string; url: string; }; -type TeamsListDiscussionCommentsResponseItemReactions = { - "+1": number; - "-1": number; - confused: number; - heart: number; - hooray: number; - laugh: number; - total_count: number; - url: string; +type TeamsListProjectsResponseItemPermissions = { + admin: boolean; + read: boolean; + write: boolean; }; -type TeamsListDiscussionCommentsResponseItemAuthor = { +type TeamsListProjectsResponseItemCreator = { avatar_url: string; events_url: string; followers_url: string; @@ -961,78 +1449,85 @@ type TeamsListDiscussionCommentsResponseItemAuthor = { type: string; url: string; }; -type TeamsListDiscussionCommentsResponseItem = { - author: TeamsListDiscussionCommentsResponseItemAuthor; +type TeamsListProjectsResponseItem = { body: string; - body_html: string; - body_version: string; + columns_url: string; created_at: string; - discussion_url: string; + creator: TeamsListProjectsResponseItemCreator; html_url: string; - last_edited_at: null; + id: number; + name: string; node_id: string; number: number; - reactions: TeamsListDiscussionCommentsResponseItemReactions; + organization_permission: string; + owner_url: string; + permissions: TeamsListProjectsResponseItemPermissions; + private: boolean; + state: string; updated_at: string; url: string; }; -type TeamsListChildResponseItemParent = { - description: string; +type TeamsListPendingInvitationsLegacyResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; html_url: string; id: number; - members_url: string; - name: string; + login: string; node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; url: string; }; -type TeamsListChildResponseItem = { - description: string; +type TeamsListPendingInvitationsLegacyResponseItem = { + created_at: string; + email: string; id: number; - members_url: string; - name: string; - node_id: string; - parent: TeamsListChildResponseItemParent; - permission: string; - privacy: string; - repositories_url: string; - slug: string; - url: string; + invitation_team_url: string; + inviter: TeamsListPendingInvitationsLegacyResponseItemInviter; + login: string; + role: string; + team_count: number; }; -type TeamsListResponseItem = { - description: string; +type TeamsListPendingInvitationsInOrgResponseItemInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; html_url: string; id: number; - members_url: string; - name: string; + login: string; node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; url: string; }; -type TeamsGetMembershipResponse = { +type TeamsListPendingInvitationsInOrgResponseItem = { + created_at: string; + email: string; + id: number; + invitation_team_url: string; + inviter: TeamsListPendingInvitationsInOrgResponseItemInviter; + login: string; role: string; - state: string; - url: string; -}; -type TeamsGetDiscussionCommentResponseReactions = { - "+1": number; - "-1": number; - confused: number; - heart: number; - hooray: number; - laugh: number; - total_count: number; - url: string; + team_count: number; }; -type TeamsGetDiscussionCommentResponseAuthor = { +type TeamsListPendingInvitationsResponseItemInviter = { avatar_url: string; events_url: string; followers_url: string; @@ -1052,32 +1547,37 @@ type TeamsGetDiscussionCommentResponseAuthor = { type: string; url: string; }; -type TeamsGetDiscussionCommentResponse = { - author: TeamsGetDiscussionCommentResponseAuthor; - body: string; - body_html: string; - body_version: string; +type TeamsListPendingInvitationsResponseItem = { created_at: string; - discussion_url: string; + email: string; + id: number; + invitation_team_url: string; + inviter: TeamsListPendingInvitationsResponseItemInviter; + login: string; + role: string; + team_count: number; +}; +type TeamsListMembersLegacyResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; html_url: string; - last_edited_at: null; + id: number; + login: string; node_id: string; - number: number; - reactions: TeamsGetDiscussionCommentResponseReactions; - updated_at: string; - url: string; -}; -type TeamsGetDiscussionResponseReactions = { - "+1": number; - "-1": number; - confused: number; - heart: number; - hooray: number; - laugh: number; - total_count: number; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; url: string; }; -type TeamsGetDiscussionResponseAuthor = { +type TeamsListMembersInOrgResponseItem = { avatar_url: string; events_url: string; followers_url: string; @@ -1097,27 +1597,27 @@ type TeamsGetDiscussionResponseAuthor = { type: string; url: string; }; -type TeamsGetDiscussionResponse = { - author: TeamsGetDiscussionResponseAuthor; - body: string; - body_html: string; - body_version: string; - comments_count: number; - comments_url: string; - created_at: string; +type TeamsListMembersResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; html_url: string; - last_edited_at: null; + id: number; + login: string; node_id: string; - number: number; - pinned: boolean; - private: boolean; - reactions: TeamsGetDiscussionResponseReactions; - team_url: string; - title: string; - updated_at: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; url: string; }; -type TeamsGetByNameResponseOrganization = { +type TeamsListForAuthenticatedUserResponseItemOrganization = { avatar_url: string; blog: string; company: string; @@ -1146,7 +1646,7 @@ type TeamsGetByNameResponseOrganization = { type: string; url: string; }; -type TeamsGetByNameResponse = { +type TeamsListForAuthenticatedUserResponseItem = { created_at: string; description: string; html_url: string; @@ -1155,7 +1655,7 @@ type TeamsGetByNameResponse = { members_url: string; name: string; node_id: string; - organization: TeamsGetByNameResponseOrganization; + organization: TeamsListForAuthenticatedUserResponseItemOrganization; parent: null; permission: string; privacy: string; @@ -1165,55 +1665,57 @@ type TeamsGetByNameResponse = { updated_at: string; url: string; }; -type TeamsGetResponseOrganization = { +type TeamsListDiscussionsLegacyResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; +}; +type TeamsListDiscussionsLegacyResponseItemAuthor = { avatar_url: string; - blog: string; - company: string; - created_at: string; - description: string; - email: string; events_url: string; - followers: number; - following: number; - has_organization_projects: boolean; - has_repository_projects: boolean; - hooks_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; html_url: string; id: number; - is_verified: boolean; - issues_url: string; - location: string; login: string; - members_url: string; - name: string; node_id: string; - public_gists: number; - public_members_url: string; - public_repos: number; + organizations_url: string; + received_events_url: string; repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; type: string; url: string; }; -type TeamsGetResponse = { +type TeamsListDiscussionsLegacyResponseItem = { + author: TeamsListDiscussionsLegacyResponseItemAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; created_at: string; - description: string; html_url: string; - id: number; - members_count: number; - members_url: string; - name: string; + last_edited_at: null; node_id: string; - organization: TeamsGetResponseOrganization; - parent: null; - permission: string; - privacy: string; - repos_count: number; - repositories_url: string; - slug: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsListDiscussionsLegacyResponseItemReactions; + team_url: string; + title: string; updated_at: string; url: string; }; -type TeamsCreateDiscussionCommentResponseReactions = { +type TeamsListDiscussionsInOrgResponseItemReactions = { "+1": number; "-1": number; confused: number; @@ -1223,7 +1725,7 @@ type TeamsCreateDiscussionCommentResponseReactions = { total_count: number; url: string; }; -type TeamsCreateDiscussionCommentResponseAuthor = { +type TeamsListDiscussionsInOrgResponseItemAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1243,22 +1745,27 @@ type TeamsCreateDiscussionCommentResponseAuthor = { type: string; url: string; }; -type TeamsCreateDiscussionCommentResponse = { - author: TeamsCreateDiscussionCommentResponseAuthor; +type TeamsListDiscussionsInOrgResponseItem = { + author: TeamsListDiscussionsInOrgResponseItemAuthor; body: string; body_html: string; body_version: string; + comments_count: number; + comments_url: string; created_at: string; - discussion_url: string; html_url: string; last_edited_at: null; node_id: string; number: number; - reactions: TeamsCreateDiscussionCommentResponseReactions; + pinned: boolean; + private: boolean; + reactions: TeamsListDiscussionsInOrgResponseItemReactions; + team_url: string; + title: string; updated_at: string; url: string; }; -type TeamsCreateDiscussionResponseReactions = { +type TeamsListDiscussionsResponseItemReactions = { "+1": number; "-1": number; confused: number; @@ -1268,7 +1775,7 @@ type TeamsCreateDiscussionResponseReactions = { total_count: number; url: string; }; -type TeamsCreateDiscussionResponseAuthor = { +type TeamsListDiscussionsResponseItemAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1288,8 +1795,8 @@ type TeamsCreateDiscussionResponseAuthor = { type: string; url: string; }; -type TeamsCreateDiscussionResponse = { - author: TeamsCreateDiscussionResponseAuthor; +type TeamsListDiscussionsResponseItem = { + author: TeamsListDiscussionsResponseItemAuthor; body: string; body_html: string; body_version: string; @@ -1302,66 +1809,68 @@ type TeamsCreateDiscussionResponse = { number: number; pinned: boolean; private: boolean; - reactions: TeamsCreateDiscussionResponseReactions; + reactions: TeamsListDiscussionsResponseItemReactions; team_url: string; title: string; updated_at: string; url: string; }; -type TeamsCreateResponseOrganization = { +type TeamsListDiscussionCommentsLegacyResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; +}; +type TeamsListDiscussionCommentsLegacyResponseItemAuthor = { avatar_url: string; - blog: string; - company: string; - created_at: string; - description: string; - email: string; events_url: string; - followers: number; - following: number; - has_organization_projects: boolean; - has_repository_projects: boolean; - hooks_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; html_url: string; id: number; - is_verified: boolean; - issues_url: string; - location: string; login: string; - members_url: string; - name: string; node_id: string; - public_gists: number; - public_members_url: string; - public_repos: number; + organizations_url: string; + received_events_url: string; repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; type: string; url: string; }; -type TeamsCreateResponse = { +type TeamsListDiscussionCommentsLegacyResponseItem = { + author: TeamsListDiscussionCommentsLegacyResponseItemAuthor; + body: string; + body_html: string; + body_version: string; created_at: string; - description: string; + discussion_url: string; html_url: string; - id: number; - members_count: number; - members_url: string; - name: string; + last_edited_at: null; node_id: string; - organization: TeamsCreateResponseOrganization; - parent: null; - permission: string; - privacy: string; - repos_count: number; - repositories_url: string; - slug: string; + number: number; + reactions: TeamsListDiscussionCommentsLegacyResponseItemReactions; updated_at: string; url: string; }; -type TeamsCheckManagesRepoResponsePermissions = { - admin: boolean; - pull: boolean; - push: boolean; +type TeamsListDiscussionCommentsInOrgResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; }; -type TeamsCheckManagesRepoResponseOwner = { +type TeamsListDiscussionCommentsInOrgResponseItemAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1381,107 +1890,37 @@ type TeamsCheckManagesRepoResponseOwner = { type: string; url: string; }; -type TeamsCheckManagesRepoResponse = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; +type TeamsListDiscussionCommentsInOrgResponseItem = { + author: TeamsListDiscussionCommentsInOrgResponseItemAuthor; + body: string; + body_html: string; + body_version: string; created_at: string; - default_branch: string; - deployments_url: string; - description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; + discussion_url: string; html_url: string; - id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - merges_url: string; - milestones_url: string; - mirror_url: string; - name: string; - network_count: number; + last_edited_at: null; node_id: string; - notifications_url: string; - open_issues_count: number; - owner: TeamsCheckManagesRepoResponseOwner; - permissions: TeamsCheckManagesRepoResponsePermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; + number: number; + reactions: TeamsListDiscussionCommentsInOrgResponseItemReactions; updated_at: string; url: string; - watchers_count: number; -}; -type TeamsAddOrUpdateProjectResponse = { - documentation_url: string; - message: string; }; -type TeamsAddOrUpdateMembershipResponse = { - role: string; - state: string; +type TeamsListDiscussionCommentsResponseItemReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; url: string; }; -type TeamsAddMemberResponseErrorsItem = { - code: string; - field: string; - resource: string; -}; -type TeamsAddMemberResponse = { - errors: Array; - message: string; -}; -type SearchUsersResponseItemsItem = { +type TeamsListDiscussionCommentsResponseItemAuthor = { avatar_url: string; + events_url: string; followers_url: string; + following_url: string; + gists_url: string; gravatar_id: string; html_url: string; id: number; @@ -1490,90 +1929,193 @@ type SearchUsersResponseItemsItem = { organizations_url: string; received_events_url: string; repos_url: string; - score: number; + site_admin: boolean; + starred_url: string; subscriptions_url: string; type: string; url: string; }; -type SearchUsersResponse = { - incomplete_results: boolean; - items: Array; - total_count: number; -}; -type SearchTopicsResponseItemsItem = { +type TeamsListDiscussionCommentsResponseItem = { + author: TeamsListDiscussionCommentsResponseItemAuthor; + body: string; + body_html: string; + body_version: string; created_at: string; - created_by: string; - curated: boolean; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsListDiscussionCommentsResponseItemReactions; + updated_at: string; + url: string; +}; +type TeamsListChildLegacyResponseItemParent = { description: string; - display_name: string; - featured: boolean; + html_url: string; + id: number; + members_url: string; name: string; - released: string; - score: number; - short_description: string; - updated_at: string; + node_id: string; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; }; -type SearchTopicsResponse = { - incomplete_results: boolean; - items: Array; - total_count: number; +type TeamsListChildLegacyResponseItem = { + description: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: TeamsListChildLegacyResponseItemParent; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; }; -type SearchReposResponseItemsItemOwner = { - avatar_url: string; - gravatar_id: string; +type TeamsListChildInOrgResponseItemParent = { + description: string; + html_url: string; id: number; - login: string; + members_url: string; + name: string; node_id: string; - received_events_url: string; - type: string; + permission: string; + privacy: string; + repositories_url: string; + slug: string; url: string; }; -type SearchReposResponseItemsItem = { - created_at: string; - default_branch: string; +type TeamsListChildInOrgResponseItem = { + description: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: TeamsListChildInOrgResponseItemParent; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; +}; +type TeamsListChildResponseItemParent = { description: string; - fork: boolean; - forks_count: number; - full_name: string; - homepage: string; html_url: string; id: number; - language: string; - master_branch: string; + members_url: string; name: string; node_id: string; - open_issues_count: number; - owner: SearchReposResponseItemsItemOwner; - private: boolean; - pushed_at: string; - score: number; - size: number; - stargazers_count: number; - updated_at: string; + permission: string; + privacy: string; + repositories_url: string; + slug: string; url: string; - watchers_count: number; }; -type SearchReposResponse = { - incomplete_results: boolean; - items: Array; - total_count: number; +type TeamsListChildResponseItem = { + description: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: TeamsListChildResponseItemParent; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; }; -type SearchLabelsResponseItemsItem = { - color: string; - default: boolean; +type TeamsListResponseItem = { description: string; + html_url: string; id: number; + members_url: string; name: string; node_id: string; - score: number; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; url: string; }; -type SearchLabelsResponse = { - incomplete_results: boolean; - items: Array; +type TeamsGetMembershipLegacyResponse = { + role: string; + state: string; + url: string; +}; +type TeamsGetMembershipInOrgResponse = { + role: string; + state: string; + url: string; +}; +type TeamsGetMembershipResponse = { + role: string; + state: string; + url: string; +}; +type TeamsGetLegacyResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; +}; +type TeamsGetLegacyResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsGetLegacyResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; +}; +type TeamsGetDiscussionLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; total_count: number; + url: string; }; -type SearchIssuesAndPullRequestsResponseItemsItemUser = { +type TeamsGetDiscussionLegacyResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1587,53 +2129,43 @@ type SearchIssuesAndPullRequestsResponseItemsItemUser = { organizations_url: string; received_events_url: string; repos_url: string; + site_admin: boolean; starred_url: string; subscriptions_url: string; type: string; url: string; }; -type SearchIssuesAndPullRequestsResponseItemsItemPullRequest = { - diff_url: null; - html_url: null; - patch_url: null; -}; -type SearchIssuesAndPullRequestsResponseItemsItemLabelsItem = { - color: string; - id: number; - name: string; - node_id: string; - url: string; -}; -type SearchIssuesAndPullRequestsResponseItemsItem = { - assignee: null; +type TeamsGetDiscussionLegacyResponse = { + author: TeamsGetDiscussionLegacyResponseAuthor; body: string; - closed_at: null; - comments: number; + body_html: string; + body_version: string; + comments_count: number; comments_url: string; created_at: string; - events_url: string; html_url: string; - id: number; - labels: Array; - labels_url: string; - milestone: null; + last_edited_at: null; node_id: string; number: number; - pull_request: SearchIssuesAndPullRequestsResponseItemsItemPullRequest; - repository_url: string; - score: number; - state: string; + pinned: boolean; + private: boolean; + reactions: TeamsGetDiscussionLegacyResponseReactions; + team_url: string; title: string; updated_at: string; url: string; - user: SearchIssuesAndPullRequestsResponseItemsItemUser; }; -type SearchIssuesAndPullRequestsResponse = { - incomplete_results: boolean; - items: Array; +type TeamsGetDiscussionInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; total_count: number; + url: string; }; -type SearchIssuesResponseItemsItemUser = { +type TeamsGetDiscussionInOrgResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1647,53 +2179,43 @@ type SearchIssuesResponseItemsItemUser = { organizations_url: string; received_events_url: string; repos_url: string; + site_admin: boolean; starred_url: string; subscriptions_url: string; type: string; url: string; }; -type SearchIssuesResponseItemsItemPullRequest = { - diff_url: null; - html_url: null; - patch_url: null; -}; -type SearchIssuesResponseItemsItemLabelsItem = { - color: string; - id: number; - name: string; - node_id: string; - url: string; -}; -type SearchIssuesResponseItemsItem = { - assignee: null; +type TeamsGetDiscussionInOrgResponse = { + author: TeamsGetDiscussionInOrgResponseAuthor; body: string; - closed_at: null; - comments: number; + body_html: string; + body_version: string; + comments_count: number; comments_url: string; created_at: string; - events_url: string; html_url: string; - id: number; - labels: Array; - labels_url: string; - milestone: null; + last_edited_at: null; node_id: string; number: number; - pull_request: SearchIssuesResponseItemsItemPullRequest; - repository_url: string; - score: number; - state: string; + pinned: boolean; + private: boolean; + reactions: TeamsGetDiscussionInOrgResponseReactions; + team_url: string; title: string; updated_at: string; url: string; - user: SearchIssuesResponseItemsItemUser; }; -type SearchIssuesResponse = { - incomplete_results: boolean; - items: Array; +type TeamsGetDiscussionCommentLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; total_count: number; + url: string; }; -type SearchCommitsResponseItemsItemRepositoryOwner = { +type TeamsGetDiscussionCommentLegacyResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1713,60 +2235,32 @@ type SearchCommitsResponseItemsItemRepositoryOwner = { type: string; url: string; }; -type SearchCommitsResponseItemsItemRepository = { - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - description: string; - downloads_url: string; - events_url: string; - fork: boolean; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - hooks_url: string; +type TeamsGetDiscussionCommentLegacyResponse = { + author: TeamsGetDiscussionCommentLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; html_url: string; - id: number; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - name: string; + last_edited_at: null; node_id: string; - notifications_url: string; - owner: SearchCommitsResponseItemsItemRepositoryOwner; - private: boolean; - pulls_url: string; - releases_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; + number: number; + reactions: TeamsGetDiscussionCommentLegacyResponseReactions; + updated_at: string; url: string; }; -type SearchCommitsResponseItemsItemParentsItem = { - html_url: string; - sha: string; +type TeamsGetDiscussionCommentInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; url: string; }; -type SearchCommitsResponseItemsItemCommitter = { +type TeamsGetDiscussionCommentInOrgResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1786,26 +2280,32 @@ type SearchCommitsResponseItemsItemCommitter = { type: string; url: string; }; -type SearchCommitsResponseItemsItemCommitTree = { sha: string; url: string }; -type SearchCommitsResponseItemsItemCommitCommitter = { - date: string; - email: string; - name: string; -}; -type SearchCommitsResponseItemsItemCommitAuthor = { - date: string; - email: string; - name: string; +type TeamsGetDiscussionCommentInOrgResponse = { + author: TeamsGetDiscussionCommentInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsGetDiscussionCommentInOrgResponseReactions; + updated_at: string; + url: string; }; -type SearchCommitsResponseItemsItemCommit = { - author: SearchCommitsResponseItemsItemCommitAuthor; - comment_count: number; - committer: SearchCommitsResponseItemsItemCommitCommitter; - message: string; - tree: SearchCommitsResponseItemsItemCommitTree; +type TeamsGetDiscussionCommentResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; url: string; }; -type SearchCommitsResponseItemsItemAuthor = { +type TeamsGetDiscussionCommentResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1825,24 +2325,32 @@ type SearchCommitsResponseItemsItemAuthor = { type: string; url: string; }; -type SearchCommitsResponseItemsItem = { - author: SearchCommitsResponseItemsItemAuthor; - comments_url: string; - commit: SearchCommitsResponseItemsItemCommit; - committer: SearchCommitsResponseItemsItemCommitter; +type TeamsGetDiscussionCommentResponse = { + author: TeamsGetDiscussionCommentResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; html_url: string; - parents: Array; - repository: SearchCommitsResponseItemsItemRepository; - score: number; - sha: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsGetDiscussionCommentResponseReactions; + updated_at: string; url: string; }; -type SearchCommitsResponse = { - incomplete_results: boolean; - items: Array; +type TeamsGetDiscussionResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; total_count: number; + url: string; }; -type SearchCodeResponseItemsItemRepositoryOwner = { +type TeamsGetDiscussionResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1862,68 +2370,133 @@ type SearchCodeResponseItemsItemRepositoryOwner = { type: string; url: string; }; -type SearchCodeResponseItemsItemRepository = { - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; +type TeamsGetDiscussionResponse = { + author: TeamsGetDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - description: string; - downloads_url: string; - events_url: string; - fork: boolean; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - hooks_url: string; + created_at: string; html_url: string; - id: number; - issue_comment_url: string; - issue_events_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsGetDiscussionResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; +}; +type TeamsGetByNameResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; + location: string; + login: string; + members_url: string; name: string; node_id: string; - notifications_url: string; - owner: SearchCodeResponseItemsItemRepositoryOwner; - private: boolean; - pulls_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; url: string; }; -type SearchCodeResponseItemsItem = { - git_url: string; +type TeamsGetByNameResponse = { + created_at: string; + description: string; html_url: string; + id: number; + members_count: number; + members_url: string; name: string; - path: string; - repository: SearchCodeResponseItemsItemRepository; - score: number; - sha: string; + node_id: string; + organization: TeamsGetByNameResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; url: string; }; -type SearchCodeResponse = { - incomplete_results: boolean; - items: Array; +type TeamsGetResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; +}; +type TeamsGetResponse = { + created_at: string; + description: string; + html_url: string; + id: number; + members_count: number; + members_url: string; + name: string; + node_id: string; + organization: TeamsGetResponseOrganization; + parent: null; + permission: string; + privacy: string; + repos_count: number; + repositories_url: string; + slug: string; + updated_at: string; + url: string; +}; +type TeamsCreateDiscussionLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; total_count: number; + url: string; }; -type ReposUploadReleaseAssetResponseValueUploader = { +type TeamsCreateDiscussionLegacyResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1943,25 +2516,37 @@ type ReposUploadReleaseAssetResponseValueUploader = { type: string; url: string; }; -type ReposUploadReleaseAssetResponseValue = { - browser_download_url: string; - content_type: string; +type TeamsCreateDiscussionLegacyResponse = { + author: TeamsCreateDiscussionLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; created_at: string; - download_count: number; - id: number; - label: string; - name: string; + html_url: string; + last_edited_at: null; node_id: string; - size: number; - state: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsCreateDiscussionLegacyResponseReactions; + team_url: string; + title: string; updated_at: string; - uploader: ReposUploadReleaseAssetResponseValueUploader; url: string; }; -type ReposUploadReleaseAssetResponse = { - value: ReposUploadReleaseAssetResponseValue; +type TeamsCreateDiscussionInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; }; -type ReposUpdateReleaseAssetResponseUploader = { +type TeamsCreateDiscussionInOrgResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -1981,22 +2566,37 @@ type ReposUpdateReleaseAssetResponseUploader = { type: string; url: string; }; -type ReposUpdateReleaseAssetResponse = { - browser_download_url: string; - content_type: string; +type TeamsCreateDiscussionInOrgResponse = { + author: TeamsCreateDiscussionInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; created_at: string; - download_count: number; - id: number; - label: string; - name: string; + html_url: string; + last_edited_at: null; node_id: string; - size: number; - state: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsCreateDiscussionInOrgResponseReactions; + team_url: string; + title: string; updated_at: string; - uploader: ReposUpdateReleaseAssetResponseUploader; url: string; }; -type ReposUpdateReleaseResponseAuthor = { +type TeamsCreateDiscussionCommentLegacyResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; +}; +type TeamsCreateDiscussionCommentLegacyResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -2016,7 +2616,32 @@ type ReposUpdateReleaseResponseAuthor = { type: string; url: string; }; -type ReposUpdateReleaseResponseAssetsItemUploader = { +type TeamsCreateDiscussionCommentLegacyResponse = { + author: TeamsCreateDiscussionCommentLegacyResponseAuthor; + body: string; + body_html: string; + body_version: string; + created_at: string; + discussion_url: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + reactions: TeamsCreateDiscussionCommentLegacyResponseReactions; + updated_at: string; + url: string; +}; +type TeamsCreateDiscussionCommentInOrgResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; +}; +type TeamsCreateDiscussionCommentInOrgResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -2036,48 +2661,77 @@ type ReposUpdateReleaseResponseAssetsItemUploader = { type: string; url: string; }; -type ReposUpdateReleaseResponseAssetsItem = { - browser_download_url: string; - content_type: string; +type TeamsCreateDiscussionCommentInOrgResponse = { + author: TeamsCreateDiscussionCommentInOrgResponseAuthor; + body: string; + body_html: string; + body_version: string; created_at: string; - download_count: number; - id: number; - label: string; - name: string; + discussion_url: string; + html_url: string; + last_edited_at: null; node_id: string; - size: number; - state: string; + number: number; + reactions: TeamsCreateDiscussionCommentInOrgResponseReactions; updated_at: string; - uploader: ReposUpdateReleaseResponseAssetsItemUploader; url: string; }; -type ReposUpdateReleaseResponse = { - assets: Array; - assets_url: string; - author: ReposUpdateReleaseResponseAuthor; +type TeamsCreateDiscussionCommentResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; + url: string; +}; +type TeamsCreateDiscussionCommentResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type TeamsCreateDiscussionCommentResponse = { + author: TeamsCreateDiscussionCommentResponseAuthor; body: string; + body_html: string; + body_version: string; created_at: string; - draft: boolean; + discussion_url: string; html_url: string; - id: number; - name: string; + last_edited_at: null; node_id: string; - prerelease: boolean; - published_at: string; - tag_name: string; - tarball_url: string; - target_commitish: string; - upload_url: string; + number: number; + reactions: TeamsCreateDiscussionCommentResponseReactions; + updated_at: string; url: string; - zipball_url: string; }; -type ReposUpdateProtectedBranchRequiredStatusChecksResponse = { - contexts: Array; - contexts_url: string; - strict: boolean; +type TeamsCreateDiscussionResponseReactions = { + "+1": number; + "-1": number; + confused: number; + heart: number; + hooray: number; + laugh: number; + total_count: number; url: string; }; -type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem = { +type TeamsCreateDiscussionResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -2097,39 +2751,80 @@ type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRest type: string; url: string; }; -type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem = { +type TeamsCreateDiscussionResponse = { + author: TeamsCreateDiscussionResponseAuthor; + body: string; + body_html: string; + body_version: string; + comments_count: number; + comments_url: string; + created_at: string; + html_url: string; + last_edited_at: null; + node_id: string; + number: number; + pinned: boolean; + private: boolean; + reactions: TeamsCreateDiscussionResponseReactions; + team_url: string; + title: string; + updated_at: string; + url: string; +}; +type TeamsCreateResponseOrganization = { + avatar_url: string; + blog: string; + company: string; + created_at: string; + description: string; + email: string; + events_url: string; + followers: number; + following: number; + has_organization_projects: boolean; + has_repository_projects: boolean; + hooks_url: string; + html_url: string; + id: number; + is_verified: boolean; + issues_url: string; + location: string; + login: string; + members_url: string; + name: string; + node_id: string; + public_gists: number; + public_members_url: string; + public_repos: number; + repos_url: string; + type: string; + url: string; +}; +type TeamsCreateResponse = { + created_at: string; description: string; html_url: string; id: number; + members_count: number; members_url: string; name: string; node_id: string; + organization: TeamsCreateResponseOrganization; parent: null; permission: string; privacy: string; + repos_count: number; repositories_url: string; slug: string; + updated_at: string; url: string; }; -type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions = { - teams: Array< - ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem - >; - teams_url: string; - url: string; - users: Array< - ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem - >; - users_url: string; -}; -type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse = { - dismiss_stale_reviews: boolean; - dismissal_restrictions: ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions; - require_code_owner_reviews: boolean; - required_approving_review_count: number; - url: string; +type TeamsCheckManagesRepoLegacyResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; }; -type ReposUpdateInvitationResponseRepositoryOwner = { +type TeamsCheckManagesRepoLegacyResponseOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -2149,56 +2844,94 @@ type ReposUpdateInvitationResponseRepositoryOwner = { type: string; url: string; }; -type ReposUpdateInvitationResponseRepository = { +type TeamsCheckManagesRepoLegacyResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; archive_url: string; + archived: boolean; assignees_url: string; blobs_url: string; branches_url: string; + clone_url: string; collaborators_url: string; comments_url: string; commits_url: string; compare_url: string; contents_url: string; contributors_url: string; + created_at: string; + default_branch: string; deployments_url: string; description: string; + disabled: boolean; downloads_url: string; events_url: string; fork: boolean; + forks_count: number; forks_url: string; full_name: string; git_commits_url: string; git_refs_url: string; git_tags_url: string; git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; html_url: string; id: number; + is_template: boolean; issue_comment_url: string; issue_events_url: string; issues_url: string; keys_url: string; labels_url: string; + language: null; languages_url: string; merges_url: string; milestones_url: string; + mirror_url: string; name: string; + network_count: number; node_id: string; notifications_url: string; - owner: ReposUpdateInvitationResponseRepositoryOwner; + open_issues_count: number; + owner: TeamsCheckManagesRepoLegacyResponseOwner; + permissions: TeamsCheckManagesRepoLegacyResponsePermissions; private: boolean; pulls_url: string; + pushed_at: string; releases_url: string; + size: number; ssh_url: string; + stargazers_count: number; stargazers_url: string; statuses_url: string; + subscribers_count: number; subscribers_url: string; subscription_url: string; + svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; trees_url: string; + updated_at: string; url: string; + visibility: string; + watchers_count: number; }; -type ReposUpdateInvitationResponseInviter = { +type TeamsCheckManagesRepoInOrgResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type TeamsCheckManagesRepoInOrgResponseOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -2218,7 +2951,94 @@ type ReposUpdateInvitationResponseInviter = { type: string; url: string; }; -type ReposUpdateInvitationResponseInvitee = { +type TeamsCheckManagesRepoInOrgResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: TeamsCheckManagesRepoInOrgResponseOwner; + permissions: TeamsCheckManagesRepoInOrgResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; +}; +type TeamsCheckManagesRepoResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type TeamsCheckManagesRepoResponseOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -2238,101 +3058,157 @@ type ReposUpdateInvitationResponseInvitee = { type: string; url: string; }; -type ReposUpdateInvitationResponse = { - created_at: string; - html_url: string; - id: number; - invitee: ReposUpdateInvitationResponseInvitee; - inviter: ReposUpdateInvitationResponseInviter; - permissions: string; - repository: ReposUpdateInvitationResponseRepository; - url: string; -}; -type ReposUpdateHookResponseLastResponse = { - code: null; - message: null; - status: string; -}; -type ReposUpdateHookResponseConfig = { - content_type: string; - insecure_ssl: string; - url: string; -}; -type ReposUpdateHookResponse = { - active: boolean; - config: ReposUpdateHookResponseConfig; +type TeamsCheckManagesRepoResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; created_at: string; - events: Array; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; id: number; - last_response: ReposUpdateHookResponseLastResponse; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; name: string; - ping_url: string; - test_url: string; - type: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: TeamsCheckManagesRepoResponseOwner; + permissions: TeamsCheckManagesRepoResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; updated_at: string; url: string; + visibility: string; + watchers_count: number; }; -type ReposUpdateFileResponseContentLinks = { - git: string; - html: string; - self: string; +type TeamsAddOrUpdateProjectLegacyResponse = { + documentation_url: string; + message: string; }; -type ReposUpdateFileResponseContent = { - _links: ReposUpdateFileResponseContentLinks; - download_url: string; - git_url: string; - html_url: string; - name: string; - path: string; - sha: string; - size: number; - type: string; +type TeamsAddOrUpdateProjectInOrgResponse = { + documentation_url: string; + message: string; +}; +type TeamsAddOrUpdateProjectResponse = { + documentation_url: string; + message: string; +}; +type TeamsAddOrUpdateMembershipLegacyResponse = { + role: string; + state: string; url: string; }; -type ReposUpdateFileResponseCommitVerification = { - payload: null; - reason: string; - signature: null; - verified: boolean; +type TeamsAddOrUpdateMembershipInOrgResponse = { + role: string; + state: string; + url: string; }; -type ReposUpdateFileResponseCommitTree = { sha: string; url: string }; -type ReposUpdateFileResponseCommitParentsItem = { - html_url: string; - sha: string; +type TeamsAddOrUpdateMembershipResponse = { + role: string; + state: string; url: string; }; -type ReposUpdateFileResponseCommitCommitter = { - date: string; - email: string; - name: string; +type TeamsAddMemberLegacyResponseErrorsItem = { + code: string; + field: string; + resource: string; }; -type ReposUpdateFileResponseCommitAuthor = { - date: string; - email: string; - name: string; +type TeamsAddMemberLegacyResponse = { + errors: Array; + message: string; }; -type ReposUpdateFileResponseCommit = { - author: ReposUpdateFileResponseCommitAuthor; - committer: ReposUpdateFileResponseCommitCommitter; - html_url: string; +type TeamsAddMemberResponseErrorsItem = { + code: string; + field: string; + resource: string; +}; +type TeamsAddMemberResponse = { + errors: Array; message: string; - node_id: string; - parents: Array; - sha: string; - tree: ReposUpdateFileResponseCommitTree; - url: string; - verification: ReposUpdateFileResponseCommitVerification; }; -type ReposUpdateFileResponse = { - commit: ReposUpdateFileResponseCommit; - content: ReposUpdateFileResponseContent; +type SearchUsersLegacyResponseUsersItem = { + created: string; + created_at: string; + followers: number; + followers_count: number; + fullname: string; + gravatar_id: string; + id: string; + language: string; + location: string; + login: string; + name: string; + public_repo_count: number; + repos: number; + score: number; + type: string; + username: string; }; -type ReposUpdateCommitCommentResponseUser = { +type SearchUsersLegacyResponse = { + users: Array; +}; +type SearchUsersResponseItemsItem = { avatar_url: string; - events_url: string; followers_url: string; - following_url: string; - gists_url: string; gravatar_id: string; html_url: string; id: number; @@ -2341,27 +3217,136 @@ type ReposUpdateCommitCommentResponseUser = { organizations_url: string; received_events_url: string; repos_url: string; - site_admin: boolean; - starred_url: string; + score: number; subscriptions_url: string; type: string; url: string; }; -type ReposUpdateCommitCommentResponse = { - body: string; - commit_id: string; +type SearchUsersResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; +}; +type SearchTopicsResponseItemsItem = { + created_at: string; + created_by: string; + curated: boolean; + description: string; + display_name: string; + featured: boolean; + name: string; + released: string; + score: number; + short_description: string; + updated_at: string; +}; +type SearchTopicsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; +}; +type SearchReposLegacyResponseRepositoriesItem = { + created: string; + created_at: string; + description: string; + followers: number; + fork: boolean; + forks: number; + has_downloads: boolean; + has_issues: boolean; + has_wiki: boolean; + homepage: string; + language: string; + name: string; + open_issues: number; + owner: string; + private: boolean; + pushed: string; + pushed_at: string; + score: number; + size: number; + type: string; + url: string; + username: string; + watchers: number; +}; +type SearchReposLegacyResponse = { + repositories: Array; +}; +type SearchReposResponseItemsItemOwner = { + avatar_url: string; + gravatar_id: string; + id: number; + login: string; + node_id: string; + received_events_url: string; + type: string; + url: string; +}; +type SearchReposResponseItemsItem = { created_at: string; + default_branch: string; + description: string; + fork: boolean; + forks_count: number; + full_name: string; + homepage: string; html_url: string; id: number; - line: number; + language: string; + master_branch: string; + name: string; node_id: string; - path: string; - position: number; + open_issues_count: number; + owner: SearchReposResponseItemsItemOwner; + private: boolean; + pushed_at: string; + score: number; + size: number; + stargazers_count: number; updated_at: string; url: string; - user: ReposUpdateCommitCommentResponseUser; + watchers_count: number; }; -type ReposUpdateBranchProtectionResponseRestrictionsUsersItem = { +type SearchReposResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; +}; +type SearchLabelsResponseItemsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + score: number; + url: string; +}; +type SearchLabelsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; +}; +type SearchIssuesLegacyResponseIssuesItem = { + body: string; + comments: number; + created_at: string; + gravatar_id: string; + html_url: string; + labels: Array; + number: number; + position: number; + state: string; + title: string; + updated_at: string; + user: string; + votes: number; +}; +type SearchIssuesLegacyResponse = { + issues: Array; +}; +type SearchIssuesAndPullRequestsResponseItemsItemUser = { avatar_url: string; events_url: string; followers_url: string; @@ -2375,76 +3360,53 @@ type ReposUpdateBranchProtectionResponseRestrictionsUsersItem = { organizations_url: string; received_events_url: string; repos_url: string; - site_admin: boolean; starred_url: string; subscriptions_url: string; type: string; url: string; }; -type ReposUpdateBranchProtectionResponseRestrictionsTeamsItem = { - description: string; - html_url: string; - id: number; - members_url: string; - name: string; - node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; - url: string; -}; -type ReposUpdateBranchProtectionResponseRestrictionsAppsItemPermissions = { - contents: string; - issues: string; - metadata: string; - single_file: string; +type SearchIssuesAndPullRequestsResponseItemsItemPullRequest = { + diff_url: null; + html_url: null; + patch_url: null; }; -type ReposUpdateBranchProtectionResponseRestrictionsAppsItemOwner = { - avatar_url: string; - description: string; - events_url: string; - hooks_url: string; +type SearchIssuesAndPullRequestsResponseItemsItemLabelsItem = { + color: string; id: number; - issues_url: string; - login: string; - members_url: string; + name: string; node_id: string; - public_members_url: string; - repos_url: string; url: string; }; -type ReposUpdateBranchProtectionResponseRestrictionsAppsItem = { +type SearchIssuesAndPullRequestsResponseItemsItem = { + assignee: null; + body: string; + closed_at: null; + comments: number; + comments_url: string; created_at: string; - description: string; - events: Array; - external_url: string; + events_url: string; html_url: string; id: number; - name: string; + labels: Array; + labels_url: string; + milestone: null; node_id: string; - owner: ReposUpdateBranchProtectionResponseRestrictionsAppsItemOwner; - permissions: ReposUpdateBranchProtectionResponseRestrictionsAppsItemPermissions; - slug: string; + number: number; + pull_request: SearchIssuesAndPullRequestsResponseItemsItemPullRequest; + repository_url: string; + score: number; + state: string; + title: string; updated_at: string; -}; -type ReposUpdateBranchProtectionResponseRestrictions = { - apps: Array; - apps_url: string; - teams: Array; - teams_url: string; url: string; - users: Array; - users_url: string; + user: SearchIssuesAndPullRequestsResponseItemsItemUser; }; -type ReposUpdateBranchProtectionResponseRequiredStatusChecks = { - contexts: Array; - contexts_url: string; - strict: boolean; - url: string; +type SearchIssuesAndPullRequestsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; }; -type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { +type SearchIssuesResponseItemsItemUser = { avatar_url: string; events_url: string; followers_url: string; @@ -2458,61 +3420,71 @@ type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestr organizations_url: string; received_events_url: string; repos_url: string; - site_admin: boolean; starred_url: string; subscriptions_url: string; type: string; url: string; }; -type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { - description: string; - html_url: string; +type SearchIssuesResponseItemsItemPullRequest = { + diff_url: null; + html_url: null; + patch_url: null; +}; +type SearchIssuesResponseItemsItemLabelsItem = { + color: string; id: number; - members_url: string; name: string; node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; - url: string; -}; -type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { - teams: Array< - ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem - >; - teams_url: string; - url: string; - users: Array< - ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem - >; - users_url: string; -}; -type ReposUpdateBranchProtectionResponseRequiredPullRequestReviews = { - dismiss_stale_reviews: boolean; - dismissal_restrictions: ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; - require_code_owner_reviews: boolean; - required_approving_review_count: number; url: string; }; -type ReposUpdateBranchProtectionResponseEnforceAdmins = { - enabled: boolean; +type SearchIssuesResponseItemsItem = { + assignee: null; + body: string; + closed_at: null; + comments: number; + comments_url: string; + created_at: string; + events_url: string; + html_url: string; + id: number; + labels: Array; + labels_url: string; + milestone: null; + node_id: string; + number: number; + pull_request: SearchIssuesResponseItemsItemPullRequest; + repository_url: string; + score: number; + state: string; + title: string; + updated_at: string; url: string; + user: SearchIssuesResponseItemsItemUser; }; -type ReposUpdateBranchProtectionResponse = { - enforce_admins: ReposUpdateBranchProtectionResponseEnforceAdmins; - required_pull_request_reviews: ReposUpdateBranchProtectionResponseRequiredPullRequestReviews; - required_status_checks: ReposUpdateBranchProtectionResponseRequiredStatusChecks; - restrictions: ReposUpdateBranchProtectionResponseRestrictions; - url: string; +type SearchIssuesResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; }; -type ReposUpdateResponseSourcePermissions = { - admin: boolean; - pull: boolean; - push: boolean; +type SearchEmailLegacyResponseUser = { + blog: string; + company: string; + created: string; + created_at: string; + email: string; + followers_count: number; + following_count: number; + gravatar_id: string; + id: number; + location: string; + login: string; + name: string; + public_gist_count: number; + public_repo_count: number; + type: string; }; -type ReposUpdateResponseSourceOwner = { +type SearchEmailLegacyResponse = { user: SearchEmailLegacyResponseUser }; +type SearchCommitsResponseItemsItemRepositoryOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -2532,97 +3504,60 @@ type ReposUpdateResponseSourceOwner = { type: string; url: string; }; -type ReposUpdateResponseSource = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; +type SearchCommitsResponseItemsItemRepository = { archive_url: string; - archived: boolean; assignees_url: string; blobs_url: string; branches_url: string; - clone_url: string; collaborators_url: string; comments_url: string; commits_url: string; compare_url: string; contents_url: string; contributors_url: string; - created_at: string; - default_branch: string; deployments_url: string; description: string; - disabled: boolean; downloads_url: string; events_url: string; fork: boolean; - forks_count: number; forks_url: string; full_name: string; git_commits_url: string; git_refs_url: string; git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; hooks_url: string; html_url: string; id: number; - is_template: boolean; issue_comment_url: string; issue_events_url: string; issues_url: string; keys_url: string; labels_url: string; - language: null; languages_url: string; merges_url: string; milestones_url: string; - mirror_url: string; name: string; - network_count: number; node_id: string; notifications_url: string; - open_issues_count: number; - owner: ReposUpdateResponseSourceOwner; - permissions: ReposUpdateResponseSourcePermissions; + owner: SearchCommitsResponseItemsItemRepositoryOwner; private: boolean; pulls_url: string; - pushed_at: string; releases_url: string; - size: number; - ssh_url: string; - stargazers_count: number; stargazers_url: string; statuses_url: string; - subscribers_count: number; subscribers_url: string; subscription_url: string; - svn_url: string; tags_url: string; teams_url: string; - template_repository: null; - topics: Array; trees_url: string; - updated_at: string; url: string; - watchers_count: number; }; -type ReposUpdateResponsePermissions = { - admin: boolean; - pull: boolean; - push: boolean; +type SearchCommitsResponseItemsItemParentsItem = { + html_url: string; + sha: string; + url: string; }; -type ReposUpdateResponseParentPermissions = { - admin: boolean; - pull: boolean; - push: boolean; -}; -type ReposUpdateResponseParentOwner = { +type SearchCommitsResponseItemsItemCommitter = { avatar_url: string; events_url: string; followers_url: string; @@ -2642,87 +3577,26 @@ type ReposUpdateResponseParentOwner = { type: string; url: string; }; -type ReposUpdateResponseParent = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - created_at: string; - default_branch: string; - deployments_url: string; - description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; - html_url: string; - id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - merges_url: string; - milestones_url: string; - mirror_url: string; +type SearchCommitsResponseItemsItemCommitTree = { sha: string; url: string }; +type SearchCommitsResponseItemsItemCommitCommitter = { + date: string; + email: string; name: string; - network_count: number; - node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposUpdateResponseParentOwner; - permissions: ReposUpdateResponseParentPermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; - updated_at: string; +}; +type SearchCommitsResponseItemsItemCommitAuthor = { + date: string; + email: string; + name: string; +}; +type SearchCommitsResponseItemsItemCommit = { + author: SearchCommitsResponseItemsItemCommitAuthor; + comment_count: number; + committer: SearchCommitsResponseItemsItemCommitCommitter; + message: string; + tree: SearchCommitsResponseItemsItemCommitTree; url: string; - watchers_count: number; }; -type ReposUpdateResponseOwner = { +type SearchCommitsResponseItemsItemAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -2742,7 +3616,24 @@ type ReposUpdateResponseOwner = { type: string; url: string; }; -type ReposUpdateResponseOrganization = { +type SearchCommitsResponseItemsItem = { + author: SearchCommitsResponseItemsItemAuthor; + comments_url: string; + commit: SearchCommitsResponseItemsItemCommit; + committer: SearchCommitsResponseItemsItemCommitter; + html_url: string; + parents: Array; + repository: SearchCommitsResponseItemsItemRepository; + score: number; + sha: string; + url: string; +}; +type SearchCommitsResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; +}; +type SearchCodeResponseItemsItemRepositoryOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -2762,95 +3653,68 @@ type ReposUpdateResponseOrganization = { type: string; url: string; }; -type ReposUpdateResponse = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; +type SearchCodeResponseItemsItemRepository = { archive_url: string; - archived: boolean; assignees_url: string; blobs_url: string; branches_url: string; - clone_url: string; collaborators_url: string; comments_url: string; commits_url: string; compare_url: string; contents_url: string; contributors_url: string; - created_at: string; - default_branch: string; - deployments_url: string; description: string; - disabled: boolean; downloads_url: string; events_url: string; fork: boolean; - forks_count: number; forks_url: string; full_name: string; git_commits_url: string; git_refs_url: string; git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; hooks_url: string; html_url: string; id: number; - is_template: boolean; issue_comment_url: string; issue_events_url: string; issues_url: string; keys_url: string; labels_url: string; - language: null; languages_url: string; merges_url: string; milestones_url: string; - mirror_url: string; name: string; - network_count: number; node_id: string; notifications_url: string; - open_issues_count: number; - organization: ReposUpdateResponseOrganization; - owner: ReposUpdateResponseOwner; - parent: ReposUpdateResponseParent; - permissions: ReposUpdateResponsePermissions; + owner: SearchCodeResponseItemsItemRepositoryOwner; private: boolean; pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - source: ReposUpdateResponseSource; - ssh_url: string; - stargazers_count: number; stargazers_url: string; statuses_url: string; - subscribers_count: number; subscribers_url: string; subscription_url: string; - svn_url: string; tags_url: string; teams_url: string; - template_repository: null; - topics: Array; trees_url: string; - updated_at: string; url: string; - watchers_count: number; }; -type ReposTransferResponsePermissions = { - admin: boolean; - pull: boolean; - push: boolean; +type SearchCodeResponseItemsItem = { + git_url: string; + html_url: string; + name: string; + path: string; + repository: SearchCodeResponseItemsItemRepository; + score: number; + sha: string; + url: string; }; -type ReposTransferResponseOwner = { +type SearchCodeResponse = { + incomplete_results: boolean; + items: Array; + total_count: number; +}; +type ReposUploadReleaseAssetResponseValueUploader = { avatar_url: string; events_url: string; followers_url: string; @@ -2870,133 +3734,25 @@ type ReposTransferResponseOwner = { type: string; url: string; }; -type ReposTransferResponse = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; +type ReposUploadReleaseAssetResponseValue = { + browser_download_url: string; + content_type: string; created_at: string; - default_branch: string; - deployments_url: string; - description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; - html_url: string; + download_count: number; id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - merges_url: string; - milestones_url: string; - mirror_url: string; + label: string; name: string; - network_count: number; node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposTransferResponseOwner; - permissions: ReposTransferResponsePermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; + state: string; updated_at: string; - url: string; - watchers_count: number; -}; -type ReposRetrieveCommunityProfileMetricsResponseFilesReadme = { - html_url: string; - url: string; -}; -type ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate = { - html_url: string; - url: string; -}; -type ReposRetrieveCommunityProfileMetricsResponseFilesLicense = { - html_url: string; - key: string; - name: string; - spdx_id: string; - url: string; -}; -type ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate = { - html_url: string; - url: string; -}; -type ReposRetrieveCommunityProfileMetricsResponseFilesContributing = { - html_url: string; - url: string; -}; -type ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct = { - html_url: string; - key: string; - name: string; + uploader: ReposUploadReleaseAssetResponseValueUploader; url: string; }; -type ReposRetrieveCommunityProfileMetricsResponseFiles = { - code_of_conduct: ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct; - contributing: ReposRetrieveCommunityProfileMetricsResponseFilesContributing; - issue_template: ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate; - license: ReposRetrieveCommunityProfileMetricsResponseFilesLicense; - pull_request_template: ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate; - readme: ReposRetrieveCommunityProfileMetricsResponseFilesReadme; -}; -type ReposRetrieveCommunityProfileMetricsResponse = { - description: string; - documentation: boolean; - files: ReposRetrieveCommunityProfileMetricsResponseFiles; - health_percentage: number; - updated_at: string; +type ReposUploadReleaseAssetResponse = { + value: ReposUploadReleaseAssetResponseValue; }; -type ReposRequestPageBuildResponse = { status: string; url: string }; -type ReposReplaceTopicsResponse = { names: Array }; -type ReposReplaceProtectedBranchUserRestrictionsResponseItem = { +type ReposUpdateReleaseAssetResponseUploader = { avatar_url: string; events_url: string; followers_url: string; @@ -3016,55 +3772,22 @@ type ReposReplaceProtectedBranchUserRestrictionsResponseItem = { type: string; url: string; }; -type ReposReplaceProtectedBranchTeamRestrictionsResponseItem = { - description: string; - html_url: string; - id: number; - members_url: string; - name: string; - node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; - url: string; -}; -type ReposReplaceProtectedBranchAppRestrictionsResponseItemPermissions = { - contents: string; - issues: string; - metadata: string; - single_file: string; -}; -type ReposReplaceProtectedBranchAppRestrictionsResponseItemOwner = { - avatar_url: string; - description: string; - events_url: string; - hooks_url: string; - id: number; - issues_url: string; - login: string; - members_url: string; - node_id: string; - public_members_url: string; - repos_url: string; - url: string; -}; -type ReposReplaceProtectedBranchAppRestrictionsResponseItem = { +type ReposUpdateReleaseAssetResponse = { + browser_download_url: string; + content_type: string; created_at: string; - description: string; - events: Array; - external_url: string; - html_url: string; + download_count: number; id: number; + label: string; name: string; node_id: string; - owner: ReposReplaceProtectedBranchAppRestrictionsResponseItemOwner; - permissions: ReposReplaceProtectedBranchAppRestrictionsResponseItemPermissions; - slug: string; + size: number; + state: string; updated_at: string; + uploader: ReposUpdateReleaseAssetResponseUploader; + url: string; }; -type ReposRemoveProtectedBranchUserRestrictionsResponseItem = { +type ReposUpdateReleaseResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -3084,56 +3807,7 @@ type ReposRemoveProtectedBranchUserRestrictionsResponseItem = { type: string; url: string; }; -type ReposRemoveProtectedBranchTeamRestrictionsResponseItem = { - description: string; - html_url: string; - id: number; - members_url: string; - name: string; - node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; - url: string; -}; -type ReposRemoveProtectedBranchAppRestrictionsResponseItemPermissions = { - contents: string; - issues: string; - metadata: string; - single_file: string; -}; -type ReposRemoveProtectedBranchAppRestrictionsResponseItemOwner = { - avatar_url: string; - description: string; - events_url: string; - hooks_url: string; - id: number; - issues_url: string; - login: string; - members_url: string; - node_id: string; - public_members_url: string; - repos_url: string; - url: string; -}; -type ReposRemoveProtectedBranchAppRestrictionsResponseItem = { - created_at: string; - description: string; - events: Array; - external_url: string; - html_url: string; - id: number; - name: string; - node_id: string; - owner: ReposRemoveProtectedBranchAppRestrictionsResponseItemOwner; - permissions: ReposRemoveProtectedBranchAppRestrictionsResponseItemPermissions; - slug: string; - updated_at: string; -}; -type ReposMergeResponseParentsItem = { sha: string; url: string }; -type ReposMergeResponseCommitter = { +type ReposUpdateReleaseResponseAssetsItemUploader = { avatar_url: string; events_url: string; followers_url: string; @@ -3153,33 +3827,48 @@ type ReposMergeResponseCommitter = { type: string; url: string; }; -type ReposMergeResponseCommitVerification = { - payload: null; - reason: string; - signature: null; - verified: boolean; -}; -type ReposMergeResponseCommitTree = { sha: string; url: string }; -type ReposMergeResponseCommitCommitter = { - date: string; - email: string; +type ReposUpdateReleaseResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposUpdateReleaseResponseAssetsItemUploader; + url: string; }; -type ReposMergeResponseCommitAuthor = { - date: string; - email: string; +type ReposUpdateReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposUpdateReleaseResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; }; -type ReposMergeResponseCommit = { - author: ReposMergeResponseCommitAuthor; - comment_count: number; - committer: ReposMergeResponseCommitCommitter; - message: string; - tree: ReposMergeResponseCommitTree; +type ReposUpdateProtectedBranchRequiredStatusChecksResponse = { + contexts: Array; + contexts_url: string; + strict: boolean; url: string; - verification: ReposMergeResponseCommitVerification; }; -type ReposMergeResponseAuthor = { +type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem = { avatar_url: string; events_url: string; followers_url: string; @@ -3199,18 +3888,39 @@ type ReposMergeResponseAuthor = { type: string; url: string; }; -type ReposMergeResponse = { - author: ReposMergeResponseAuthor; - comments_url: string; - commit: ReposMergeResponseCommit; - committer: ReposMergeResponseCommitter; +type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem = { + description: string; html_url: string; + id: number; + members_url: string; + name: string; node_id: string; - parents: Array; - sha: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; url: string; }; -type ReposListUsersWithAccessToProtectedBranchResponseItem = { +type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions = { + teams: Array< + ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem + >; + users_url: string; +}; +type ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposUpdateProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; +}; +type ReposUpdateInvitationResponseRepositoryOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -3230,43 +3940,56 @@ type ReposListUsersWithAccessToProtectedBranchResponseItem = { type: string; url: string; }; -type ReposListTopicsResponse = { names: Array }; -type ReposListTeamsWithAccessToProtectedBranchResponseItem = { - description: string; - html_url: string; - id: number; - members_url: string; - name: string; - node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; - url: string; -}; -type ReposListTeamsResponseItem = { +type ReposUpdateInvitationResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; html_url: string; id: number; - members_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; name: string; node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; + notifications_url: string; + owner: ReposUpdateInvitationResponseRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; url: string; }; -type ReposListTagsResponseItemCommit = { sha: string; url: string }; -type ReposListTagsResponseItem = { - commit: ReposListTagsResponseItemCommit; - name: string; - tarball_url: string; - zipball_url: string; -}; -type ReposListStatusesForRefResponseItemCreator = { +type ReposUpdateInvitationResponseInviter = { avatar_url: string; events_url: string; followers_url: string; @@ -3286,20 +4009,7 @@ type ReposListStatusesForRefResponseItemCreator = { type: string; url: string; }; -type ReposListStatusesForRefResponseItem = { - avatar_url: string; - context: string; - created_at: string; - creator: ReposListStatusesForRefResponseItemCreator; - description: string; - id: number; - node_id: string; - state: string; - target_url: string; - updated_at: string; - url: string; -}; -type ReposListReleasesResponseItemAuthor = { +type ReposUpdateInvitationResponseInvitee = { avatar_url: string; events_url: string; followers_url: string; @@ -3319,62 +4029,96 @@ type ReposListReleasesResponseItemAuthor = { type: string; url: string; }; -type ReposListReleasesResponseItemAssetsItemUploader = { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; +type ReposUpdateInvitationResponse = { + created_at: string; html_url: string; id: number; - login: string; - node_id: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; + invitee: ReposUpdateInvitationResponseInvitee; + inviter: ReposUpdateInvitationResponseInviter; + permissions: string; + repository: ReposUpdateInvitationResponseRepository; url: string; }; -type ReposListReleasesResponseItemAssetsItem = { - browser_download_url: string; +type ReposUpdateHookResponseLastResponse = { + code: null; + message: null; + status: string; +}; +type ReposUpdateHookResponseConfig = { content_type: string; + insecure_ssl: string; + url: string; +}; +type ReposUpdateHookResponse = { + active: boolean; + config: ReposUpdateHookResponseConfig; created_at: string; - download_count: number; + events: Array; id: number; - label: string; + last_response: ReposUpdateHookResponseLastResponse; name: string; - node_id: string; - size: number; - state: string; + ping_url: string; + test_url: string; + type: string; updated_at: string; - uploader: ReposListReleasesResponseItemAssetsItemUploader; url: string; }; -type ReposListReleasesResponseItem = { - assets: Array; - assets_url: string; - author: ReposListReleasesResponseItemAuthor; - body: string; - created_at: string; - draft: boolean; +type ReposUpdateFileResponseContentLinks = { + git: string; + html: string; + self: string; +}; +type ReposUpdateFileResponseContent = { + _links: ReposUpdateFileResponseContentLinks; + download_url: string; + git_url: string; html_url: string; - id: number; name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; +}; +type ReposUpdateFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; +}; +type ReposUpdateFileResponseCommitTree = { sha: string; url: string }; +type ReposUpdateFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; +}; +type ReposUpdateFileResponseCommitCommitter = { + date: string; + email: string; + name: string; +}; +type ReposUpdateFileResponseCommitAuthor = { + date: string; + email: string; + name: string; +}; +type ReposUpdateFileResponseCommit = { + author: ReposUpdateFileResponseCommitAuthor; + committer: ReposUpdateFileResponseCommitCommitter; + html_url: string; + message: string; node_id: string; - prerelease: boolean; - published_at: string; - tag_name: string; - tarball_url: string; - target_commitish: string; - upload_url: string; + parents: Array; + sha: string; + tree: ReposUpdateFileResponseCommitTree; url: string; - zipball_url: string; + verification: ReposUpdateFileResponseCommitVerification; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemUser = { +type ReposUpdateFileResponse = { + commit: ReposUpdateFileResponseCommit; + content: ReposUpdateFileResponseContent; +}; +type ReposUpdateCommitCommentResponseUser = { avatar_url: string; events_url: string; followers_url: string; @@ -3394,21 +4138,21 @@ type ReposListPullRequestsAssociatedWithCommitResponseItemUser = { type: string; url: string; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem = { - description: string; +type ReposUpdateCommitCommentResponse = { + body: string; + commit_id: string; + created_at: string; html_url: string; id: number; - members_url: string; - name: string; + line: number; node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; + path: string; + position: number; + updated_at: string; url: string; + user: ReposUpdateCommitCommentResponseUser; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem = { +type ReposUpdateBranchProtectionResponseRestrictionsUsersItem = { avatar_url: string; events_url: string; followers_url: string; @@ -3428,54 +4172,70 @@ type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem type: string; url: string; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator = { +type ReposUpdateBranchProtectionResponseRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; +}; +type ReposUpdateBranchProtectionResponseRestrictionsAppsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; +}; +type ReposUpdateBranchProtectionResponseRestrictionsAppsItemOwner = { avatar_url: string; + description: string; events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; + hooks_url: string; id: number; + issues_url: string; login: string; + members_url: string; node_id: string; - organizations_url: string; - received_events_url: string; + public_members_url: string; repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; url: string; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemMilestone = { - closed_at: string; - closed_issues: number; +type ReposUpdateBranchProtectionResponseRestrictionsAppsItem = { created_at: string; - creator: ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator; description: string; - due_on: string; + events: Array; + external_url: string; html_url: string; id: number; - labels_url: string; + name: string; node_id: string; - number: number; - open_issues: number; - state: string; - title: string; + owner: ReposUpdateBranchProtectionResponseRestrictionsAppsItemOwner; + permissions: ReposUpdateBranchProtectionResponseRestrictionsAppsItemPermissions; + slug: string; updated_at: string; +}; +type ReposUpdateBranchProtectionResponseRestrictions = { + apps: Array; + apps_url: string; + teams: Array; + teams_url: string; url: string; + users: Array; + users_url: string; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem = { - color: string; - default: boolean; - description: string; - id: number; - name: string; - node_id: string; +type ReposUpdateBranchProtectionResponseRequiredStatusChecks = { + contexts: Array; + contexts_url: string; + strict: boolean; url: string; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser = { +type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { avatar_url: string; events_url: string; followers_url: string; @@ -3495,12 +4255,65 @@ type ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser = { type: string; url: string; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions = { +type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; +}; +type ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { + teams: Array< + ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem + >; + users_url: string; +}; +type ReposUpdateBranchProtectionResponseRequiredPullRequestReviews = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposUpdateBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; +}; +type ReposUpdateBranchProtectionResponseRequiredLinearHistory = { + enabled: boolean; +}; +type ReposUpdateBranchProtectionResponseEnforceAdmins = { + enabled: boolean; + url: string; +}; +type ReposUpdateBranchProtectionResponseAllowForcePushes = { + enabled: boolean; +}; +type ReposUpdateBranchProtectionResponseAllowDeletions = { enabled: boolean }; +type ReposUpdateBranchProtectionResponse = { + allow_deletions: ReposUpdateBranchProtectionResponseAllowDeletions; + allow_force_pushes: ReposUpdateBranchProtectionResponseAllowForcePushes; + enforce_admins: ReposUpdateBranchProtectionResponseEnforceAdmins; + required_linear_history: ReposUpdateBranchProtectionResponseRequiredLinearHistory; + required_pull_request_reviews: ReposUpdateBranchProtectionResponseRequiredPullRequestReviews; + required_status_checks: ReposUpdateBranchProtectionResponseRequiredStatusChecks; + restrictions: ReposUpdateBranchProtectionResponseRestrictions; + url: string; +}; +type ReposUpdateResponseSourcePermissions = { admin: boolean; pull: boolean; push: boolean; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner = { +type ReposUpdateResponseSourceOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -3520,7 +4333,7 @@ type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner = { type: string; url: string; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo = { +type ReposUpdateResponseSource = { allow_merge_commit: boolean; allow_rebase_merge: boolean; allow_squash_merge: boolean; @@ -3576,8 +4389,8 @@ type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo = { node_id: string; notifications_url: string; open_issues_count: number; - owner: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner; - permissions: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions; + owner: ReposUpdateResponseSourceOwner; + permissions: ReposUpdateResponseSourcePermissions; private: boolean; pulls_url: string; pushed_at: string; @@ -3593,46 +4406,26 @@ type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemHead = { - label: string; - ref: string; - repo: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo; - sha: string; - user: ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser = { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; - id: number; - login: string; - node_id: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; +type ReposUpdateResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions = { +type ReposUpdateResponseParentPermissions = { admin: boolean; pull: boolean; push: boolean; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner = { +type ReposUpdateResponseParentOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -3652,7 +4445,7 @@ type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner = { type: string; url: string; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo = { +type ReposUpdateResponseParent = { allow_merge_commit: boolean; allow_rebase_merge: boolean; allow_squash_merge: boolean; @@ -3708,8 +4501,8 @@ type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo = { node_id: string; notifications_url: string; open_issues_count: number; - owner: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner; - permissions: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions; + owner: ReposUpdateResponseParentOwner; + permissions: ReposUpdateResponseParentPermissions; private: boolean; pulls_url: string; pushed_at: string; @@ -3725,41 +4518,16 @@ type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemBase = { - label: string; - ref: string; - repo: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo; - sha: string; - user: ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem = { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; - id: number; - login: string; - node_id: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemAssignee = { +type ReposUpdateResponseOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -3779,86 +4547,7 @@ type ReposListPullRequestsAssociatedWithCommitResponseItemAssignee = { type: string; url: string; }; -type ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses = { - href: string; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf = { - href: string; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments = { - href: string; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment = { - href: string; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue = { - href: string; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml = { - href: string; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits = { - href: string; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments = { - href: string; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItemLinks = { - comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments; - commits: ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits; - html: ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml; - issue: ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue; - review_comment: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment; - review_comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments; - self: ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf; - statuses: ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses; -}; -type ReposListPullRequestsAssociatedWithCommitResponseItem = { - _links: ReposListPullRequestsAssociatedWithCommitResponseItemLinks; - active_lock_reason: string; - assignee: ReposListPullRequestsAssociatedWithCommitResponseItemAssignee; - assignees: Array< - ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem - >; - author_association: string; - base: ReposListPullRequestsAssociatedWithCommitResponseItemBase; - body: string; - closed_at: string; - comments_url: string; - commits_url: string; - created_at: string; - diff_url: string; - draft: boolean; - head: ReposListPullRequestsAssociatedWithCommitResponseItemHead; - html_url: string; - id: number; - issue_url: string; - labels: Array< - ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem - >; - locked: boolean; - merge_commit_sha: string; - merged_at: string; - milestone: ReposListPullRequestsAssociatedWithCommitResponseItemMilestone; - node_id: string; - number: number; - patch_url: string; - requested_reviewers: Array< - ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem - >; - requested_teams: Array< - ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem - >; - review_comment_url: string; - review_comments_url: string; - state: string; - statuses_url: string; - title: string; - updated_at: string; - url: string; - user: ReposListPullRequestsAssociatedWithCommitResponseItemUser; -}; -type ReposListPublicResponseItemOwner = { +type ReposUpdateResponseOrganization = { avatar_url: string; events_url: string; followers_url: string; @@ -3878,122 +4567,97 @@ type ReposListPublicResponseItemOwner = { type: string; url: string; }; -type ReposListPublicResponseItem = { +type ReposUpdateResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; archive_url: string; + archived: boolean; assignees_url: string; blobs_url: string; branches_url: string; + clone_url: string; collaborators_url: string; comments_url: string; commits_url: string; compare_url: string; contents_url: string; contributors_url: string; + created_at: string; + default_branch: string; deployments_url: string; description: string; + disabled: boolean; downloads_url: string; events_url: string; fork: boolean; + forks_count: number; forks_url: string; full_name: string; git_commits_url: string; git_refs_url: string; git_tags_url: string; git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; html_url: string; id: number; + is_template: boolean; issue_comment_url: string; issue_events_url: string; issues_url: string; keys_url: string; labels_url: string; + language: null; languages_url: string; merges_url: string; milestones_url: string; + mirror_url: string; name: string; + network_count: number; node_id: string; notifications_url: string; - owner: ReposListPublicResponseItemOwner; + open_issues_count: number; + organization: ReposUpdateResponseOrganization; + owner: ReposUpdateResponseOwner; + parent: ReposUpdateResponseParent; + permissions: ReposUpdateResponsePermissions; private: boolean; pulls_url: string; + pushed_at: string; releases_url: string; + size: number; + source: ReposUpdateResponseSource; ssh_url: string; + stargazers_count: number; stargazers_url: string; statuses_url: string; + subscribers_count: number; subscribers_url: string; subscription_url: string; + svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; trees_url: string; - url: string; -}; -type ReposListProtectedBranchUserRestrictionsResponseItem = { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; - id: number; - login: string; - node_id: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; -}; -type ReposListProtectedBranchTeamRestrictionsResponseItem = { - description: string; - html_url: string; - id: number; - members_url: string; - name: string; - node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; - url: string; -}; -type ReposListPagesBuildsResponseItemPusher = { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; - id: number; - login: string; - node_id: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; -}; -type ReposListPagesBuildsResponseItemError = { message: null }; -type ReposListPagesBuildsResponseItem = { - commit: string; - created_at: string; - duration: number; - error: ReposListPagesBuildsResponseItemError; - pusher: ReposListPagesBuildsResponseItemPusher; - status: string; updated_at: string; url: string; + visibility: string; + watchers_count: number; }; -type ReposListLanguagesResponse = { C: number; Python: number }; -type ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner = { +type ReposTransferResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type ReposTransferResponseOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -4013,56 +4677,135 @@ type ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner = { type: string; url: string; }; -type ReposListInvitationsForAuthenticatedUserResponseItemRepository = { +type ReposTransferResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; archive_url: string; + archived: boolean; assignees_url: string; blobs_url: string; branches_url: string; + clone_url: string; collaborators_url: string; comments_url: string; commits_url: string; compare_url: string; contents_url: string; contributors_url: string; + created_at: string; + default_branch: string; deployments_url: string; description: string; + disabled: boolean; downloads_url: string; events_url: string; fork: boolean; + forks_count: number; forks_url: string; full_name: string; git_commits_url: string; git_refs_url: string; git_tags_url: string; git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; html_url: string; id: number; + is_template: boolean; issue_comment_url: string; issue_events_url: string; issues_url: string; keys_url: string; labels_url: string; + language: null; languages_url: string; merges_url: string; milestones_url: string; + mirror_url: string; name: string; + network_count: number; node_id: string; notifications_url: string; - owner: ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner; + open_issues_count: number; + owner: ReposTransferResponseOwner; + permissions: ReposTransferResponsePermissions; private: boolean; pulls_url: string; + pushed_at: string; releases_url: string; + size: number; ssh_url: string; + stargazers_count: number; stargazers_url: string; statuses_url: string; + subscribers_count: number; subscribers_url: string; subscription_url: string; + svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; trees_url: string; + updated_at: string; url: string; + visibility: string; + watchers_count: number; }; -type ReposListInvitationsForAuthenticatedUserResponseItemInviter = { +type ReposRetrieveCommunityProfileMetricsResponseFilesReadme = { + html_url: string; + url: string; +}; +type ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate = { + html_url: string; + url: string; +}; +type ReposRetrieveCommunityProfileMetricsResponseFilesLicense = { + html_url: string; + key: string; + name: string; + spdx_id: string; + url: string; +}; +type ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate = { + html_url: string; + url: string; +}; +type ReposRetrieveCommunityProfileMetricsResponseFilesContributing = { + html_url: string; + url: string; +}; +type ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct = { + html_url: string; + key: string; + name: string; + url: string; +}; +type ReposRetrieveCommunityProfileMetricsResponseFiles = { + code_of_conduct: ReposRetrieveCommunityProfileMetricsResponseFilesCodeOfConduct; + contributing: ReposRetrieveCommunityProfileMetricsResponseFilesContributing; + issue_template: ReposRetrieveCommunityProfileMetricsResponseFilesIssueTemplate; + license: ReposRetrieveCommunityProfileMetricsResponseFilesLicense; + pull_request_template: ReposRetrieveCommunityProfileMetricsResponseFilesPullRequestTemplate; + readme: ReposRetrieveCommunityProfileMetricsResponseFilesReadme; +}; +type ReposRetrieveCommunityProfileMetricsResponse = { + description: string; + documentation: boolean; + files: ReposRetrieveCommunityProfileMetricsResponseFiles; + health_percentage: number; + updated_at: string; +}; +type ReposRequestPageBuildResponse = { status: string; url: string }; +type ReposReplaceTopicsResponse = { names: Array }; +type ReposReplaceProtectedBranchUserRestrictionsResponseItem = { avatar_url: string; events_url: string; followers_url: string; @@ -4082,37 +4825,55 @@ type ReposListInvitationsForAuthenticatedUserResponseItemInviter = { type: string; url: string; }; -type ReposListInvitationsForAuthenticatedUserResponseItemInvitee = { +type ReposReplaceProtectedBranchTeamRestrictionsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; +}; +type ReposReplaceProtectedBranchAppRestrictionsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; +}; +type ReposReplaceProtectedBranchAppRestrictionsResponseItemOwner = { avatar_url: string; + description: string; events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; + hooks_url: string; id: number; + issues_url: string; login: string; + members_url: string; node_id: string; - organizations_url: string; - received_events_url: string; + public_members_url: string; repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; url: string; }; -type ReposListInvitationsForAuthenticatedUserResponseItem = { +type ReposReplaceProtectedBranchAppRestrictionsResponseItem = { created_at: string; + description: string; + events: Array; + external_url: string; html_url: string; id: number; - invitee: ReposListInvitationsForAuthenticatedUserResponseItemInvitee; - inviter: ReposListInvitationsForAuthenticatedUserResponseItemInviter; - permissions: string; - repository: ReposListInvitationsForAuthenticatedUserResponseItemRepository; - url: string; + name: string; + node_id: string; + owner: ReposReplaceProtectedBranchAppRestrictionsResponseItemOwner; + permissions: ReposReplaceProtectedBranchAppRestrictionsResponseItemPermissions; + slug: string; + updated_at: string; }; -type ReposListInvitationsResponseItemRepositoryOwner = { +type ReposRemoveProtectedBranchUserRestrictionsResponseItem = { avatar_url: string; events_url: string; followers_url: string; @@ -4132,56 +4893,56 @@ type ReposListInvitationsResponseItemRepositoryOwner = { type: string; url: string; }; -type ReposListInvitationsResponseItemRepository = { - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; +type ReposRemoveProtectedBranchTeamRestrictionsResponseItem = { description: string; - downloads_url: string; - events_url: string; - fork: boolean; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; html_url: string; id: number; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; + members_url: string; name: string; node_id: string; - notifications_url: string; - owner: ReposListInvitationsResponseItemRepositoryOwner; - private: boolean; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; url: string; }; -type ReposListInvitationsResponseItemInviter = { +type ReposRemoveProtectedBranchAppRestrictionsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; +}; +type ReposRemoveProtectedBranchAppRestrictionsResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; +}; +type ReposRemoveProtectedBranchAppRestrictionsResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposRemoveProtectedBranchAppRestrictionsResponseItemOwner; + permissions: ReposRemoveProtectedBranchAppRestrictionsResponseItemPermissions; + slug: string; + updated_at: string; +}; +type ReposMergeResponseParentsItem = { sha: string; url: string }; +type ReposMergeResponseCommitter = { avatar_url: string; events_url: string; followers_url: string; @@ -4201,7 +4962,33 @@ type ReposListInvitationsResponseItemInviter = { type: string; url: string; }; -type ReposListInvitationsResponseItemInvitee = { +type ReposMergeResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; +}; +type ReposMergeResponseCommitTree = { sha: string; url: string }; +type ReposMergeResponseCommitCommitter = { + date: string; + email: string; + name: string; +}; +type ReposMergeResponseCommitAuthor = { + date: string; + email: string; + name: string; +}; +type ReposMergeResponseCommit = { + author: ReposMergeResponseCommitAuthor; + comment_count: number; + committer: ReposMergeResponseCommitCommitter; + message: string; + tree: ReposMergeResponseCommitTree; + url: string; + verification: ReposMergeResponseCommitVerification; +}; +type ReposMergeResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -4221,46 +5008,18 @@ type ReposListInvitationsResponseItemInvitee = { type: string; url: string; }; -type ReposListInvitationsResponseItem = { - created_at: string; +type ReposMergeResponse = { + author: ReposMergeResponseAuthor; + comments_url: string; + commit: ReposMergeResponseCommit; + committer: ReposMergeResponseCommitter; html_url: string; - id: number; - invitee: ReposListInvitationsResponseItemInvitee; - inviter: ReposListInvitationsResponseItemInviter; - permissions: string; - repository: ReposListInvitationsResponseItemRepository; - url: string; -}; -type ReposListHooksResponseItemLastResponse = { - code: null; - message: null; - status: string; -}; -type ReposListHooksResponseItemConfig = { - content_type: string; - insecure_ssl: string; - url: string; -}; -type ReposListHooksResponseItem = { - active: boolean; - config: ReposListHooksResponseItemConfig; - created_at: string; - events: Array; - id: number; - last_response: ReposListHooksResponseItemLastResponse; - name: string; - ping_url: string; - test_url: string; - type: string; - updated_at: string; + node_id: string; + parents: Array; + sha: string; url: string; }; -type ReposListForksResponseItemPermissions = { - admin: boolean; - pull: boolean; - push: boolean; -}; -type ReposListForksResponseItemOwner = { +type ReposListUsersWithAccessToProtectedBranchResponseItem = { avatar_url: string; events_url: string; followers_url: string; @@ -4280,97 +5039,43 @@ type ReposListForksResponseItemOwner = { type: string; url: string; }; -type ReposListForksResponseItemLicense = { - key: string; +type ReposListTopicsResponse = { names: Array }; +type ReposListTeamsWithAccessToProtectedBranchResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; name: string; node_id: string; - spdx_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; url: string; }; -type ReposListForksResponseItem = { - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - created_at: string; - default_branch: string; - deployments_url: string; +type ReposListTeamsResponseItem = { description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; html_url: string; id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - license: ReposListForksResponseItemLicense; - merges_url: string; - milestones_url: string; - mirror_url: string; + members_url: string; name: string; - network_count: number; node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposListForksResponseItemOwner; - permissions: ReposListForksResponseItemPermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; - updated_at: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; url: string; - watchers_count: number; }; -type ReposListForOrgResponseItemPermissions = { - admin: boolean; - pull: boolean; - push: boolean; +type ReposListTagsResponseItemCommit = { sha: string; url: string }; +type ReposListTagsResponseItem = { + commit: ReposListTagsResponseItemCommit; + name: string; + tarball_url: string; + zipball_url: string; }; -type ReposListForOrgResponseItemOwner = { +type ReposListStatusesForRefResponseItemCreator = { avatar_url: string; events_url: string; followers_url: string; @@ -4390,103 +5095,20 @@ type ReposListForOrgResponseItemOwner = { type: string; url: string; }; -type ReposListForOrgResponseItemLicense = { - key: string; - name: string; - node_id: string; - spdx_id: string; - url: string; -}; -type ReposListForOrgResponseItem = { - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; +type ReposListStatusesForRefResponseItem = { + avatar_url: string; + context: string; created_at: string; - default_branch: string; - deployments_url: string; + creator: ReposListStatusesForRefResponseItemCreator; description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; - html_url: string; id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - license: ReposListForOrgResponseItemLicense; - merges_url: string; - milestones_url: string; - mirror_url: string; - name: string; - network_count: number; node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposListForOrgResponseItemOwner; - permissions: ReposListForOrgResponseItemPermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; + state: string; + target_url: string; updated_at: string; url: string; - watchers_count: number; -}; -type ReposListDownloadsResponseItem = { - content_type: string; - description: string; - download_count: number; - html_url: string; - id: number; - name: string; - size: number; - url: string; }; -type ReposListDeploymentsResponseItemPayload = { deploy: string }; -type ReposListDeploymentsResponseItemCreator = { +type ReposListReleasesResponseItemAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -4506,26 +5128,7 @@ type ReposListDeploymentsResponseItemCreator = { type: string; url: string; }; -type ReposListDeploymentsResponseItem = { - created_at: string; - creator: ReposListDeploymentsResponseItemCreator; - description: string; - environment: string; - id: number; - node_id: string; - original_environment: string; - payload: ReposListDeploymentsResponseItemPayload; - production_environment: boolean; - ref: string; - repository_url: string; - sha: string; - statuses_url: string; - task: string; - transient_environment: boolean; - updated_at: string; - url: string; -}; -type ReposListDeploymentStatusesResponseItemCreator = { +type ReposListReleasesResponseItemAssetsItemUploader = { avatar_url: string; events_url: string; followers_url: string; @@ -4545,34 +5148,43 @@ type ReposListDeploymentStatusesResponseItemCreator = { type: string; url: string; }; -type ReposListDeploymentStatusesResponseItem = { +type ReposListReleasesResponseItemAssetsItem = { + browser_download_url: string; + content_type: string; created_at: string; - creator: ReposListDeploymentStatusesResponseItemCreator; - deployment_url: string; - description: string; - environment: string; - environment_url: string; + download_count: number; id: number; - log_url: string; + label: string; + name: string; node_id: string; - repository_url: string; + size: number; state: string; - target_url: string; updated_at: string; + uploader: ReposListReleasesResponseItemAssetsItemUploader; url: string; }; -type ReposListDeployKeysResponseItem = { +type ReposListReleasesResponseItem = { + assets: Array; + assets_url: string; + author: ReposListReleasesResponseItemAuthor; + body: string; created_at: string; + draft: boolean; + html_url: string; id: number; - key: string; - read_only: boolean; - title: string; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; url: string; - verified: boolean; + zipball_url: string; }; -type ReposListContributorsResponseItem = { +type ReposListPullRequestsAssociatedWithCommitResponseItemUser = { avatar_url: string; - contributions: number; events_url: string; followers_url: string; following_url: string; @@ -4591,8 +5203,21 @@ type ReposListContributorsResponseItem = { type: string; url: string; }; -type ReposListCommitsResponseItemParentsItem = { sha: string; url: string }; -type ReposListCommitsResponseItemCommitter = { +type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; +}; +type ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem = { avatar_url: string; events_url: string; followers_url: string; @@ -4612,33 +5237,7 @@ type ReposListCommitsResponseItemCommitter = { type: string; url: string; }; -type ReposListCommitsResponseItemCommitVerification = { - payload: null; - reason: string; - signature: null; - verified: boolean; -}; -type ReposListCommitsResponseItemCommitTree = { sha: string; url: string }; -type ReposListCommitsResponseItemCommitCommitter = { - date: string; - email: string; - name: string; -}; -type ReposListCommitsResponseItemCommitAuthor = { - date: string; - email: string; - name: string; -}; -type ReposListCommitsResponseItemCommit = { - author: ReposListCommitsResponseItemCommitAuthor; - comment_count: number; - committer: ReposListCommitsResponseItemCommitCommitter; - message: string; - tree: ReposListCommitsResponseItemCommitTree; - url: string; - verification: ReposListCommitsResponseItemCommitVerification; -}; -type ReposListCommitsResponseItemAuthor = { +type ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator = { avatar_url: string; events_url: string; followers_url: string; @@ -4658,18 +5257,34 @@ type ReposListCommitsResponseItemAuthor = { type: string; url: string; }; -type ReposListCommitsResponseItem = { - author: ReposListCommitsResponseItemAuthor; - comments_url: string; - commit: ReposListCommitsResponseItemCommit; - committer: ReposListCommitsResponseItemCommitter; +type ReposListPullRequestsAssociatedWithCommitResponseItemMilestone = { + closed_at: string; + closed_issues: number; + created_at: string; + creator: ReposListPullRequestsAssociatedWithCommitResponseItemMilestoneCreator; + description: string; + due_on: string; html_url: string; + id: number; + labels_url: string; node_id: string; - parents: Array; - sha: string; + number: number; + open_issues: number; + state: string; + title: string; + updated_at: string; url: string; }; -type ReposListCommitCommentsResponseItemUser = { +type ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem = { + color: string; + default: boolean; + description: string; + id: number; + name: string; + node_id: string; + url: string; +}; +type ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser = { avatar_url: string; events_url: string; followers_url: string; @@ -4689,21 +5304,12 @@ type ReposListCommitCommentsResponseItemUser = { type: string; url: string; }; -type ReposListCommitCommentsResponseItem = { - body: string; - commit_id: string; - created_at: string; - html_url: string; - id: number; - line: number; - node_id: string; - path: string; - position: number; - updated_at: string; - url: string; - user: ReposListCommitCommentsResponseItemUser; +type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; }; -type ReposListCommentsForCommitResponseItemUser = { +type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -4723,26 +5329,96 @@ type ReposListCommentsForCommitResponseItemUser = { type: string; url: string; }; -type ReposListCommentsForCommitResponseItem = { - body: string; - commit_id: string; +type ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; html_url: string; id: number; - line: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; node_id: string; - path: string; - position: number; + notifications_url: string; + open_issues_count: number; + owner: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoOwner; + permissions: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; updated_at: string; url: string; - user: ReposListCommentsForCommitResponseItemUser; + visibility: string; + watchers_count: number; }; -type ReposListCollaboratorsResponseItemPermissions = { - admin: boolean; - pull: boolean; - push: boolean; +type ReposListPullRequestsAssociatedWithCommitResponseItemHead = { + label: string; + ref: string; + repo: ReposListPullRequestsAssociatedWithCommitResponseItemHeadRepo; + sha: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemHeadUser; }; -type ReposListCollaboratorsResponseItem = { +type ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser = { avatar_url: string; events_url: string; followers_url: string; @@ -4754,7 +5430,6 @@ type ReposListCollaboratorsResponseItem = { login: string; node_id: string; organizations_url: string; - permissions: ReposListCollaboratorsResponseItemPermissions; received_events_url: string; repos_url: string; site_admin: boolean; @@ -4763,32 +5438,12 @@ type ReposListCollaboratorsResponseItem = { type: string; url: string; }; -type ReposListBranchesForHeadCommitResponseItemCommit = { - sha: string; - url: string; -}; -type ReposListBranchesForHeadCommitResponseItem = { - commit: ReposListBranchesForHeadCommitResponseItemCommit; - name: string; - protected: string; -}; -type ReposListBranchesResponseItemProtectionRequiredStatusChecks = { - contexts: Array; - enforcement_level: string; -}; -type ReposListBranchesResponseItemProtection = { - enabled: boolean; - required_status_checks: ReposListBranchesResponseItemProtectionRequiredStatusChecks; -}; -type ReposListBranchesResponseItemCommit = { sha: string; url: string }; -type ReposListBranchesResponseItem = { - commit: ReposListBranchesResponseItemCommit; - name: string; - protected: boolean; - protection: ReposListBranchesResponseItemProtection; - protection_url: string; +type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions = { + admin: boolean; + pull: boolean; + push: boolean; }; -type ReposListAssetsForReleaseResponseItemUploader = { +type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -4808,66 +5463,116 @@ type ReposListAssetsForReleaseResponseItemUploader = { type: string; url: string; }; -type ReposListAssetsForReleaseResponseItem = { - browser_download_url: string; - content_type: string; +type ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; created_at: string; - download_count: number; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; id: number; - label: string; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; name: string; + network_count: number; node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoOwner; + permissions: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepoPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; size: number; - state: string; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; updated_at: string; - uploader: ReposListAssetsForReleaseResponseItemUploader; url: string; + visibility: string; + watchers_count: number; }; -type ReposListAppsWithAccessToProtectedBranchResponseItemPermissions = { - contents: string; - issues: string; - metadata: string; - single_file: string; +type ReposListPullRequestsAssociatedWithCommitResponseItemBase = { + label: string; + ref: string; + repo: ReposListPullRequestsAssociatedWithCommitResponseItemBaseRepo; + sha: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemBaseUser; }; -type ReposListAppsWithAccessToProtectedBranchResponseItemOwner = { +type ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem = { avatar_url: string; - description: string; events_url: string; - hooks_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; id: number; - issues_url: string; login: string; - members_url: string; node_id: string; - public_members_url: string; + organizations_url: string; + received_events_url: string; repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; url: string; }; -type ReposListAppsWithAccessToProtectedBranchResponseItem = { - created_at: string; - description: string; - events: Array; - external_url: string; - html_url: string; - id: number; - name: string; - node_id: string; - owner: ReposListAppsWithAccessToProtectedBranchResponseItemOwner; - permissions: ReposListAppsWithAccessToProtectedBranchResponseItemPermissions; - slug: string; - updated_at: string; -}; -type ReposGetViewsResponseViewsItem = { - count: number; - timestamp: string; - uniques: number; -}; -type ReposGetViewsResponse = { - count: number; - uniques: number; - views: Array; -}; -type ReposGetUsersWithAccessToProtectedBranchResponseItem = { +type ReposListPullRequestsAssociatedWithCommitResponseItemAssignee = { avatar_url: string; events_url: string; followers_url: string; @@ -4887,32 +5592,86 @@ type ReposGetUsersWithAccessToProtectedBranchResponseItem = { type: string; url: string; }; -type ReposGetTopReferrersResponseItem = { - count: number; - referrer: string; - uniques: number; +type ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses = { + href: string; }; -type ReposGetTopPathsResponseItem = { - count: number; - path: string; - title: string; - uniques: number; +type ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf = { + href: string; }; -type ReposGetTeamsWithAccessToProtectedBranchResponseItem = { - description: string; +type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments = { + href: string; +}; +type ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment = { + href: string; +}; +type ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue = { + href: string; +}; +type ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml = { + href: string; +}; +type ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits = { + href: string; +}; +type ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments = { + href: string; +}; +type ReposListPullRequestsAssociatedWithCommitResponseItemLinks = { + comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksComments; + commits: ReposListPullRequestsAssociatedWithCommitResponseItemLinksCommits; + html: ReposListPullRequestsAssociatedWithCommitResponseItemLinksHtml; + issue: ReposListPullRequestsAssociatedWithCommitResponseItemLinksIssue; + review_comment: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComment; + review_comments: ReposListPullRequestsAssociatedWithCommitResponseItemLinksReviewComments; + self: ReposListPullRequestsAssociatedWithCommitResponseItemLinksSelf; + statuses: ReposListPullRequestsAssociatedWithCommitResponseItemLinksStatuses; +}; +type ReposListPullRequestsAssociatedWithCommitResponseItem = { + _links: ReposListPullRequestsAssociatedWithCommitResponseItemLinks; + active_lock_reason: string; + assignee: ReposListPullRequestsAssociatedWithCommitResponseItemAssignee; + assignees: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemAssigneesItem + >; + author_association: string; + base: ReposListPullRequestsAssociatedWithCommitResponseItemBase; + body: string; + closed_at: string; + comments_url: string; + commits_url: string; + created_at: string; + diff_url: string; + draft: boolean; + head: ReposListPullRequestsAssociatedWithCommitResponseItemHead; html_url: string; id: number; - members_url: string; - name: string; + issue_url: string; + labels: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemLabelsItem + >; + locked: boolean; + merge_commit_sha: string; + merged_at: string; + milestone: ReposListPullRequestsAssociatedWithCommitResponseItemMilestone; node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; + number: number; + patch_url: string; + requested_reviewers: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemRequestedReviewersItem + >; + requested_teams: Array< + ReposListPullRequestsAssociatedWithCommitResponseItemRequestedTeamsItem + >; + review_comment_url: string; + review_comments_url: string; + state: string; + statuses_url: string; + title: string; + updated_at: string; url: string; + user: ReposListPullRequestsAssociatedWithCommitResponseItemUser; }; -type ReposGetReleaseByTagResponseAuthor = { +type ReposListPublicResponseItemOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -4932,7 +5691,56 @@ type ReposGetReleaseByTagResponseAuthor = { type: string; url: string; }; -type ReposGetReleaseByTagResponseAssetsItemUploader = { +type ReposListPublicResponseItem = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposListPublicResponseItemOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; +}; +type ReposListProtectedBranchUserRestrictionsResponseItem = { avatar_url: string; events_url: string; followers_url: string; @@ -4952,42 +5760,21 @@ type ReposGetReleaseByTagResponseAssetsItemUploader = { type: string; url: string; }; -type ReposGetReleaseByTagResponseAssetsItem = { - browser_download_url: string; - content_type: string; - created_at: string; - download_count: number; - id: number; - label: string; - name: string; - node_id: string; - size: number; - state: string; - updated_at: string; - uploader: ReposGetReleaseByTagResponseAssetsItemUploader; - url: string; -}; -type ReposGetReleaseByTagResponse = { - assets: Array; - assets_url: string; - author: ReposGetReleaseByTagResponseAuthor; - body: string; - created_at: string; - draft: boolean; +type ReposListProtectedBranchTeamRestrictionsResponseItem = { + description: string; html_url: string; id: number; + members_url: string; name: string; node_id: string; - prerelease: boolean; - published_at: string; - tag_name: string; - tarball_url: string; - target_commitish: string; - upload_url: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; url: string; - zipball_url: string; }; -type ReposGetReleaseAssetResponseUploader = { +type ReposListPagesBuildsResponseItemPusher = { avatar_url: string; events_url: string; followers_url: string; @@ -5007,22 +5794,19 @@ type ReposGetReleaseAssetResponseUploader = { type: string; url: string; }; -type ReposGetReleaseAssetResponse = { - browser_download_url: string; - content_type: string; +type ReposListPagesBuildsResponseItemError = { message: null }; +type ReposListPagesBuildsResponseItem = { + commit: string; created_at: string; - download_count: number; - id: number; - label: string; - name: string; - node_id: string; - size: number; - state: string; + duration: number; + error: ReposListPagesBuildsResponseItemError; + pusher: ReposListPagesBuildsResponseItemPusher; + status: string; updated_at: string; - uploader: ReposGetReleaseAssetResponseUploader; url: string; }; -type ReposGetReleaseResponseAuthor = { +type ReposListLanguagesResponse = { C: number; Python: number }; +type ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -5042,7 +5826,56 @@ type ReposGetReleaseResponseAuthor = { type: string; url: string; }; -type ReposGetReleaseResponseAssetsItemUploader = { +type ReposListInvitationsForAuthenticatedUserResponseItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposListInvitationsForAuthenticatedUserResponseItemRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; +}; +type ReposListInvitationsForAuthenticatedUserResponseItemInviter = { avatar_url: string; events_url: string; followers_url: string; @@ -5062,61 +5895,7 @@ type ReposGetReleaseResponseAssetsItemUploader = { type: string; url: string; }; -type ReposGetReleaseResponseAssetsItem = { - browser_download_url: string; - content_type: string; - created_at: string; - download_count: number; - id: number; - label: string; - name: string; - node_id: string; - size: number; - state: string; - updated_at: string; - uploader: ReposGetReleaseResponseAssetsItemUploader; - url: string; -}; -type ReposGetReleaseResponse = { - assets: Array; - assets_url: string; - author: ReposGetReleaseResponseAuthor; - body: string; - created_at: string; - draft: boolean; - html_url: string; - id: number; - name: string; - node_id: string; - prerelease: boolean; - published_at: string; - tag_name: string; - tarball_url: string; - target_commitish: string; - upload_url: string; - url: string; - zipball_url: string; -}; -type ReposGetReadmeResponseLinks = { - git: string; - html: string; - self: string; -}; -type ReposGetReadmeResponse = { - _links: ReposGetReadmeResponseLinks; - content: string; - download_url: string; - encoding: string; - git_url: string; - html_url: string; - name: string; - path: string; - sha: string; - size: number; - type: string; - url: string; -}; -type ReposGetProtectedBranchRestrictionsResponseUsersItem = { +type ReposListInvitationsForAuthenticatedUserResponseItemInvitee = { avatar_url: string; events_url: string; followers_url: string; @@ -5136,74 +5915,17 @@ type ReposGetProtectedBranchRestrictionsResponseUsersItem = { type: string; url: string; }; -type ReposGetProtectedBranchRestrictionsResponseTeamsItem = { - description: string; - html_url: string; - id: number; - members_url: string; - name: string; - node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; - url: string; -}; -type ReposGetProtectedBranchRestrictionsResponseAppsItemPermissions = { - contents: string; - issues: string; - metadata: string; - single_file: string; -}; -type ReposGetProtectedBranchRestrictionsResponseAppsItemOwner = { - avatar_url: string; - description: string; - events_url: string; - hooks_url: string; - id: number; - issues_url: string; - login: string; - members_url: string; - node_id: string; - public_members_url: string; - repos_url: string; - url: string; -}; -type ReposGetProtectedBranchRestrictionsResponseAppsItem = { +type ReposListInvitationsForAuthenticatedUserResponseItem = { created_at: string; - description: string; - events: Array; - external_url: string; html_url: string; id: number; - name: string; - node_id: string; - owner: ReposGetProtectedBranchRestrictionsResponseAppsItemOwner; - permissions: ReposGetProtectedBranchRestrictionsResponseAppsItemPermissions; - slug: string; - updated_at: string; -}; -type ReposGetProtectedBranchRestrictionsResponse = { - apps: Array; - apps_url: string; - teams: Array; - teams_url: string; - url: string; - users: Array; - users_url: string; -}; -type ReposGetProtectedBranchRequiredStatusChecksResponse = { - contexts: Array; - contexts_url: string; - strict: boolean; - url: string; -}; -type ReposGetProtectedBranchRequiredSignaturesResponse = { - enabled: boolean; + invitee: ReposListInvitationsForAuthenticatedUserResponseItemInvitee; + inviter: ReposListInvitationsForAuthenticatedUserResponseItemInviter; + permissions: string; + repository: ReposListInvitationsForAuthenticatedUserResponseItemRepository; url: string; }; -type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem = { +type ReposListInvitationsResponseItemRepositoryOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -5223,47 +5945,56 @@ type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestric type: string; url: string; }; -type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem = { +type ReposListInvitationsResponseItemRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; html_url: string; id: number; - members_url: string; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; name: string; node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; - url: string; -}; -type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions = { - teams: Array< - ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem - >; + notifications_url: string; + owner: ReposListInvitationsResponseItemRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; teams_url: string; + trees_url: string; url: string; - users: Array< - ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem - >; - users_url: string; -}; -type ReposGetProtectedBranchPullRequestReviewEnforcementResponse = { - dismiss_stale_reviews: boolean; - dismissal_restrictions: ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions; - require_code_owner_reviews: boolean; - required_approving_review_count: number; - url: string; -}; -type ReposGetProtectedBranchAdminEnforcementResponse = { - enabled: boolean; - url: string; -}; -type ReposGetParticipationStatsResponse = { - all: Array; - owner: Array; }; -type ReposGetPagesBuildResponsePusher = { +type ReposListInvitationsResponseItemInviter = { avatar_url: string; events_url: string; followers_url: string; @@ -5283,27 +6014,7 @@ type ReposGetPagesBuildResponsePusher = { type: string; url: string; }; -type ReposGetPagesBuildResponseError = { message: null }; -type ReposGetPagesBuildResponse = { - commit: string; - created_at: string; - duration: number; - error: ReposGetPagesBuildResponseError; - pusher: ReposGetPagesBuildResponsePusher; - status: string; - updated_at: string; - url: string; -}; -type ReposGetPagesResponseSource = { branch: string; directory: string }; -type ReposGetPagesResponse = { - cname: string; - custom_404: boolean; - html_url: string; - source: ReposGetPagesResponseSource; - status: string; - url: string; -}; -type ReposGetLatestReleaseResponseAuthor = { +type ReposListInvitationsResponseItemInvitee = { avatar_url: string; events_url: string; followers_url: string; @@ -5323,7 +6034,46 @@ type ReposGetLatestReleaseResponseAuthor = { type: string; url: string; }; -type ReposGetLatestReleaseResponseAssetsItemUploader = { +type ReposListInvitationsResponseItem = { + created_at: string; + html_url: string; + id: number; + invitee: ReposListInvitationsResponseItemInvitee; + inviter: ReposListInvitationsResponseItemInviter; + permissions: string; + repository: ReposListInvitationsResponseItemRepository; + url: string; +}; +type ReposListHooksResponseItemLastResponse = { + code: null; + message: null; + status: string; +}; +type ReposListHooksResponseItemConfig = { + content_type: string; + insecure_ssl: string; + url: string; +}; +type ReposListHooksResponseItem = { + active: boolean; + config: ReposListHooksResponseItemConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposListHooksResponseItemLastResponse; + name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; +}; +type ReposListForksResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type ReposListForksResponseItemOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -5343,42 +6093,99 @@ type ReposGetLatestReleaseResponseAssetsItemUploader = { type: string; url: string; }; -type ReposGetLatestReleaseResponseAssetsItem = { - browser_download_url: string; - content_type: string; - created_at: string; - download_count: number; - id: number; - label: string; +type ReposListForksResponseItemLicense = { + key: string; name: string; node_id: string; - size: number; - state: string; - updated_at: string; - uploader: ReposGetLatestReleaseResponseAssetsItemUploader; + spdx_id: string; url: string; }; -type ReposGetLatestReleaseResponse = { - assets: Array; - assets_url: string; - author: ReposGetLatestReleaseResponseAuthor; - body: string; +type ReposListForksResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; created_at: string; - draft: boolean; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; html_url: string; id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ReposListForksResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; name: string; + network_count: number; node_id: string; - prerelease: boolean; - published_at: string; - tag_name: string; - tarball_url: string; - target_commitish: string; - upload_url: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListForksResponseItemOwner; + permissions: ReposListForksResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; url: string; - zipball_url: string; + visibility: string; + watchers_count: number; }; -type ReposGetLatestPagesBuildResponsePusher = { +type ReposListForOrgResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type ReposListForOrgResponseItemOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -5398,42 +6205,94 @@ type ReposGetLatestPagesBuildResponsePusher = { type: string; url: string; }; -type ReposGetLatestPagesBuildResponseError = { message: null }; -type ReposGetLatestPagesBuildResponse = { - commit: string; - created_at: string; - duration: number; - error: ReposGetLatestPagesBuildResponseError; - pusher: ReposGetLatestPagesBuildResponsePusher; - status: string; - updated_at: string; - url: string; -}; -type ReposGetHookResponseLastResponse = { - code: null; - message: null; - status: string; -}; -type ReposGetHookResponseConfig = { - content_type: string; - insecure_ssl: string; +type ReposListForOrgResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; url: string; }; -type ReposGetHookResponse = { - active: boolean; - config: ReposGetHookResponseConfig; +type ReposListForOrgResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; created_at: string; - events: Array; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; id: number; - last_response: ReposGetHookResponseLastResponse; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ReposListForOrgResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; name: string; - ping_url: string; - test_url: string; - type: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposListForOrgResponseItemOwner; + permissions: ReposListForOrgResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; updated_at: string; url: string; + visibility: string; + watchers_count: number; }; -type ReposGetDownloadResponse = { +type ReposListDownloadsResponseItem = { content_type: string; description: string; download_count: number; @@ -5443,7 +6302,8 @@ type ReposGetDownloadResponse = { size: number; url: string; }; -type ReposGetDeploymentStatusResponseCreator = { +type ReposListDeploymentsResponseItemPayload = { deploy: string }; +type ReposListDeploymentsResponseItemCreator = { avatar_url: string; events_url: string; followers_url: string; @@ -5463,24 +6323,26 @@ type ReposGetDeploymentStatusResponseCreator = { type: string; url: string; }; -type ReposGetDeploymentStatusResponse = { +type ReposListDeploymentsResponseItem = { created_at: string; - creator: ReposGetDeploymentStatusResponseCreator; - deployment_url: string; + creator: ReposListDeploymentsResponseItemCreator; description: string; environment: string; - environment_url: string; id: number; - log_url: string; node_id: string; + original_environment: string; + payload: ReposListDeploymentsResponseItemPayload; + production_environment: boolean; + ref: string; repository_url: string; - state: string; - target_url: string; + sha: string; + statuses_url: string; + task: string; + transient_environment: boolean; updated_at: string; url: string; }; -type ReposGetDeploymentResponsePayload = { deploy: string }; -type ReposGetDeploymentResponseCreator = { +type ReposListDeploymentStatusesResponseItemCreator = { avatar_url: string; events_url: string; followers_url: string; @@ -5500,26 +6362,23 @@ type ReposGetDeploymentResponseCreator = { type: string; url: string; }; -type ReposGetDeploymentResponse = { +type ReposListDeploymentStatusesResponseItem = { created_at: string; - creator: ReposGetDeploymentResponseCreator; + creator: ReposListDeploymentStatusesResponseItemCreator; + deployment_url: string; description: string; environment: string; + environment_url: string; id: number; + log_url: string; node_id: string; - original_environment: string; - payload: ReposGetDeploymentResponsePayload; - production_environment: boolean; - ref: string; repository_url: string; - sha: string; - statuses_url: string; - task: string; - transient_environment: boolean; + state: string; + target_url: string; updated_at: string; url: string; }; -type ReposGetDeployKeyResponse = { +type ReposListDeployKeysResponseItem = { created_at: string; id: number; key: string; @@ -5528,79 +6387,9 @@ type ReposGetDeployKeyResponse = { url: string; verified: boolean; }; -type ReposGetContributorsStatsResponseItemWeeksItem = { - a: number; - c: number; - d: number; - w: string; -}; -type ReposGetContributorsStatsResponseItemAuthor = { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; - id: number; - login: string; - node_id: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; -}; -type ReposGetContributorsStatsResponseItem = { - author: ReposGetContributorsStatsResponseItemAuthor; - total: number; - weeks: Array; -}; -type ReposGetContentsResponseItemLinks = { - git: string; - html: string; - self: string; -}; -type ReposGetContentsResponseItem = { - _links: ReposGetContentsResponseItemLinks; - download_url: string | null; - git_url: string; - html_url: string; - name: string; - path: string; - sha: string; - size: number; - type: string; - url: string; -}; -type ReposGetContentsResponseLinks = { - git: string; - html: string; - self: string; -}; -type ReposGetContentsResponse = - | { - _links: ReposGetContentsResponseLinks; - content?: string; - download_url: string | null; - encoding?: string; - git_url: string; - html_url: string; - name: string; - path: string; - sha: string; - size: number; - type: string; - url: string; - target?: string; - submodule_git_url?: string; - } - | Array; -type ReposGetCommitCommentResponseUser = { +type ReposListContributorsResponseItem = { avatar_url: string; + contributions: number; events_url: string; followers_url: string; following_url: string; @@ -5619,42 +6408,8 @@ type ReposGetCommitCommentResponseUser = { type: string; url: string; }; -type ReposGetCommitCommentResponse = { - body: string; - commit_id: string; - created_at: string; - html_url: string; - id: number; - line: number; - node_id: string; - path: string; - position: number; - updated_at: string; - url: string; - user: ReposGetCommitCommentResponseUser; -}; -type ReposGetCommitActivityStatsResponseItem = { - days: Array; - total: number; - week: number; -}; -type ReposGetCommitResponseStats = { - additions: number; - deletions: number; - total: number; -}; -type ReposGetCommitResponseParentsItem = { sha: string; url: string }; -type ReposGetCommitResponseFilesItem = { - additions: number; - blob_url: string; - changes: number; - deletions: number; - filename: string; - patch: string; - raw_url: string; - status: string; -}; -type ReposGetCommitResponseCommitter = { +type ReposListCommitsResponseItemParentsItem = { sha: string; url: string }; +type ReposListCommitsResponseItemCommitter = { avatar_url: string; events_url: string; followers_url: string; @@ -5674,33 +6429,33 @@ type ReposGetCommitResponseCommitter = { type: string; url: string; }; -type ReposGetCommitResponseCommitVerification = { +type ReposListCommitsResponseItemCommitVerification = { payload: null; reason: string; signature: null; verified: boolean; }; -type ReposGetCommitResponseCommitTree = { sha: string; url: string }; -type ReposGetCommitResponseCommitCommitter = { +type ReposListCommitsResponseItemCommitTree = { sha: string; url: string }; +type ReposListCommitsResponseItemCommitCommitter = { date: string; email: string; name: string; }; -type ReposGetCommitResponseCommitAuthor = { +type ReposListCommitsResponseItemCommitAuthor = { date: string; email: string; name: string; }; -type ReposGetCommitResponseCommit = { - author: ReposGetCommitResponseCommitAuthor; +type ReposListCommitsResponseItemCommit = { + author: ReposListCommitsResponseItemCommitAuthor; comment_count: number; - committer: ReposGetCommitResponseCommitCommitter; + committer: ReposListCommitsResponseItemCommitCommitter; message: string; - tree: ReposGetCommitResponseCommitTree; + tree: ReposListCommitsResponseItemCommitTree; url: string; - verification: ReposGetCommitResponseCommitVerification; + verification: ReposListCommitsResponseItemCommitVerification; }; -type ReposGetCommitResponseAuthor = { +type ReposListCommitsResponseItemAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -5720,32 +6475,18 @@ type ReposGetCommitResponseAuthor = { type: string; url: string; }; -type ReposGetCommitResponse = { - author: ReposGetCommitResponseAuthor; +type ReposListCommitsResponseItem = { + author: ReposListCommitsResponseItemAuthor; comments_url: string; - commit: ReposGetCommitResponseCommit; - committer: ReposGetCommitResponseCommitter; - files: Array; + commit: ReposListCommitsResponseItemCommit; + committer: ReposListCommitsResponseItemCommitter; html_url: string; node_id: string; - parents: Array; + parents: Array; sha: string; - stats: ReposGetCommitResponseStats; - url: string; -}; -type ReposGetCombinedStatusForRefResponseStatusesItem = { - avatar_url: string; - context: string; - created_at: string; - description: string; - id: number; - node_id: string; - state: string; - target_url: string; - updated_at: string; url: string; }; -type ReposGetCombinedStatusForRefResponseRepositoryOwner = { +type ReposListCommitCommentsResponseItemUser = { avatar_url: string; events_url: string; followers_url: string; @@ -5765,65 +6506,21 @@ type ReposGetCombinedStatusForRefResponseRepositoryOwner = { type: string; url: string; }; -type ReposGetCombinedStatusForRefResponseRepository = { - archive_url: string; - assignees_url: string; - blobs_url: string; - branches_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - deployments_url: string; - description: string; - downloads_url: string; - events_url: string; - fork: boolean; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; +type ReposListCommitCommentsResponseItem = { + body: string; + commit_id: string; + created_at: string; html_url: string; id: number; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - languages_url: string; - merges_url: string; - milestones_url: string; - name: string; + line: number; node_id: string; - notifications_url: string; - owner: ReposGetCombinedStatusForRefResponseRepositoryOwner; - private: boolean; - pulls_url: string; - releases_url: string; - ssh_url: string; - stargazers_url: string; - statuses_url: string; - subscribers_url: string; - subscription_url: string; - tags_url: string; - teams_url: string; - trees_url: string; - url: string; -}; -type ReposGetCombinedStatusForRefResponse = { - commit_url: string; - repository: ReposGetCombinedStatusForRefResponseRepository; - sha: string; - state: string; - statuses: Array; - total_count: number; + path: string; + position: number; + updated_at: string; url: string; + user: ReposListCommitCommentsResponseItemUser; }; -type ReposGetCollaboratorPermissionLevelResponseUser = { +type ReposListCommentsForCommitResponseItemUser = { avatar_url: string; events_url: string; followers_url: string; @@ -5843,21 +6540,26 @@ type ReposGetCollaboratorPermissionLevelResponseUser = { type: string; url: string; }; -type ReposGetCollaboratorPermissionLevelResponse = { - permission: string; - user: ReposGetCollaboratorPermissionLevelResponseUser; -}; -type ReposGetClonesResponseClonesItem = { - count: number; - timestamp: string; - uniques: number; +type ReposListCommentsForCommitResponseItem = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposListCommentsForCommitResponseItemUser; }; -type ReposGetClonesResponse = { - clones: Array; - count: number; - uniques: number; +type ReposListCollaboratorsResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; }; -type ReposGetBranchProtectionResponseRestrictionsUsersItem = { +type ReposListCollaboratorsResponseItem = { avatar_url: string; events_url: string; followers_url: string; @@ -5869,6 +6571,7 @@ type ReposGetBranchProtectionResponseRestrictionsUsersItem = { login: string; node_id: string; organizations_url: string; + permissions: ReposListCollaboratorsResponseItemPermissions; received_events_url: string; repos_url: string; site_admin: boolean; @@ -5877,27 +6580,73 @@ type ReposGetBranchProtectionResponseRestrictionsUsersItem = { type: string; url: string; }; -type ReposGetBranchProtectionResponseRestrictionsTeamsItem = { - description: string; - html_url: string; - id: number; - members_url: string; +type ReposListBranchesForHeadCommitResponseItemCommit = { + sha: string; + url: string; +}; +type ReposListBranchesForHeadCommitResponseItem = { + commit: ReposListBranchesForHeadCommitResponseItemCommit; + name: string; + protected: string; +}; +type ReposListBranchesResponseItemProtectionRequiredStatusChecks = { + contexts: Array; + enforcement_level: string; +}; +type ReposListBranchesResponseItemProtection = { + enabled: boolean; + required_status_checks: ReposListBranchesResponseItemProtectionRequiredStatusChecks; +}; +type ReposListBranchesResponseItemCommit = { sha: string; url: string }; +type ReposListBranchesResponseItem = { + commit: ReposListBranchesResponseItemCommit; + name: string; + protected: boolean; + protection: ReposListBranchesResponseItemProtection; + protection_url: string; +}; +type ReposListAssetsForReleaseResponseItemUploader = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposListAssetsForReleaseResponseItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; name: string; node_id: string; - parent: null; - permission: string; - privacy: string; - repositories_url: string; - slug: string; + size: number; + state: string; + updated_at: string; + uploader: ReposListAssetsForReleaseResponseItemUploader; url: string; }; -type ReposGetBranchProtectionResponseRestrictionsAppsItemPermissions = { +type ReposListAppsWithAccessToProtectedBranchResponseItemPermissions = { contents: string; issues: string; metadata: string; single_file: string; }; -type ReposGetBranchProtectionResponseRestrictionsAppsItemOwner = { +type ReposListAppsWithAccessToProtectedBranchResponseItemOwner = { avatar_url: string; description: string; events_url: string; @@ -5911,7 +6660,7 @@ type ReposGetBranchProtectionResponseRestrictionsAppsItemOwner = { repos_url: string; url: string; }; -type ReposGetBranchProtectionResponseRestrictionsAppsItem = { +type ReposListAppsWithAccessToProtectedBranchResponseItem = { created_at: string; description: string; events: Array; @@ -5920,27 +6669,22 @@ type ReposGetBranchProtectionResponseRestrictionsAppsItem = { id: number; name: string; node_id: string; - owner: ReposGetBranchProtectionResponseRestrictionsAppsItemOwner; - permissions: ReposGetBranchProtectionResponseRestrictionsAppsItemPermissions; + owner: ReposListAppsWithAccessToProtectedBranchResponseItemOwner; + permissions: ReposListAppsWithAccessToProtectedBranchResponseItemPermissions; slug: string; updated_at: string; }; -type ReposGetBranchProtectionResponseRestrictions = { - apps: Array; - apps_url: string; - teams: Array; - teams_url: string; - url: string; - users: Array; - users_url: string; +type ReposGetViewsResponseViewsItem = { + count: number; + timestamp: string; + uniques: number; }; -type ReposGetBranchProtectionResponseRequiredStatusChecks = { - contexts: Array; - contexts_url: string; - strict: boolean; - url: string; +type ReposGetViewsResponse = { + count: number; + uniques: number; + views: Array; }; -type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { +type ReposGetUsersWithAccessToProtectedBranchResponseItem = { avatar_url: string; events_url: string; followers_url: string; @@ -5960,7 +6704,18 @@ type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrict type: string; url: string; }; -type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { +type ReposGetTopReferrersResponseItem = { + count: number; + referrer: string; + uniques: number; +}; +type ReposGetTopPathsResponseItem = { + count: number; + path: string; + title: string; + uniques: number; +}; +type ReposGetTeamsWithAccessToProtectedBranchResponseItem = { description: string; html_url: string; id: number; @@ -5974,141 +6729,27 @@ type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrict slug: string; url: string; }; -type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { - teams: Array< - ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem - >; - teams_url: string; - url: string; - users: Array< - ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem - >; - users_url: string; -}; -type ReposGetBranchProtectionResponseRequiredPullRequestReviews = { - dismiss_stale_reviews: boolean; - dismissal_restrictions: ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; - require_code_owner_reviews: boolean; - required_approving_review_count: number; - url: string; -}; -type ReposGetBranchProtectionResponseEnforceAdmins = { - enabled: boolean; - url: string; -}; -type ReposGetBranchProtectionResponse = { - enforce_admins: ReposGetBranchProtectionResponseEnforceAdmins; - required_pull_request_reviews: ReposGetBranchProtectionResponseRequiredPullRequestReviews; - required_status_checks: ReposGetBranchProtectionResponseRequiredStatusChecks; - restrictions: ReposGetBranchProtectionResponseRestrictions; - url: string; -}; -type ReposGetBranchResponseProtectionRequiredStatusChecks = { - contexts: Array; - enforcement_level: string; -}; -type ReposGetBranchResponseProtection = { - enabled: boolean; - required_status_checks: ReposGetBranchResponseProtectionRequiredStatusChecks; -}; -type ReposGetBranchResponseCommitParentsItem = { sha: string; url: string }; -type ReposGetBranchResponseCommitCommitter = { - avatar_url: string; - gravatar_id: string; - id: number; - login: string; - url: string; -}; -type ReposGetBranchResponseCommitCommitVerification = { - payload: null; - reason: string; - signature: null; - verified: boolean; -}; -type ReposGetBranchResponseCommitCommitTree = { sha: string; url: string }; -type ReposGetBranchResponseCommitCommitCommitter = { - date: string; - email: string; - name: string; -}; -type ReposGetBranchResponseCommitCommitAuthor = { - date: string; - email: string; - name: string; -}; -type ReposGetBranchResponseCommitCommit = { - author: ReposGetBranchResponseCommitCommitAuthor; - committer: ReposGetBranchResponseCommitCommitCommitter; - message: string; - tree: ReposGetBranchResponseCommitCommitTree; - url: string; - verification: ReposGetBranchResponseCommitCommitVerification; -}; -type ReposGetBranchResponseCommitAuthor = { - avatar_url: string; - gravatar_id: string; - id: number; - login: string; - url: string; -}; -type ReposGetBranchResponseCommit = { - author: ReposGetBranchResponseCommitAuthor; - commit: ReposGetBranchResponseCommitCommit; - committer: ReposGetBranchResponseCommitCommitter; - node_id: string; - parents: Array; - sha: string; - url: string; -}; -type ReposGetBranchResponseLinks = { html: string; self: string }; -type ReposGetBranchResponse = { - _links: ReposGetBranchResponseLinks; - commit: ReposGetBranchResponseCommit; - name: string; - protected: boolean; - protection: ReposGetBranchResponseProtection; - protection_url: string; -}; -type ReposGetAppsWithAccessToProtectedBranchResponseItemPermissions = { - contents: string; - issues: string; - metadata: string; - single_file: string; -}; -type ReposGetAppsWithAccessToProtectedBranchResponseItemOwner = { +type ReposGetReleaseByTagResponseAuthor = { avatar_url: string; - description: string; events_url: string; - hooks_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; id: number; - issues_url: string; login: string; - members_url: string; node_id: string; - public_members_url: string; + organizations_url: string; + received_events_url: string; repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; url: string; }; -type ReposGetAppsWithAccessToProtectedBranchResponseItem = { - created_at: string; - description: string; - events: Array; - external_url: string; - html_url: string; - id: number; - name: string; - node_id: string; - owner: ReposGetAppsWithAccessToProtectedBranchResponseItemOwner; - permissions: ReposGetAppsWithAccessToProtectedBranchResponseItemPermissions; - slug: string; - updated_at: string; -}; -type ReposGetResponseSourcePermissions = { - admin: boolean; - pull: boolean; - push: boolean; -}; -type ReposGetResponseSourceOwner = { +type ReposGetReleaseByTagResponseAssetsItemUploader = { avatar_url: string; events_url: string; followers_url: string; @@ -6128,97 +6769,42 @@ type ReposGetResponseSourceOwner = { type: string; url: string; }; -type ReposGetResponseSource = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; +type ReposGetReleaseByTagResponseAssetsItem = { + browser_download_url: string; + content_type: string; created_at: string; - default_branch: string; - deployments_url: string; - description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; - html_url: string; + download_count: number; id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - merges_url: string; - milestones_url: string; - mirror_url: string; + label: string; name: string; - network_count: number; node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposGetResponseSourceOwner; - permissions: ReposGetResponseSourcePermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; + state: string; updated_at: string; + uploader: ReposGetReleaseByTagResponseAssetsItemUploader; url: string; - watchers_count: number; -}; -type ReposGetResponsePermissions = { - admin: boolean; - pull: boolean; - push: boolean; }; -type ReposGetResponseParentPermissions = { - admin: boolean; - pull: boolean; - push: boolean; +type ReposGetReleaseByTagResponse = { + assets: Array; + assets_url: string; + author: ReposGetReleaseByTagResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; }; -type ReposGetResponseParentOwner = { +type ReposGetReleaseAssetResponseUploader = { avatar_url: string; events_url: string; followers_url: string; @@ -6238,87 +6824,22 @@ type ReposGetResponseParentOwner = { type: string; url: string; }; -type ReposGetResponseParent = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; +type ReposGetReleaseAssetResponse = { + browser_download_url: string; + content_type: string; created_at: string; - default_branch: string; - deployments_url: string; - description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; - html_url: string; + download_count: number; id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - merges_url: string; - milestones_url: string; - mirror_url: string; + label: string; name: string; - network_count: number; node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposGetResponseParentOwner; - permissions: ReposGetResponseParentPermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; + state: string; updated_at: string; + uploader: ReposGetReleaseAssetResponseUploader; url: string; - watchers_count: number; }; -type ReposGetResponseOwner = { +type ReposGetReleaseResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -6338,7 +6859,7 @@ type ReposGetResponseOwner = { type: string; url: string; }; -type ReposGetResponseOrganization = { +type ReposGetReleaseResponseAssetsItemUploader = { avatar_url: string; events_url: string; followers_url: string; @@ -6358,154 +6879,61 @@ type ReposGetResponseOrganization = { type: string; url: string; }; -type ReposGetResponseLicense = { - key: string; +type ReposGetReleaseResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; name: string; node_id: string; - spdx_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposGetReleaseResponseAssetsItemUploader; url: string; }; -type ReposGetResponse = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; +type ReposGetReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposGetReleaseResponseAuthor; + body: string; created_at: string; - default_branch: string; - deployments_url: string; - description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; + draft: boolean; html_url: string; id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - license: ReposGetResponseLicense; - merges_url: string; - milestones_url: string; - mirror_url: string; name: string; - network_count: number; node_id: string; - notifications_url: string; - open_issues_count: number; - organization: ReposGetResponseOrganization; - owner: ReposGetResponseOwner; - parent: ReposGetResponseParent; - permissions: ReposGetResponsePermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - source: ReposGetResponseSource; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; - updated_at: string; - url: string; - watchers_count: number; -}; -type ReposEnablePagesSiteResponseSource = { - branch: string; - directory: string; -}; -type ReposEnablePagesSiteResponse = { - cname: string; - custom_404: boolean; - html_url: string; - source: ReposEnablePagesSiteResponseSource; - status: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; url: string; + zipball_url: string; }; -type ReposDeleteFileResponseCommitVerification = { - payload: null; - reason: string; - signature: null; - verified: boolean; +type ReposGetReadmeResponseLinks = { + git: string; + html: string; + self: string; }; -type ReposDeleteFileResponseCommitTree = { sha: string; url: string }; -type ReposDeleteFileResponseCommitParentsItem = { +type ReposGetReadmeResponse = { + _links: ReposGetReadmeResponseLinks; + content: string; + download_url: string; + encoding: string; + git_url: string; html_url: string; - sha: string; - url: string; -}; -type ReposDeleteFileResponseCommitCommitter = { - date: string; - email: string; - name: string; -}; -type ReposDeleteFileResponseCommitAuthor = { - date: string; - email: string; name: string; -}; -type ReposDeleteFileResponseCommit = { - author: ReposDeleteFileResponseCommitAuthor; - committer: ReposDeleteFileResponseCommitCommitter; - html_url: string; - message: string; - node_id: string; - parents: Array; + path: string; sha: string; - tree: ReposDeleteFileResponseCommitTree; + size: number; + type: string; url: string; - verification: ReposDeleteFileResponseCommitVerification; -}; -type ReposDeleteFileResponse = { - commit: ReposDeleteFileResponseCommit; - content: null; }; -type ReposDeleteResponse = { documentation_url: string; message: string }; -type ReposCreateUsingTemplateResponseTemplateRepositoryPermissions = { - admin: boolean; - pull: boolean; - push: boolean; -}; -type ReposCreateUsingTemplateResponseTemplateRepositoryOwner = { +type ReposGetProtectedBranchRestrictionsResponseUsersItem = { avatar_url: string; events_url: string; followers_url: string; @@ -6525,92 +6953,74 @@ type ReposCreateUsingTemplateResponseTemplateRepositoryOwner = { type: string; url: string; }; -type ReposCreateUsingTemplateResponseTemplateRepository = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - created_at: string; - default_branch: string; - deployments_url: string; +type ReposGetProtectedBranchRestrictionsResponseTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; +}; +type ReposGetProtectedBranchRestrictionsResponseAppsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; +}; +type ReposGetProtectedBranchRestrictionsResponseAppsItemOwner = { + avatar_url: string; description: string; - disabled: boolean; - downloads_url: string; events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; hooks_url: string; - html_url: string; id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - merges_url: string; - milestones_url: string; - mirror_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; +}; +type ReposGetProtectedBranchRestrictionsResponseAppsItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; name: string; - network_count: number; node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposCreateUsingTemplateResponseTemplateRepositoryOwner; - permissions: ReposCreateUsingTemplateResponseTemplateRepositoryPermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; + owner: ReposGetProtectedBranchRestrictionsResponseAppsItemOwner; + permissions: ReposGetProtectedBranchRestrictionsResponseAppsItemPermissions; + slug: string; updated_at: string; +}; +type ReposGetProtectedBranchRestrictionsResponse = { + apps: Array; + apps_url: string; + teams: Array; + teams_url: string; url: string; - watchers_count: number; + users: Array; + users_url: string; }; -type ReposCreateUsingTemplateResponsePermissions = { - admin: boolean; - pull: boolean; - push: boolean; +type ReposGetProtectedBranchRequiredStatusChecksResponse = { + contexts: Array; + contexts_url: string; + strict: boolean; + url: string; }; -type ReposCreateUsingTemplateResponseOwner = { +type ReposGetProtectedBranchRequiredSignaturesResponse = { + enabled: boolean; + url: string; +}; +type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem = { avatar_url: string; events_url: string; followers_url: string; @@ -6630,87 +7040,47 @@ type ReposCreateUsingTemplateResponseOwner = { type: string; url: string; }; -type ReposCreateUsingTemplateResponse = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - created_at: string; - default_branch: string; - deployments_url: string; +type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem = { description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; html_url: string; id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - merges_url: string; - milestones_url: string; - mirror_url: string; + members_url: string; name: string; - network_count: number; node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposCreateUsingTemplateResponseOwner; - permissions: ReposCreateUsingTemplateResponsePermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; +}; +type ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions = { + teams: Array< + ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsTeamsItem + >; teams_url: string; - template_repository: ReposCreateUsingTemplateResponseTemplateRepository; - topics: Array; - trees_url: string; - updated_at: string; url: string; - watchers_count: number; + users: Array< + ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictionsUsersItem + >; + users_url: string; }; -type ReposCreateStatusResponseCreator = { +type ReposGetProtectedBranchPullRequestReviewEnforcementResponse = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposGetProtectedBranchPullRequestReviewEnforcementResponseDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; +}; +type ReposGetProtectedBranchAdminEnforcementResponse = { + enabled: boolean; + url: string; +}; +type ReposGetParticipationStatsResponse = { + all: Array; + owner: Array; +}; +type ReposGetPagesBuildResponsePusher = { avatar_url: string; events_url: string; followers_url: string; @@ -6730,20 +7100,47 @@ type ReposCreateStatusResponseCreator = { type: string; url: string; }; -type ReposCreateStatusResponse = { - avatar_url: string; - context: string; +type ReposGetPagesBuildResponseError = { message: null }; +type ReposGetPagesBuildResponse = { + commit: string; created_at: string; - creator: ReposCreateStatusResponseCreator; - description: string; + duration: number; + error: ReposGetPagesBuildResponseError; + pusher: ReposGetPagesBuildResponsePusher; + status: string; + updated_at: string; + url: string; +}; +type ReposGetPagesResponseSource = { branch: string; directory: string }; +type ReposGetPagesResponse = { + cname: string; + custom_404: boolean; + html_url: string; + source: ReposGetPagesResponseSource; + status: string; + url: string; +}; +type ReposGetLatestReleaseResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; id: number; + login: string; node_id: string; - state: string; - target_url: string; - updated_at: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; url: string; }; -type ReposCreateReleaseResponseAuthor = { +type ReposGetLatestReleaseResponseAssetsItemUploader = { avatar_url: string; events_url: string; followers_url: string; @@ -6763,10 +7160,25 @@ type ReposCreateReleaseResponseAuthor = { type: string; url: string; }; -type ReposCreateReleaseResponse = { - assets: Array; +type ReposGetLatestReleaseResponseAssetsItem = { + browser_download_url: string; + content_type: string; + created_at: string; + download_count: number; + id: number; + label: string; + name: string; + node_id: string; + size: number; + state: string; + updated_at: string; + uploader: ReposGetLatestReleaseResponseAssetsItemUploader; + url: string; +}; +type ReposGetLatestReleaseResponse = { + assets: Array; assets_url: string; - author: ReposCreateReleaseResponseAuthor; + author: ReposGetLatestReleaseResponseAuthor; body: string; created_at: string; draft: boolean; @@ -6783,67 +7195,72 @@ type ReposCreateReleaseResponse = { url: string; zipball_url: string; }; -type ReposCreateOrUpdateFileResponseContentLinks = { - git: string; - html: string; - self: string; -}; -type ReposCreateOrUpdateFileResponseContent = { - _links: ReposCreateOrUpdateFileResponseContentLinks; - download_url: string; - git_url: string; +type ReposGetLatestPagesBuildResponsePusher = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; html_url: string; - name: string; - path: string; - sha: string; - size: number; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; type: string; url: string; }; -type ReposCreateOrUpdateFileResponseCommitVerification = { - payload: null; - reason: string; - signature: null; - verified: boolean; -}; -type ReposCreateOrUpdateFileResponseCommitTree = { sha: string; url: string }; -type ReposCreateOrUpdateFileResponseCommitParentsItem = { - html_url: string; - sha: string; +type ReposGetLatestPagesBuildResponseError = { message: null }; +type ReposGetLatestPagesBuildResponse = { + commit: string; + created_at: string; + duration: number; + error: ReposGetLatestPagesBuildResponseError; + pusher: ReposGetLatestPagesBuildResponsePusher; + status: string; + updated_at: string; url: string; }; -type ReposCreateOrUpdateFileResponseCommitCommitter = { - date: string; - email: string; - name: string; +type ReposGetHookResponseLastResponse = { + code: null; + message: null; + status: string; }; -type ReposCreateOrUpdateFileResponseCommitAuthor = { - date: string; - email: string; +type ReposGetHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; +}; +type ReposGetHookResponse = { + active: boolean; + config: ReposGetHookResponseConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposGetHookResponseLastResponse; name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; }; -type ReposCreateOrUpdateFileResponseCommit = { - author: ReposCreateOrUpdateFileResponseCommitAuthor; - committer: ReposCreateOrUpdateFileResponseCommitCommitter; +type ReposGetDownloadResponse = { + content_type: string; + description: string; + download_count: number; html_url: string; - message: string; - node_id: string; - parents: Array; - sha: string; - tree: ReposCreateOrUpdateFileResponseCommitTree; + id: number; + name: string; + size: number; url: string; - verification: ReposCreateOrUpdateFileResponseCommitVerification; -}; -type ReposCreateOrUpdateFileResponse = { - commit: ReposCreateOrUpdateFileResponseCommit; - content: ReposCreateOrUpdateFileResponseContent; }; -type ReposCreateInOrgResponsePermissions = { - admin: boolean; - pull: boolean; - push: boolean; -}; -type ReposCreateInOrgResponseOwner = { +type ReposGetDeploymentStatusResponseCreator = { avatar_url: string; events_url: string; followers_url: string; @@ -6863,116 +7280,24 @@ type ReposCreateInOrgResponseOwner = { type: string; url: string; }; -type ReposCreateInOrgResponse = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; +type ReposGetDeploymentStatusResponse = { created_at: string; - default_branch: string; - deployments_url: string; + creator: ReposGetDeploymentStatusResponseCreator; + deployment_url: string; description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; - html_url: string; + environment: string; + environment_url: string; id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - merges_url: string; - milestones_url: string; - mirror_url: string; - name: string; - network_count: number; + log_url: string; node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposCreateInOrgResponseOwner; - permissions: ReposCreateInOrgResponsePermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; - updated_at: string; - url: string; - watchers_count: number; -}; -type ReposCreateHookResponseLastResponse = { - code: null; - message: null; - status: string; -}; -type ReposCreateHookResponseConfig = { - content_type: string; - insecure_ssl: string; - url: string; -}; -type ReposCreateHookResponse = { - active: boolean; - config: ReposCreateHookResponseConfig; - created_at: string; - events: Array; - id: number; - last_response: ReposCreateHookResponseLastResponse; - name: string; - ping_url: string; - test_url: string; - type: string; + repository_url: string; + state: string; + target_url: string; updated_at: string; url: string; }; -type ReposCreateForkResponsePermissions = { - admin: boolean; - pull: boolean; - push: boolean; -}; -type ReposCreateForkResponseOwner = { +type ReposGetDeploymentResponsePayload = { deploy: string }; +type ReposGetDeploymentResponseCreator = { avatar_url: string; events_url: string; followers_url: string; @@ -6992,92 +7317,41 @@ type ReposCreateForkResponseOwner = { type: string; url: string; }; -type ReposCreateForkResponse = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; +type ReposGetDeploymentResponse = { created_at: string; - default_branch: string; - deployments_url: string; + creator: ReposGetDeploymentResponseCreator; description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; - html_url: string; + environment: string; id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - merges_url: string; - milestones_url: string; - mirror_url: string; - name: string; - network_count: number; node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposCreateForkResponseOwner; - permissions: ReposCreateForkResponsePermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; + original_environment: string; + payload: ReposGetDeploymentResponsePayload; + production_environment: boolean; + ref: string; + repository_url: string; + sha: string; statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; + task: string; + transient_environment: boolean; updated_at: string; url: string; - watchers_count: number; }; -type ReposCreateForAuthenticatedUserResponsePermissions = { - admin: boolean; - pull: boolean; - push: boolean; +type ReposGetDeployKeyResponse = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; }; -type ReposCreateForAuthenticatedUserResponseOwner = { +type ReposGetContributorsStatsResponseItemWeeksItem = { + a: number; + c: number; + d: number; + w: string; +}; +type ReposGetContributorsStatsResponseItemAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -7097,94 +7371,19 @@ type ReposCreateForAuthenticatedUserResponseOwner = { type: string; url: string; }; -type ReposCreateForAuthenticatedUserResponse = { - allow_merge_commit: boolean; - allow_rebase_merge: boolean; - allow_squash_merge: boolean; - archive_url: string; - archived: boolean; - assignees_url: string; - blobs_url: string; - branches_url: string; - clone_url: string; - collaborators_url: string; - comments_url: string; - commits_url: string; - compare_url: string; - contents_url: string; - contributors_url: string; - created_at: string; - default_branch: string; - deployments_url: string; - description: string; - disabled: boolean; - downloads_url: string; - events_url: string; - fork: boolean; - forks_count: number; - forks_url: string; - full_name: string; - git_commits_url: string; - git_refs_url: string; - git_tags_url: string; - git_url: string; - has_downloads: boolean; - has_issues: boolean; - has_pages: boolean; - has_projects: boolean; - has_wiki: boolean; - homepage: string; - hooks_url: string; - html_url: string; - id: number; - is_template: boolean; - issue_comment_url: string; - issue_events_url: string; - issues_url: string; - keys_url: string; - labels_url: string; - language: null; - languages_url: string; - merges_url: string; - milestones_url: string; - mirror_url: string; - name: string; - network_count: number; - node_id: string; - notifications_url: string; - open_issues_count: number; - owner: ReposCreateForAuthenticatedUserResponseOwner; - permissions: ReposCreateForAuthenticatedUserResponsePermissions; - private: boolean; - pulls_url: string; - pushed_at: string; - releases_url: string; - size: number; - ssh_url: string; - stargazers_count: number; - stargazers_url: string; - statuses_url: string; - subscribers_count: number; - subscribers_url: string; - subscription_url: string; - svn_url: string; - tags_url: string; - teams_url: string; - template_repository: null; - topics: Array; - trees_url: string; - updated_at: string; - url: string; - watchers_count: number; +type ReposGetContributorsStatsResponseItem = { + author: ReposGetContributorsStatsResponseItemAuthor; + total: number; + weeks: Array; }; -type ReposCreateFileResponseContentLinks = { +type ReposGetContentsResponseItemLinks = { git: string; html: string; self: string; }; -type ReposCreateFileResponseContent = { - _links: ReposCreateFileResponseContentLinks; - download_url: string; +type ReposGetContentsResponseItem = { + _links: ReposGetContentsResponseItemLinks; + download_url: string | null; git_url: string; html_url: string; name: string; @@ -7194,121 +7393,30 @@ type ReposCreateFileResponseContent = { type: string; url: string; }; -type ReposCreateFileResponseCommitVerification = { - payload: null; - reason: string; - signature: null; - verified: boolean; -}; -type ReposCreateFileResponseCommitTree = { sha: string; url: string }; -type ReposCreateFileResponseCommitParentsItem = { - html_url: string; - sha: string; - url: string; -}; -type ReposCreateFileResponseCommitCommitter = { - date: string; - email: string; - name: string; -}; -type ReposCreateFileResponseCommitAuthor = { - date: string; - email: string; - name: string; -}; -type ReposCreateFileResponseCommit = { - author: ReposCreateFileResponseCommitAuthor; - committer: ReposCreateFileResponseCommitCommitter; - html_url: string; - message: string; - node_id: string; - parents: Array; - sha: string; - tree: ReposCreateFileResponseCommitTree; - url: string; - verification: ReposCreateFileResponseCommitVerification; -}; -type ReposCreateFileResponse = { - commit: ReposCreateFileResponseCommit; - content: ReposCreateFileResponseContent; -}; -type ReposCreateDeploymentStatusResponseCreator = { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; - id: number; - login: string; - node_id: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; -}; -type ReposCreateDeploymentStatusResponse = { - created_at: string; - creator: ReposCreateDeploymentStatusResponseCreator; - deployment_url: string; - description: string; - environment: string; - environment_url: string; - id: number; - log_url: string; - node_id: string; - repository_url: string; - state: string; - target_url: string; - updated_at: string; - url: string; -}; -type ReposCreateDeploymentResponsePayload = { deploy: string }; -type ReposCreateDeploymentResponseCreator = { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; - id: number; - login: string; - node_id: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; -}; -type ReposCreateDeploymentResponse = { - created_at: string; - creator: ReposCreateDeploymentResponseCreator; - description: string; - environment: string; - id: number; - node_id: string; - original_environment: string; - payload: ReposCreateDeploymentResponsePayload; - production_environment: boolean; - ref: string; - repository_url: string; - sha: string; - statuses_url: string; - task: string; - transient_environment: boolean; - updated_at: string; - url: string; +type ReposGetContentsResponseLinks = { + git: string; + html: string; + self: string; }; -type ReposCreateCommitCommentResponseUser = { +type ReposGetContentsResponse = + | { + _links: ReposGetContentsResponseLinks; + content?: string; + download_url: string | null; + encoding?: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; + target?: string; + submodule_git_url?: string; + } + | Array; +type ReposGetCommitCommentResponseUser = { avatar_url: string; events_url: string; followers_url: string; @@ -7328,7 +7436,7 @@ type ReposCreateCommitCommentResponseUser = { type: string; url: string; }; -type ReposCreateCommitCommentResponse = { +type ReposGetCommitCommentResponse = { body: string; commit_id: string; created_at: string; @@ -7340,13 +7448,30 @@ type ReposCreateCommitCommentResponse = { position: number; updated_at: string; url: string; - user: ReposCreateCommitCommentResponseUser; + user: ReposGetCommitCommentResponseUser; }; -type ReposCompareCommitsResponseMergeBaseCommitParentsItem = { - sha: string; - url: string; +type ReposGetCommitActivityStatsResponseItem = { + days: Array; + total: number; + week: number; }; -type ReposCompareCommitsResponseMergeBaseCommitCommitter = { +type ReposGetCommitResponseStats = { + additions: number; + deletions: number; + total: number; +}; +type ReposGetCommitResponseParentsItem = { sha: string; url: string }; +type ReposGetCommitResponseFilesItem = { + additions: number; + blob_url: string; + changes: number; + deletions: number; + filename: string; + patch: string; + raw_url: string; + status: string; +}; +type ReposGetCommitResponseCommitter = { avatar_url: string; events_url: string; followers_url: string; @@ -7366,36 +7491,33 @@ type ReposCompareCommitsResponseMergeBaseCommitCommitter = { type: string; url: string; }; -type ReposCompareCommitsResponseMergeBaseCommitCommitVerification = { +type ReposGetCommitResponseCommitVerification = { payload: null; reason: string; signature: null; verified: boolean; }; -type ReposCompareCommitsResponseMergeBaseCommitCommitTree = { - sha: string; - url: string; -}; -type ReposCompareCommitsResponseMergeBaseCommitCommitCommitter = { +type ReposGetCommitResponseCommitTree = { sha: string; url: string }; +type ReposGetCommitResponseCommitCommitter = { date: string; email: string; name: string; }; -type ReposCompareCommitsResponseMergeBaseCommitCommitAuthor = { +type ReposGetCommitResponseCommitAuthor = { date: string; email: string; name: string; }; -type ReposCompareCommitsResponseMergeBaseCommitCommit = { - author: ReposCompareCommitsResponseMergeBaseCommitCommitAuthor; +type ReposGetCommitResponseCommit = { + author: ReposGetCommitResponseCommitAuthor; comment_count: number; - committer: ReposCompareCommitsResponseMergeBaseCommitCommitCommitter; + committer: ReposGetCommitResponseCommitCommitter; message: string; - tree: ReposCompareCommitsResponseMergeBaseCommitCommitTree; + tree: ReposGetCommitResponseCommitTree; url: string; - verification: ReposCompareCommitsResponseMergeBaseCommitCommitVerification; + verification: ReposGetCommitResponseCommitVerification; }; -type ReposCompareCommitsResponseMergeBaseCommitAuthor = { +type ReposGetCommitResponseAuthor = { avatar_url: string; events_url: string; followers_url: string; @@ -7415,34 +7537,32 @@ type ReposCompareCommitsResponseMergeBaseCommitAuthor = { type: string; url: string; }; -type ReposCompareCommitsResponseMergeBaseCommit = { - author: ReposCompareCommitsResponseMergeBaseCommitAuthor; +type ReposGetCommitResponse = { + author: ReposGetCommitResponseAuthor; comments_url: string; - commit: ReposCompareCommitsResponseMergeBaseCommitCommit; - committer: ReposCompareCommitsResponseMergeBaseCommitCommitter; + commit: ReposGetCommitResponseCommit; + committer: ReposGetCommitResponseCommitter; + files: Array; html_url: string; node_id: string; - parents: Array; + parents: Array; sha: string; + stats: ReposGetCommitResponseStats; url: string; }; -type ReposCompareCommitsResponseFilesItem = { - additions: number; - blob_url: string; - changes: number; - contents_url: string; - deletions: number; - filename: string; - patch: string; - raw_url: string; - sha: string; - status: string; -}; -type ReposCompareCommitsResponseCommitsItemParentsItem = { - sha: string; +type ReposGetCombinedStatusForRefResponseStatusesItem = { + avatar_url: string; + context: string; + created_at: string; + description: string; + id: number; + node_id: string; + state: string; + target_url: string; + updated_at: string; url: string; }; -type ReposCompareCommitsResponseCommitsItemCommitter = { +type ReposGetCombinedStatusForRefResponseRepositoryOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -7462,36 +7582,65 @@ type ReposCompareCommitsResponseCommitsItemCommitter = { type: string; url: string; }; -type ReposCompareCommitsResponseCommitsItemCommitVerification = { - payload: null; - reason: string; - signature: null; - verified: boolean; -}; -type ReposCompareCommitsResponseCommitsItemCommitTree = { - sha: string; - url: string; -}; -type ReposCompareCommitsResponseCommitsItemCommitCommitter = { - date: string; - email: string; - name: string; -}; -type ReposCompareCommitsResponseCommitsItemCommitAuthor = { - date: string; - email: string; +type ReposGetCombinedStatusForRefResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; name: string; + node_id: string; + notifications_url: string; + owner: ReposGetCombinedStatusForRefResponseRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; }; -type ReposCompareCommitsResponseCommitsItemCommit = { - author: ReposCompareCommitsResponseCommitsItemCommitAuthor; - comment_count: number; - committer: ReposCompareCommitsResponseCommitsItemCommitCommitter; - message: string; - tree: ReposCompareCommitsResponseCommitsItemCommitTree; +type ReposGetCombinedStatusForRefResponse = { + commit_url: string; + repository: ReposGetCombinedStatusForRefResponseRepository; + sha: string; + state: string; + statuses: Array; + total_count: number; url: string; - verification: ReposCompareCommitsResponseCommitsItemCommitVerification; }; -type ReposCompareCommitsResponseCommitsItemAuthor = { +type ReposGetCollaboratorPermissionLevelResponseUser = { avatar_url: string; events_url: string; followers_url: string; @@ -7511,22 +7660,21 @@ type ReposCompareCommitsResponseCommitsItemAuthor = { type: string; url: string; }; -type ReposCompareCommitsResponseCommitsItem = { - author: ReposCompareCommitsResponseCommitsItemAuthor; - comments_url: string; - commit: ReposCompareCommitsResponseCommitsItemCommit; - committer: ReposCompareCommitsResponseCommitsItemCommitter; - html_url: string; - node_id: string; - parents: Array; - sha: string; - url: string; +type ReposGetCollaboratorPermissionLevelResponse = { + permission: string; + user: ReposGetCollaboratorPermissionLevelResponseUser; }; -type ReposCompareCommitsResponseBaseCommitParentsItem = { - sha: string; - url: string; +type ReposGetClonesResponseClonesItem = { + count: number; + timestamp: string; + uniques: number; }; -type ReposCompareCommitsResponseBaseCommitCommitter = { +type ReposGetClonesResponse = { + clones: Array; + count: number; + uniques: number; +}; +type ReposGetBranchProtectionResponseRestrictionsUsersItem = { avatar_url: string; events_url: string; followers_url: string; @@ -7546,82 +7694,70 @@ type ReposCompareCommitsResponseBaseCommitCommitter = { type: string; url: string; }; -type ReposCompareCommitsResponseBaseCommitCommitVerification = { - payload: null; - reason: string; - signature: null; - verified: boolean; -}; -type ReposCompareCommitsResponseBaseCommitCommitTree = { - sha: string; - url: string; -}; -type ReposCompareCommitsResponseBaseCommitCommitCommitter = { - date: string; - email: string; - name: string; -}; -type ReposCompareCommitsResponseBaseCommitCommitAuthor = { - date: string; - email: string; +type ReposGetBranchProtectionResponseRestrictionsTeamsItem = { + description: string; + html_url: string; + id: number; + members_url: string; name: string; -}; -type ReposCompareCommitsResponseBaseCommitCommit = { - author: ReposCompareCommitsResponseBaseCommitCommitAuthor; - comment_count: number; - committer: ReposCompareCommitsResponseBaseCommitCommitCommitter; - message: string; - tree: ReposCompareCommitsResponseBaseCommitCommitTree; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; url: string; - verification: ReposCompareCommitsResponseBaseCommitCommitVerification; }; -type ReposCompareCommitsResponseBaseCommitAuthor = { +type ReposGetBranchProtectionResponseRestrictionsAppsItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; +}; +type ReposGetBranchProtectionResponseRestrictionsAppsItemOwner = { avatar_url: string; + description: string; events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; + hooks_url: string; id: number; + issues_url: string; login: string; + members_url: string; node_id: string; - organizations_url: string; - received_events_url: string; + public_members_url: string; repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; url: string; }; -type ReposCompareCommitsResponseBaseCommit = { - author: ReposCompareCommitsResponseBaseCommitAuthor; - comments_url: string; - commit: ReposCompareCommitsResponseBaseCommitCommit; - committer: ReposCompareCommitsResponseBaseCommitCommitter; +type ReposGetBranchProtectionResponseRestrictionsAppsItem = { + created_at: string; + description: string; + events: Array; + external_url: string; html_url: string; + id: number; + name: string; node_id: string; - parents: Array; - sha: string; + owner: ReposGetBranchProtectionResponseRestrictionsAppsItemOwner; + permissions: ReposGetBranchProtectionResponseRestrictionsAppsItemPermissions; + slug: string; + updated_at: string; +}; +type ReposGetBranchProtectionResponseRestrictions = { + apps: Array; + apps_url: string; + teams: Array; + teams_url: string; url: string; + users: Array; + users_url: string; }; -type ReposCompareCommitsResponse = { - ahead_by: number; - base_commit: ReposCompareCommitsResponseBaseCommit; - behind_by: number; - commits: Array; - diff_url: string; - files: Array; - html_url: string; - merge_base_commit: ReposCompareCommitsResponseMergeBaseCommit; - patch_url: string; - permalink_url: string; - status: string; - total_commits: number; +type ReposGetBranchProtectionResponseRequiredStatusChecks = { + contexts: Array; + contexts_url: string; + strict: boolean; url: string; }; -type ReposAddProtectedBranchUserRestrictionsResponseItem = { +type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem = { avatar_url: string; events_url: string; followers_url: string; @@ -7641,7 +7777,7 @@ type ReposAddProtectedBranchUserRestrictionsResponseItem = { type: string; url: string; }; -type ReposAddProtectedBranchTeamRestrictionsResponseItem = { +type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem = { description: string; html_url: string; id: number; @@ -7655,17 +7791,116 @@ type ReposAddProtectedBranchTeamRestrictionsResponseItem = { slug: string; url: string; }; -type ReposAddProtectedBranchRequiredSignaturesResponse = { +type ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions = { + teams: Array< + ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsTeamsItem + >; + teams_url: string; + url: string; + users: Array< + ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictionsUsersItem + >; + users_url: string; +}; +type ReposGetBranchProtectionResponseRequiredPullRequestReviews = { + dismiss_stale_reviews: boolean; + dismissal_restrictions: ReposGetBranchProtectionResponseRequiredPullRequestReviewsDismissalRestrictions; + require_code_owner_reviews: boolean; + required_approving_review_count: number; + url: string; +}; +type ReposGetBranchProtectionResponseRequiredLinearHistory = { + enabled: boolean; +}; +type ReposGetBranchProtectionResponseEnforceAdmins = { enabled: boolean; url: string; }; -type ReposAddProtectedBranchAppRestrictionsResponseItemPermissions = { +type ReposGetBranchProtectionResponseAllowForcePushes = { enabled: boolean }; +type ReposGetBranchProtectionResponseAllowDeletions = { enabled: boolean }; +type ReposGetBranchProtectionResponse = { + allow_deletions: ReposGetBranchProtectionResponseAllowDeletions; + allow_force_pushes: ReposGetBranchProtectionResponseAllowForcePushes; + enforce_admins: ReposGetBranchProtectionResponseEnforceAdmins; + required_linear_history: ReposGetBranchProtectionResponseRequiredLinearHistory; + required_pull_request_reviews: ReposGetBranchProtectionResponseRequiredPullRequestReviews; + required_status_checks: ReposGetBranchProtectionResponseRequiredStatusChecks; + restrictions: ReposGetBranchProtectionResponseRestrictions; + url: string; +}; +type ReposGetBranchResponseProtectionRequiredStatusChecks = { + contexts: Array; + enforcement_level: string; +}; +type ReposGetBranchResponseProtection = { + enabled: boolean; + required_status_checks: ReposGetBranchResponseProtectionRequiredStatusChecks; +}; +type ReposGetBranchResponseCommitParentsItem = { sha: string; url: string }; +type ReposGetBranchResponseCommitCommitter = { + avatar_url: string; + gravatar_id: string; + id: number; + login: string; + url: string; +}; +type ReposGetBranchResponseCommitCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; +}; +type ReposGetBranchResponseCommitCommitTree = { sha: string; url: string }; +type ReposGetBranchResponseCommitCommitCommitter = { + date: string; + email: string; + name: string; +}; +type ReposGetBranchResponseCommitCommitAuthor = { + date: string; + email: string; + name: string; +}; +type ReposGetBranchResponseCommitCommit = { + author: ReposGetBranchResponseCommitCommitAuthor; + committer: ReposGetBranchResponseCommitCommitCommitter; + message: string; + tree: ReposGetBranchResponseCommitCommitTree; + url: string; + verification: ReposGetBranchResponseCommitCommitVerification; +}; +type ReposGetBranchResponseCommitAuthor = { + avatar_url: string; + gravatar_id: string; + id: number; + login: string; + url: string; +}; +type ReposGetBranchResponseCommit = { + author: ReposGetBranchResponseCommitAuthor; + commit: ReposGetBranchResponseCommitCommit; + committer: ReposGetBranchResponseCommitCommitter; + node_id: string; + parents: Array; + sha: string; + url: string; +}; +type ReposGetBranchResponseLinks = { html: string; self: string }; +type ReposGetBranchResponse = { + _links: ReposGetBranchResponseLinks; + commit: ReposGetBranchResponseCommit; + name: string; + protected: boolean; + protection: ReposGetBranchResponseProtection; + protection_url: string; +}; +type ReposGetAppsWithAccessToProtectedBranchResponseItemPermissions = { contents: string; issues: string; metadata: string; single_file: string; }; -type ReposAddProtectedBranchAppRestrictionsResponseItemOwner = { +type ReposGetAppsWithAccessToProtectedBranchResponseItemOwner = { avatar_url: string; description: string; events_url: string; @@ -7679,7 +7914,7 @@ type ReposAddProtectedBranchAppRestrictionsResponseItemOwner = { repos_url: string; url: string; }; -type ReposAddProtectedBranchAppRestrictionsResponseItem = { +type ReposGetAppsWithAccessToProtectedBranchResponseItem = { created_at: string; description: string; events: Array; @@ -7688,25 +7923,17 @@ type ReposAddProtectedBranchAppRestrictionsResponseItem = { id: number; name: string; node_id: string; - owner: ReposAddProtectedBranchAppRestrictionsResponseItemOwner; - permissions: ReposAddProtectedBranchAppRestrictionsResponseItemPermissions; + owner: ReposGetAppsWithAccessToProtectedBranchResponseItemOwner; + permissions: ReposGetAppsWithAccessToProtectedBranchResponseItemPermissions; slug: string; updated_at: string; }; -type ReposAddProtectedBranchAdminEnforcementResponse = { - enabled: boolean; - url: string; -}; -type ReposAddDeployKeyResponse = { - created_at: string; - id: number; - key: string; - read_only: boolean; - title: string; - url: string; - verified: boolean; +type ReposGetResponseSourcePermissions = { + admin: boolean; + pull: boolean; + push: boolean; }; -type ReposAddCollaboratorResponseRepositoryOwner = { +type ReposGetResponseSourceOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -7726,76 +7953,99 @@ type ReposAddCollaboratorResponseRepositoryOwner = { type: string; url: string; }; -type ReposAddCollaboratorResponseRepository = { +type ReposGetResponseSource = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; archive_url: string; + archived: boolean; assignees_url: string; blobs_url: string; branches_url: string; + clone_url: string; collaborators_url: string; comments_url: string; commits_url: string; compare_url: string; contents_url: string; contributors_url: string; + created_at: string; + default_branch: string; deployments_url: string; description: string; + disabled: boolean; downloads_url: string; events_url: string; fork: boolean; + forks_count: number; forks_url: string; full_name: string; git_commits_url: string; git_refs_url: string; git_tags_url: string; git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; html_url: string; id: number; + is_template: boolean; issue_comment_url: string; issue_events_url: string; issues_url: string; keys_url: string; labels_url: string; + language: null; languages_url: string; merges_url: string; milestones_url: string; + mirror_url: string; name: string; + network_count: number; node_id: string; notifications_url: string; - owner: ReposAddCollaboratorResponseRepositoryOwner; + open_issues_count: number; + owner: ReposGetResponseSourceOwner; + permissions: ReposGetResponseSourcePermissions; private: boolean; pulls_url: string; + pushed_at: string; releases_url: string; + size: number; ssh_url: string; + stargazers_count: number; stargazers_url: string; statuses_url: string; + subscribers_count: number; subscribers_url: string; subscription_url: string; + svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; trees_url: string; + updated_at: string; url: string; + visibility: string; + watchers_count: number; }; -type ReposAddCollaboratorResponseInviter = { - avatar_url: string; - events_url: string; - followers_url: string; - following_url: string; - gists_url: string; - gravatar_id: string; - html_url: string; - id: number; - login: string; - node_id: string; - organizations_url: string; - received_events_url: string; - repos_url: string; - site_admin: boolean; - starred_url: string; - subscriptions_url: string; - type: string; - url: string; +type ReposGetResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; }; -type ReposAddCollaboratorResponseInvitee = { +type ReposGetResponseParentPermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type ReposGetResponseParentOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -7815,17 +8065,89 @@ type ReposAddCollaboratorResponseInvitee = { type: string; url: string; }; -type ReposAddCollaboratorResponse = { +type ReposGetResponseParent = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; html_url: string; id: number; - invitee: ReposAddCollaboratorResponseInvitee; - inviter: ReposAddCollaboratorResponseInviter; - permissions: string; - repository: ReposAddCollaboratorResponseRepository; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposGetResponseParentOwner; + permissions: ReposGetResponseParentPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; url: string; + visibility: string; + watchers_count: number; }; -type ReactionsListForTeamDiscussionCommentResponseItemUser = { +type ReposGetResponseOwner = { avatar_url: string; events_url: string; followers_url: string; @@ -7845,14 +8167,7 @@ type ReactionsListForTeamDiscussionCommentResponseItemUser = { type: string; url: string; }; -type ReactionsListForTeamDiscussionCommentResponseItem = { - content: string; - created_at: string; - id: number; - node_id: string; - user: ReactionsListForTeamDiscussionCommentResponseItemUser; -}; -type ReactionsListForTeamDiscussionResponseItemUser = { +type ReposGetResponseOrganization = { avatar_url: string; events_url: string; followers_url: string; @@ -7872,7 +8187,1641 @@ type ReactionsListForTeamDiscussionResponseItemUser = { type: string; url: string; }; -type ReactionsListForTeamDiscussionResponseItem = { +type ReposGetResponseLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; +}; +type ReposGetResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: ReposGetResponseLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + organization: ReposGetResponseOrganization; + owner: ReposGetResponseOwner; + parent: ReposGetResponseParent; + permissions: ReposGetResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + source: ReposGetResponseSource; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; +}; +type ReposEnablePagesSiteResponseSource = { + branch: string; + directory: string; +}; +type ReposEnablePagesSiteResponse = { + cname: string; + custom_404: boolean; + html_url: string; + source: ReposEnablePagesSiteResponseSource; + status: string; + url: string; +}; +type ReposDeleteFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; +}; +type ReposDeleteFileResponseCommitTree = { sha: string; url: string }; +type ReposDeleteFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; +}; +type ReposDeleteFileResponseCommitCommitter = { + date: string; + email: string; + name: string; +}; +type ReposDeleteFileResponseCommitAuthor = { + date: string; + email: string; + name: string; +}; +type ReposDeleteFileResponseCommit = { + author: ReposDeleteFileResponseCommitAuthor; + committer: ReposDeleteFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposDeleteFileResponseCommitTree; + url: string; + verification: ReposDeleteFileResponseCommitVerification; +}; +type ReposDeleteFileResponse = { + commit: ReposDeleteFileResponseCommit; + content: null; +}; +type ReposDeleteResponse = { documentation_url: string; message: string }; +type ReposCreateUsingTemplateResponseTemplateRepositoryPermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type ReposCreateUsingTemplateResponseTemplateRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCreateUsingTemplateResponseTemplateRepository = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateUsingTemplateResponseTemplateRepositoryOwner; + permissions: ReposCreateUsingTemplateResponseTemplateRepositoryPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; +}; +type ReposCreateUsingTemplateResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type ReposCreateUsingTemplateResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCreateUsingTemplateResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateUsingTemplateResponseOwner; + permissions: ReposCreateUsingTemplateResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: ReposCreateUsingTemplateResponseTemplateRepository; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; +}; +type ReposCreateStatusResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCreateStatusResponse = { + avatar_url: string; + context: string; + created_at: string; + creator: ReposCreateStatusResponseCreator; + description: string; + id: number; + node_id: string; + state: string; + target_url: string; + updated_at: string; + url: string; +}; +type ReposCreateReleaseResponseAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCreateReleaseResponse = { + assets: Array; + assets_url: string; + author: ReposCreateReleaseResponseAuthor; + body: string; + created_at: string; + draft: boolean; + html_url: string; + id: number; + name: string; + node_id: string; + prerelease: boolean; + published_at: string; + tag_name: string; + tarball_url: string; + target_commitish: string; + upload_url: string; + url: string; + zipball_url: string; +}; +type ReposCreateOrUpdateFileResponseContentLinks = { + git: string; + html: string; + self: string; +}; +type ReposCreateOrUpdateFileResponseContent = { + _links: ReposCreateOrUpdateFileResponseContentLinks; + download_url: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; +}; +type ReposCreateOrUpdateFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; +}; +type ReposCreateOrUpdateFileResponseCommitTree = { sha: string; url: string }; +type ReposCreateOrUpdateFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; +}; +type ReposCreateOrUpdateFileResponseCommitCommitter = { + date: string; + email: string; + name: string; +}; +type ReposCreateOrUpdateFileResponseCommitAuthor = { + date: string; + email: string; + name: string; +}; +type ReposCreateOrUpdateFileResponseCommit = { + author: ReposCreateOrUpdateFileResponseCommitAuthor; + committer: ReposCreateOrUpdateFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposCreateOrUpdateFileResponseCommitTree; + url: string; + verification: ReposCreateOrUpdateFileResponseCommitVerification; +}; +type ReposCreateOrUpdateFileResponse = { + commit: ReposCreateOrUpdateFileResponseCommit; + content: ReposCreateOrUpdateFileResponseContent; +}; +type ReposCreateInOrgResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type ReposCreateInOrgResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCreateInOrgResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateInOrgResponseOwner; + permissions: ReposCreateInOrgResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; +}; +type ReposCreateHookResponseLastResponse = { + code: null; + message: null; + status: string; +}; +type ReposCreateHookResponseConfig = { + content_type: string; + insecure_ssl: string; + url: string; +}; +type ReposCreateHookResponse = { + active: boolean; + config: ReposCreateHookResponseConfig; + created_at: string; + events: Array; + id: number; + last_response: ReposCreateHookResponseLastResponse; + name: string; + ping_url: string; + test_url: string; + type: string; + updated_at: string; + url: string; +}; +type ReposCreateForkResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type ReposCreateForkResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCreateForkResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateForkResponseOwner; + permissions: ReposCreateForkResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; +}; +type ReposCreateForAuthenticatedUserResponsePermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type ReposCreateForAuthenticatedUserResponseOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCreateForAuthenticatedUserResponse = { + allow_merge_commit: boolean; + allow_rebase_merge: boolean; + allow_squash_merge: boolean; + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: ReposCreateForAuthenticatedUserResponseOwner; + permissions: ReposCreateForAuthenticatedUserResponsePermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; +}; +type ReposCreateFileResponseContentLinks = { + git: string; + html: string; + self: string; +}; +type ReposCreateFileResponseContent = { + _links: ReposCreateFileResponseContentLinks; + download_url: string; + git_url: string; + html_url: string; + name: string; + path: string; + sha: string; + size: number; + type: string; + url: string; +}; +type ReposCreateFileResponseCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; +}; +type ReposCreateFileResponseCommitTree = { sha: string; url: string }; +type ReposCreateFileResponseCommitParentsItem = { + html_url: string; + sha: string; + url: string; +}; +type ReposCreateFileResponseCommitCommitter = { + date: string; + email: string; + name: string; +}; +type ReposCreateFileResponseCommitAuthor = { + date: string; + email: string; + name: string; +}; +type ReposCreateFileResponseCommit = { + author: ReposCreateFileResponseCommitAuthor; + committer: ReposCreateFileResponseCommitCommitter; + html_url: string; + message: string; + node_id: string; + parents: Array; + sha: string; + tree: ReposCreateFileResponseCommitTree; + url: string; + verification: ReposCreateFileResponseCommitVerification; +}; +type ReposCreateFileResponse = { + commit: ReposCreateFileResponseCommit; + content: ReposCreateFileResponseContent; +}; +type ReposCreateDeploymentStatusResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCreateDeploymentStatusResponse = { + created_at: string; + creator: ReposCreateDeploymentStatusResponseCreator; + deployment_url: string; + description: string; + environment: string; + environment_url: string; + id: number; + log_url: string; + node_id: string; + repository_url: string; + state: string; + target_url: string; + updated_at: string; + url: string; +}; +type ReposCreateDeploymentResponsePayload = { deploy: string }; +type ReposCreateDeploymentResponseCreator = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCreateDeploymentResponse = { + created_at: string; + creator: ReposCreateDeploymentResponseCreator; + description: string; + environment: string; + id: number; + node_id: string; + original_environment: string; + payload: ReposCreateDeploymentResponsePayload; + production_environment: boolean; + ref: string; + repository_url: string; + sha: string; + statuses_url: string; + task: string; + transient_environment: boolean; + updated_at: string; + url: string; +}; +type ReposCreateCommitCommentResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCreateCommitCommentResponse = { + body: string; + commit_id: string; + created_at: string; + html_url: string; + id: number; + line: number; + node_id: string; + path: string; + position: number; + updated_at: string; + url: string; + user: ReposCreateCommitCommentResponseUser; +}; +type ReposCompareCommitsResponseMergeBaseCommitParentsItem = { + sha: string; + url: string; +}; +type ReposCompareCommitsResponseMergeBaseCommitCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCompareCommitsResponseMergeBaseCommitCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; +}; +type ReposCompareCommitsResponseMergeBaseCommitCommitTree = { + sha: string; + url: string; +}; +type ReposCompareCommitsResponseMergeBaseCommitCommitCommitter = { + date: string; + email: string; + name: string; +}; +type ReposCompareCommitsResponseMergeBaseCommitCommitAuthor = { + date: string; + email: string; + name: string; +}; +type ReposCompareCommitsResponseMergeBaseCommitCommit = { + author: ReposCompareCommitsResponseMergeBaseCommitCommitAuthor; + comment_count: number; + committer: ReposCompareCommitsResponseMergeBaseCommitCommitCommitter; + message: string; + tree: ReposCompareCommitsResponseMergeBaseCommitCommitTree; + url: string; + verification: ReposCompareCommitsResponseMergeBaseCommitCommitVerification; +}; +type ReposCompareCommitsResponseMergeBaseCommitAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCompareCommitsResponseMergeBaseCommit = { + author: ReposCompareCommitsResponseMergeBaseCommitAuthor; + comments_url: string; + commit: ReposCompareCommitsResponseMergeBaseCommitCommit; + committer: ReposCompareCommitsResponseMergeBaseCommitCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; +}; +type ReposCompareCommitsResponseFilesItem = { + additions: number; + blob_url: string; + changes: number; + contents_url: string; + deletions: number; + filename: string; + patch: string; + raw_url: string; + sha: string; + status: string; +}; +type ReposCompareCommitsResponseCommitsItemParentsItem = { + sha: string; + url: string; +}; +type ReposCompareCommitsResponseCommitsItemCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCompareCommitsResponseCommitsItemCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; +}; +type ReposCompareCommitsResponseCommitsItemCommitTree = { + sha: string; + url: string; +}; +type ReposCompareCommitsResponseCommitsItemCommitCommitter = { + date: string; + email: string; + name: string; +}; +type ReposCompareCommitsResponseCommitsItemCommitAuthor = { + date: string; + email: string; + name: string; +}; +type ReposCompareCommitsResponseCommitsItemCommit = { + author: ReposCompareCommitsResponseCommitsItemCommitAuthor; + comment_count: number; + committer: ReposCompareCommitsResponseCommitsItemCommitCommitter; + message: string; + tree: ReposCompareCommitsResponseCommitsItemCommitTree; + url: string; + verification: ReposCompareCommitsResponseCommitsItemCommitVerification; +}; +type ReposCompareCommitsResponseCommitsItemAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCompareCommitsResponseCommitsItem = { + author: ReposCompareCommitsResponseCommitsItemAuthor; + comments_url: string; + commit: ReposCompareCommitsResponseCommitsItemCommit; + committer: ReposCompareCommitsResponseCommitsItemCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; +}; +type ReposCompareCommitsResponseBaseCommitParentsItem = { + sha: string; + url: string; +}; +type ReposCompareCommitsResponseBaseCommitCommitter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCompareCommitsResponseBaseCommitCommitVerification = { + payload: null; + reason: string; + signature: null; + verified: boolean; +}; +type ReposCompareCommitsResponseBaseCommitCommitTree = { + sha: string; + url: string; +}; +type ReposCompareCommitsResponseBaseCommitCommitCommitter = { + date: string; + email: string; + name: string; +}; +type ReposCompareCommitsResponseBaseCommitCommitAuthor = { + date: string; + email: string; + name: string; +}; +type ReposCompareCommitsResponseBaseCommitCommit = { + author: ReposCompareCommitsResponseBaseCommitCommitAuthor; + comment_count: number; + committer: ReposCompareCommitsResponseBaseCommitCommitCommitter; + message: string; + tree: ReposCompareCommitsResponseBaseCommitCommitTree; + url: string; + verification: ReposCompareCommitsResponseBaseCommitCommitVerification; +}; +type ReposCompareCommitsResponseBaseCommitAuthor = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposCompareCommitsResponseBaseCommit = { + author: ReposCompareCommitsResponseBaseCommitAuthor; + comments_url: string; + commit: ReposCompareCommitsResponseBaseCommitCommit; + committer: ReposCompareCommitsResponseBaseCommitCommitter; + html_url: string; + node_id: string; + parents: Array; + sha: string; + url: string; +}; +type ReposCompareCommitsResponse = { + ahead_by: number; + base_commit: ReposCompareCommitsResponseBaseCommit; + behind_by: number; + commits: Array; + diff_url: string; + files: Array; + html_url: string; + merge_base_commit: ReposCompareCommitsResponseMergeBaseCommit; + patch_url: string; + permalink_url: string; + status: string; + total_commits: number; + url: string; +}; +type ReposAddProtectedBranchUserRestrictionsResponseItem = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposAddProtectedBranchTeamRestrictionsResponseItem = { + description: string; + html_url: string; + id: number; + members_url: string; + name: string; + node_id: string; + parent: null; + permission: string; + privacy: string; + repositories_url: string; + slug: string; + url: string; +}; +type ReposAddProtectedBranchRequiredSignaturesResponse = { + enabled: boolean; + url: string; +}; +type ReposAddProtectedBranchAppRestrictionsResponseItemPermissions = { + contents: string; + issues: string; + metadata: string; + single_file: string; +}; +type ReposAddProtectedBranchAppRestrictionsResponseItemOwner = { + avatar_url: string; + description: string; + events_url: string; + hooks_url: string; + id: number; + issues_url: string; + login: string; + members_url: string; + node_id: string; + public_members_url: string; + repos_url: string; + url: string; +}; +type ReposAddProtectedBranchAppRestrictionsResponseItem = { + created_at: string; + description: string; + events: Array; + external_url: string; + html_url: string; + id: number; + name: string; + node_id: string; + owner: ReposAddProtectedBranchAppRestrictionsResponseItemOwner; + permissions: ReposAddProtectedBranchAppRestrictionsResponseItemPermissions; + slug: string; + updated_at: string; +}; +type ReposAddProtectedBranchAdminEnforcementResponse = { + enabled: boolean; + url: string; +}; +type ReposAddDeployKeyResponse = { + created_at: string; + id: number; + key: string; + read_only: boolean; + title: string; + url: string; + verified: boolean; +}; +type ReposAddCollaboratorResponseRepositoryOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposAddCollaboratorResponseRepository = { + archive_url: string; + assignees_url: string; + blobs_url: string; + branches_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + deployments_url: string; + description: string; + downloads_url: string; + events_url: string; + fork: boolean; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + html_url: string; + id: number; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + languages_url: string; + merges_url: string; + milestones_url: string; + name: string; + node_id: string; + notifications_url: string; + owner: ReposAddCollaboratorResponseRepositoryOwner; + private: boolean; + pulls_url: string; + releases_url: string; + ssh_url: string; + stargazers_url: string; + statuses_url: string; + subscribers_url: string; + subscription_url: string; + tags_url: string; + teams_url: string; + trees_url: string; + url: string; +}; +type ReposAddCollaboratorResponseInviter = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposAddCollaboratorResponseInvitee = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReposAddCollaboratorResponse = { + created_at: string; + html_url: string; + id: number; + invitee: ReposAddCollaboratorResponseInvitee; + inviter: ReposAddCollaboratorResponseInviter; + permissions: string; + repository: ReposAddCollaboratorResponseRepository; + url: string; +}; +type ReactionsListForTeamDiscussionLegacyResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReactionsListForTeamDiscussionLegacyResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionLegacyResponseItemUser; +}; +type ReactionsListForTeamDiscussionInOrgResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReactionsListForTeamDiscussionInOrgResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionInOrgResponseItemUser; +}; +type ReactionsListForTeamDiscussionCommentLegacyResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReactionsListForTeamDiscussionCommentLegacyResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionCommentLegacyResponseItemUser; +}; +type ReactionsListForTeamDiscussionCommentInOrgResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReactionsListForTeamDiscussionCommentInOrgResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionCommentInOrgResponseItemUser; +}; +type ReactionsListForTeamDiscussionCommentResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReactionsListForTeamDiscussionCommentResponseItem = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsListForTeamDiscussionCommentResponseItemUser; +}; +type ReactionsListForTeamDiscussionResponseItemUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReactionsListForTeamDiscussionResponseItem = { content: string; created_at: string; id: number; @@ -7987,6 +9936,114 @@ type ReactionsListForCommitCommentResponseItem = { node_id: string; user: ReactionsListForCommitCommentResponseItemUser; }; +type ReactionsCreateForTeamDiscussionLegacyResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReactionsCreateForTeamDiscussionLegacyResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionLegacyResponseUser; +}; +type ReactionsCreateForTeamDiscussionInOrgResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReactionsCreateForTeamDiscussionInOrgResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionInOrgResponseUser; +}; +type ReactionsCreateForTeamDiscussionCommentLegacyResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReactionsCreateForTeamDiscussionCommentLegacyResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionCommentLegacyResponseUser; +}; +type ReactionsCreateForTeamDiscussionCommentInOrgResponseUser = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type ReactionsCreateForTeamDiscussionCommentInOrgResponse = { + content: string; + created_at: string; + id: number; + node_id: string; + user: ReactionsCreateForTeamDiscussionCommentInOrgResponseUser; +}; type ReactionsCreateForTeamDiscussionCommentResponseUser = { avatar_url: string; events_url: string; @@ -8516,11 +10573,13 @@ type PullsUpdateResponseHeadRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsUpdateResponseHead = { @@ -8648,11 +10707,13 @@ type PullsUpdateResponseBaseRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsUpdateResponseBase = { @@ -8804,6 +10865,7 @@ type PullsSubmitReviewResponse = { node_id: string; pull_request_url: string; state: string; + submitted_at: string; user: PullsSubmitReviewResponseUser; }; type PullsMergeResponse = { merged: boolean; message: string; sha: string }; @@ -8842,6 +10904,7 @@ type PullsListReviewsResponseItem = { node_id: string; pull_request_url: string; state: string; + submitted_at: string; user: PullsListReviewsResponseItemUser; }; type PullsListReviewRequestsResponseUsersItem = { @@ -9301,11 +11364,13 @@ type PullsListResponseItemHeadRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsListResponseItemHead = { @@ -9433,11 +11498,13 @@ type PullsListResponseItemBaseRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsListResponseItemBase = { @@ -9577,6 +11644,7 @@ type PullsGetReviewResponse = { node_id: string; pull_request_url: string; state: string; + submitted_at: string; user: PullsGetReviewResponseUser; }; type PullsGetCommentsForReviewResponseItemUser = { @@ -9922,11 +11990,13 @@ type PullsGetResponseHeadRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsGetResponseHead = { @@ -10054,11 +12124,13 @@ type PullsGetResponseBaseRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsGetResponseBase = { @@ -10468,11 +12540,13 @@ type PullsCreateReviewRequestResponseHeadRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsCreateReviewRequestResponseHead = { @@ -10600,11 +12674,13 @@ type PullsCreateReviewRequestResponseBaseRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsCreateReviewRequestResponseBase = { @@ -11035,11 +13111,13 @@ type PullsCreateFromIssueResponseHeadRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsCreateFromIssueResponseHead = { @@ -11167,11 +13245,13 @@ type PullsCreateFromIssueResponseBaseRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsCreateFromIssueResponseBase = { @@ -11639,11 +13719,13 @@ type PullsCreateResponseHeadRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsCreateResponseHead = { @@ -11771,11 +13853,13 @@ type PullsCreateResponseBaseRepo = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type PullsCreateResponseBase = { @@ -12471,6 +14555,9 @@ type OrgsUpdateResponse = { location: string; login: string; members_allowed_repository_creation_type: string; + members_can_create_internal_repositories: boolean; + members_can_create_private_repositories: boolean; + members_can_create_public_repositories: boolean; members_can_create_repositories: boolean; members_url: string; name: string; @@ -12884,6 +14971,9 @@ type OrgsGetResponse = { location: string; login: string; members_allowed_repository_creation_type?: string; + members_can_create_internal_repositories?: boolean; + members_can_create_private_repositories?: boolean; + members_can_create_public_repositories?: boolean; members_can_create_repositories?: boolean; members_url: string; name: string; @@ -13360,11 +15450,13 @@ type MigrationsStartForOrgResponseRepositoriesItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type MigrationsStartForOrgResponseOwner = { @@ -13491,11 +15583,13 @@ type MigrationsStartForAuthenticatedUserResponseRepositoriesItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type MigrationsStartForAuthenticatedUserResponseOwner = { @@ -13556,6 +15650,230 @@ type MigrationsMapCommitAuthorResponse = { remote_name: string; url: string; }; +type MigrationsListReposForUserResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type MigrationsListReposForUserResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type MigrationsListReposForUserResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; +}; +type MigrationsListReposForUserResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: MigrationsListReposForUserResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsListReposForUserResponseItemOwner; + permissions: MigrationsListReposForUserResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; +}; +type MigrationsListReposForOrgResponseItemPermissions = { + admin: boolean; + pull: boolean; + push: boolean; +}; +type MigrationsListReposForOrgResponseItemOwner = { + avatar_url: string; + events_url: string; + followers_url: string; + following_url: string; + gists_url: string; + gravatar_id: string; + html_url: string; + id: number; + login: string; + node_id: string; + organizations_url: string; + received_events_url: string; + repos_url: string; + site_admin: boolean; + starred_url: string; + subscriptions_url: string; + type: string; + url: string; +}; +type MigrationsListReposForOrgResponseItemLicense = { + key: string; + name: string; + node_id: string; + spdx_id: string; + url: string; +}; +type MigrationsListReposForOrgResponseItem = { + archive_url: string; + archived: boolean; + assignees_url: string; + blobs_url: string; + branches_url: string; + clone_url: string; + collaborators_url: string; + comments_url: string; + commits_url: string; + compare_url: string; + contents_url: string; + contributors_url: string; + created_at: string; + default_branch: string; + deployments_url: string; + description: string; + disabled: boolean; + downloads_url: string; + events_url: string; + fork: boolean; + forks_count: number; + forks_url: string; + full_name: string; + git_commits_url: string; + git_refs_url: string; + git_tags_url: string; + git_url: string; + has_downloads: boolean; + has_issues: boolean; + has_pages: boolean; + has_projects: boolean; + has_wiki: boolean; + homepage: string; + hooks_url: string; + html_url: string; + id: number; + is_template: boolean; + issue_comment_url: string; + issue_events_url: string; + issues_url: string; + keys_url: string; + labels_url: string; + language: null; + languages_url: string; + license: MigrationsListReposForOrgResponseItemLicense; + merges_url: string; + milestones_url: string; + mirror_url: string; + name: string; + network_count: number; + node_id: string; + notifications_url: string; + open_issues_count: number; + owner: MigrationsListReposForOrgResponseItemOwner; + permissions: MigrationsListReposForOrgResponseItemPermissions; + private: boolean; + pulls_url: string; + pushed_at: string; + releases_url: string; + size: number; + ssh_url: string; + stargazers_count: number; + stargazers_url: string; + statuses_url: string; + subscribers_count: number; + subscribers_url: string; + subscription_url: string; + svn_url: string; + tags_url: string; + teams_url: string; + temp_clone_token: string; + template_repository: null; + topics: Array; + trees_url: string; + updated_at: string; + url: string; + visibility: string; + watchers_count: number; +}; type MigrationsListForOrgResponseItemRepositoriesItemPermissions = { admin: boolean; pull: boolean; @@ -13654,11 +15972,13 @@ type MigrationsListForOrgResponseItemRepositoriesItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type MigrationsListForOrgResponseItemOwner = { @@ -13785,11 +16105,13 @@ type MigrationsListForAuthenticatedUserResponseItemRepositoriesItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type MigrationsListForAuthenticatedUserResponseItemOwner = { @@ -13924,11 +16246,13 @@ type MigrationsGetStatusForOrgResponseRepositoriesItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type MigrationsGetStatusForOrgResponseOwner = { @@ -14055,11 +16379,13 @@ type MigrationsGetStatusForAuthenticatedUserResponseRepositoriesItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type MigrationsGetStatusForAuthenticatedUserResponseOwner = { @@ -14126,12 +16452,21 @@ type MigrationsGetCommitAuthorsResponseItem = { remote_name: string; url: string; }; +type MetaGetResponseSshKeyFingerprints = { + MD5_DSA: string; + MD5_RSA: string; + SHA256_DSA: string; + SHA256_RSA: string; +}; type MetaGetResponse = { + api: Array; git: Array; hooks: Array; importer: Array; pages: Array; + ssh_key_fingerprints: MetaGetResponseSshKeyFingerprints; verifiable_password_authentication: boolean; + web: Array; }; type LicensesListCommonlyUsedResponseItem = { key: string; @@ -14905,11 +17240,13 @@ type IssuesListForOrgResponseItemRepository = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type IssuesListForOrgResponseItemPullRequest = { @@ -15150,11 +17487,13 @@ type IssuesListForAuthenticatedUserResponseItemRepository = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type IssuesListForAuthenticatedUserResponseItemPullRequest = { @@ -15705,11 +18044,13 @@ type IssuesListResponseItemRepository = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type IssuesListResponseItemPullRequest = { @@ -17994,11 +20335,13 @@ type ChecksSetSuitesPreferencesResponseRepository = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type ChecksSetSuitesPreferencesResponsePreferencesAutoTriggerChecksItem = { @@ -18112,11 +20455,13 @@ type ChecksListSuitesForRefResponseCheckSuitesItemRepository = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type ChecksListSuitesForRefResponseCheckSuitesItemAppPermissions = { @@ -18253,7 +20598,9 @@ type ChecksListForSuiteResponseCheckRunsItem = { name: string; node_id: string; output: ChecksListForSuiteResponseCheckRunsItemOutput; - pull_requests: Array; + pull_requests: Array< + ChecksListForSuiteResponseCheckRunsItemPullRequestsItem + >; started_at: string; status: string; url: string; @@ -18462,11 +20809,13 @@ type ChecksGetSuiteResponseRepository = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type ChecksGetSuiteResponseAppPermissions = { @@ -18702,11 +21051,13 @@ type ChecksCreateSuiteResponseRepository = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type ChecksCreateSuiteResponseAppPermissions = { @@ -19016,11 +21367,13 @@ type AppsListReposResponseRepositoriesItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type AppsListReposResponse = { @@ -19305,11 +21658,13 @@ type AppsListInstallationReposForAuthenticatedUserResponseRepositoriesItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type AppsListInstallationReposForAuthenticatedUserResponse = { @@ -19871,11 +22226,13 @@ type AppsCreateInstallationTokenResponseRepositoriesItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type AppsCreateInstallationTokenResponsePermissions = { @@ -20257,11 +22614,13 @@ type ActivityListWatchedReposForAuthenticatedUserResponseItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type ActivityListStargazersForRepoResponseItem = { @@ -20387,11 +22746,13 @@ type ActivityListReposWatchedByUserResponseItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type ActivityListReposStarredByUserResponseItemPermissions = { @@ -20492,11 +22853,13 @@ type ActivityListReposStarredByUserResponseItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type ActivityListReposStarredByAuthenticatedUserResponseItemPermissions = { @@ -20597,11 +22960,13 @@ type ActivityListReposStarredByAuthenticatedUserResponseItem = { svn_url: string; tags_url: string; teams_url: string; + temp_clone_token: string; template_repository: null; topics: Array; trees_url: string; updated_at: string; url: string; + visibility: string; watchers_count: number; }; type ActivityListNotificationsForRepoResponseItemSubject = { @@ -20972,7 +23337,9 @@ type GistsListCommentsResponse = Array; type GistsListCommitsResponse = Array; type GistsListForksResponse = Array; type GistsListPublicResponse = Array; -type GistsListPublicForUserResponse = Array; +type GistsListPublicForUserResponse = Array< + GistsListPublicForUserResponseItem +>; type GistsListStarredResponse = Array; type GitListMatchingRefsResponse = Array; type GitignoreListTemplatesResponse = Array; @@ -21023,6 +23390,12 @@ type MigrationsListForAuthenticatedUserResponse = Array< MigrationsListForAuthenticatedUserResponseItem >; type MigrationsListForOrgResponse = Array; +type MigrationsListReposForOrgResponse = Array< + MigrationsListReposForOrgResponseItem +>; +type MigrationsListReposForUserResponse = Array< + MigrationsListReposForUserResponseItem +>; type OauthAuthorizationsListAuthorizationsResponse = Array< OauthAuthorizationsListAuthorizationsResponseItem >; @@ -21083,6 +23456,18 @@ type ReactionsListForTeamDiscussionResponse = Array< type ReactionsListForTeamDiscussionCommentResponse = Array< ReactionsListForTeamDiscussionCommentResponseItem >; +type ReactionsListForTeamDiscussionCommentInOrgResponse = Array< + ReactionsListForTeamDiscussionCommentInOrgResponseItem +>; +type ReactionsListForTeamDiscussionCommentLegacyResponse = Array< + ReactionsListForTeamDiscussionCommentLegacyResponseItem +>; +type ReactionsListForTeamDiscussionInOrgResponse = Array< + ReactionsListForTeamDiscussionInOrgResponseItem +>; +type ReactionsListForTeamDiscussionLegacyResponse = Array< + ReactionsListForTeamDiscussionLegacyResponseItem +>; type ReposAddProtectedBranchAppRestrictionsResponse = Array< ReposAddProtectedBranchAppRestrictionsResponseItem >; @@ -21124,7 +23509,9 @@ type ReposListBranchesResponse = Array; type ReposListBranchesForHeadCommitResponse = Array< ReposListBranchesForHeadCommitResponseItem >; -type ReposListCollaboratorsResponse = Array; +type ReposListCollaboratorsResponse = Array< + ReposListCollaboratorsResponseItem +>; type ReposListCommentsForCommitResponse = Array< ReposListCommentsForCommitResponseItem >; @@ -21198,19 +23585,51 @@ type ReposReplaceProtectedBranchUserRestrictionsResponse = Array< >; type TeamsListResponse = Array; type TeamsListChildResponse = Array; +type TeamsListChildInOrgResponse = Array; +type TeamsListChildLegacyResponse = Array; type TeamsListDiscussionCommentsResponse = Array< TeamsListDiscussionCommentsResponseItem >; +type TeamsListDiscussionCommentsInOrgResponse = Array< + TeamsListDiscussionCommentsInOrgResponseItem +>; +type TeamsListDiscussionCommentsLegacyResponse = Array< + TeamsListDiscussionCommentsLegacyResponseItem +>; type TeamsListDiscussionsResponse = Array; +type TeamsListDiscussionsInOrgResponse = Array< + TeamsListDiscussionsInOrgResponseItem +>; +type TeamsListDiscussionsLegacyResponse = Array< + TeamsListDiscussionsLegacyResponseItem +>; type TeamsListForAuthenticatedUserResponse = Array< TeamsListForAuthenticatedUserResponseItem >; type TeamsListMembersResponse = Array; +type TeamsListMembersInOrgResponse = Array; +type TeamsListMembersLegacyResponse = Array< + TeamsListMembersLegacyResponseItem +>; type TeamsListPendingInvitationsResponse = Array< TeamsListPendingInvitationsResponseItem >; +type TeamsListPendingInvitationsInOrgResponse = Array< + TeamsListPendingInvitationsInOrgResponseItem +>; +type TeamsListPendingInvitationsLegacyResponse = Array< + TeamsListPendingInvitationsLegacyResponseItem +>; type TeamsListProjectsResponse = Array; +type TeamsListProjectsInOrgResponse = Array< + TeamsListProjectsInOrgResponseItem +>; +type TeamsListProjectsLegacyResponse = Array< + TeamsListProjectsLegacyResponseItem +>; type TeamsListReposResponse = Array; +type TeamsListReposInOrgResponse = Array; +type TeamsListReposLegacyResponse = Array; type UsersAddEmailsResponse = Array; type UsersListResponse = Array; type UsersListBlockedResponse = Array; @@ -21240,33 +23659,465 @@ type UsersTogglePrimaryEmailVisibilityResponse = Array< UsersTogglePrimaryEmailVisibilityResponseItem >; -// param types -type ActivityCheckStarringRepoParams = { - owner: string; +// param types +export type ActivityCheckStarringRepoParams = { + owner: string; + + repo: string; +}; +export type ActivityCheckWatchingRepoLegacyParams = { + owner: string; + + repo: string; +}; +export type ActivityDeleteRepoSubscriptionParams = { + owner: string; + + repo: string; +}; +export type ActivityDeleteThreadSubscriptionParams = { + thread_id: number; +}; +export type ActivityGetRepoSubscriptionParams = { + owner: string; + + repo: string; +}; +export type ActivityGetThreadParams = { + thread_id: number; +}; +export type ActivityGetThreadSubscriptionParams = { + thread_id: number; +}; +export type ActivityListEventsForOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; +}; +export type ActivityListEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; +}; +export type ActivityListNotificationsParams = { + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + before?: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; +}; +export type ActivityListNotificationsForRepoParams = { + /** + * If `true`, show notifications marked as read. + */ + all?: boolean; + /** + * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + before?: string; + + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * If `true`, only shows notifications in which the user is directly participating or mentioned. + */ + participating?: boolean; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; + /** + * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; +}; +export type ActivityListPublicEventsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; +}; +export type ActivityListPublicEventsForOrgParams = { + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; +}; +export type ActivityListPublicEventsForRepoNetworkParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; +}; +export type ActivityListPublicEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; +}; +export type ActivityListReceivedEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; +}; +export type ActivityListReceivedPublicEventsForUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; +}; +export type ActivityListRepoEventsParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; +}; +export type ActivityListReposStarredByAuthenticatedUserParams = { + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; +}; +export type ActivityListReposStarredByUserParams = { + /** + * One of `asc` (ascending) or `desc` (descending). + */ + direction?: "asc" | "desc"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + */ + sort?: "created" | "updated"; + + username: string; +}; +export type ActivityListReposWatchedByUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + username: string; +}; +export type ActivityListStargazersForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; +}; +export type ActivityListWatchedReposForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; +}; +export type ActivityListWatchersForRepoParams = { + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; +}; +export type ActivityMarkAsReadParams = { + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; +}; +export type ActivityMarkNotificationsAsReadForRepoParams = { + /** + * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string; + + owner: string; + + repo: string; +}; +export type ActivityMarkThreadAsReadParams = { + thread_id: number; +}; +export type ActivitySetRepoSubscriptionParams = { + /** + * Determines if all notifications should be blocked from this repository. + */ + ignored?: boolean; + + owner: string; + + repo: string; + /** + * Determines if notifications should be received from this repository. + */ + subscribed?: boolean; +}; +export type ActivitySetThreadSubscriptionParams = { + /** + * Unsubscribes and subscribes you to a conversation. Set `ignored` to `true` to block all notifications from this thread. + */ + ignored?: boolean; + + thread_id: number; +}; +export type ActivityStarRepoParams = { + owner: string; + + repo: string; +}; +export type ActivityStopWatchingRepoLegacyParams = { + owner: string; + + repo: string; +}; +export type ActivityUnstarRepoParams = { + owner: string; + + repo: string; +}; +export type ActivityWatchRepoLegacyParams = { + owner: string; + + repo: string; +}; +export type AppsAddRepoToInstallationParams = { + installation_id: number; + + repository_id: number; +}; +export type AppsCheckAccountIsAssociatedWithAnyParams = { + account_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; +}; +export type AppsCheckAccountIsAssociatedWithAnyStubbedParams = { + account_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; +}; +export type AppsCheckAuthorizationParams = { + access_token: string; + + client_id: string; +}; +export type AppsCheckTokenParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; - repo: string; + client_id: string; }; -type ActivityDeleteRepoSubscriptionParams = { - owner: string; +export type AppsCreateContentAttachmentParams = { + /** + * The body text of the content attachment displayed in the body or comment of an issue or pull request. This parameter supports markdown. + */ + body: string; - repo: string; + content_reference_id: number; + /** + * The title of the content attachment displayed in the body or comment of an issue or pull request. + */ + title: string; }; -type ActivityDeleteThreadSubscriptionParams = { - thread_id: number; +export type AppsCreateFromManifestParams = { + code: string; +}; +export type AppsCreateInstallationTokenParams = { + installation_id: number; + /** + * The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see "[GitHub App permissions](https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url-parameters/#github-app-permissions)." + */ + permissions?: AppsCreateInstallationTokenParamsPermissions; + /** + * The `id`s of the repositories that the installation token can access. Providing repository `id`s restricts the access of an installation token to specific repositories. You can use the "[List repositories](https://developer.github.com/v3/apps/installations/#list-repositories)" endpoint to get the `id` of all repositories that an installation can access. For example, you can select specific repositories when creating an installation token to restrict the number of repositories that can be cloned using the token. + */ + repository_ids?: number[]; +}; +export type AppsDeleteAuthorizationParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; +}; +export type AppsDeleteInstallationParams = { + installation_id: number; +}; +export type AppsDeleteTokenParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; +}; +export type AppsFindOrgInstallationParams = { + org: string; }; -type ActivityGetRepoSubscriptionParams = { +export type AppsFindRepoInstallationParams = { owner: string; repo: string; }; -type ActivityGetThreadParams = { - thread_id: number; +export type AppsFindUserInstallationParams = { + username: string; }; -type ActivityGetThreadSubscriptionParams = { - thread_id: number; +export type AppsGetBySlugParams = { + app_slug: string; +}; +export type AppsGetInstallationParams = { + installation_id: number; }; -type ActivityListEventsForOrgParams = { +export type AppsGetOrgInstallationParams = { org: string; +}; +export type AppsGetRepoInstallationParams = { + owner: string; + + repo: string; +}; +export type AppsGetUserInstallationParams = { + username: string; +}; +export type AppsListAccountsUserOrOrgOnPlanParams = { + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; /** * Page number of the results to fetch. */ @@ -21276,9 +24127,17 @@ type ActivityListEventsForOrgParams = { */ per_page?: number; - username: string; + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; }; -type ActivityListEventsForUserParams = { +export type AppsListAccountsUserOrOrgOnPlanStubbedParams = { + /** + * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + */ + direction?: "asc" | "desc"; /** * Page number of the results to fetch. */ @@ -21288,65 +24147,202 @@ type ActivityListEventsForUserParams = { */ per_page?: number; - username: string; + plan_id: number; + /** + * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. + */ + sort?: "created" | "updated"; }; -type ActivityListNotificationsParams = { +export type AppsListInstallationReposForAuthenticatedUserParams = { + installation_id: number; /** - * If `true`, show notifications marked as read. + * Page number of the results to fetch. */ - all?: boolean; + page?: number; /** - * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * Results per page (max 100) */ - before?: string; + per_page?: number; +}; +export type AppsListInstallationsParams = { /** * Page number of the results to fetch. */ page?: number; /** - * If `true`, only shows notifications in which the user is directly participating or mentioned. + * Results per page (max 100) */ - participating?: boolean; + per_page?: number; +}; +export type AppsListInstallationsForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; /** * Results per page (max 100) */ per_page?: number; +}; +export type AppsListMarketplacePurchasesForAuthenticatedUserParams = { /** - * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * Page number of the results to fetch. */ - since?: string; + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; }; -type ActivityListNotificationsForRepoParams = { +export type AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams = { /** - * If `true`, show notifications marked as read. + * Page number of the results to fetch. */ - all?: boolean; + page?: number; /** - * Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * Results per page (max 100) */ - before?: string; - - owner: string; + per_page?: number; +}; +export type AppsListPlansParams = { /** * Page number of the results to fetch. */ page?: number; /** - * If `true`, only shows notifications in which the user is directly participating or mentioned. + * Results per page (max 100) */ - participating?: boolean; + per_page?: number; +}; +export type AppsListPlansStubbedParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; +}; +export type AppsListReposParams = { + /** + * Page number of the results to fetch. + */ + page?: number; /** * Results per page (max 100) */ per_page?: number; +}; +export type AppsRemoveRepoFromInstallationParams = { + installation_id: number; + + repository_id: number; +}; +export type AppsResetAuthorizationParams = { + access_token: string; + + client_id: string; +}; +export type AppsResetTokenParams = { + /** + * The OAuth access token used to authenticate to the GitHub API. + */ + access_token?: string; + + client_id: string; +}; +export type AppsRevokeAuthorizationForApplicationParams = { + access_token: string; + + client_id: string; +}; +export type AppsRevokeGrantForApplicationParams = { + access_token: string; + + client_id: string; +}; +export type ChecksCreateParams = { + /** + * Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://developer.github.com/v3/activity/events/types/#checkrunevent) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksCreateParamsActions[]; + /** + * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * The SHA of the commit. + */ + head_sha: string; + /** + * The name of the check. For example, "code-coverage". + */ + name: string; + /** + * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object) description. + */ + output?: ChecksCreateParamsOutput; + + owner: string; repo: string; /** - * Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: string; + started_at?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; +}; +export type ChecksCreateSuiteParams = { + /** + * The sha of the head commit. + */ + head_sha: string; + + owner: string; + + repo: string; +}; +export type ChecksGetParams = { + check_run_id: number; + + owner: string; + + repo: string; +}; +export type ChecksGetSuiteParams = { + check_suite_id: number; + + owner: string; + + repo: string; }; -type ActivityListPublicEventsParams = { +export type ChecksListAnnotationsParams = { + check_run_id: number; + + owner: string; /** * Page number of the results to fetch. */ @@ -21355,9 +24351,20 @@ type ActivityListPublicEventsParams = { * Results per page (max 100) */ per_page?: number; + + repo: string; }; -type ActivityListPublicEventsForOrgParams = { - org: string; +export type ChecksListForRefParams = { + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + + owner: string; /** * Page number of the results to fetch. */ @@ -21366,8 +24373,27 @@ type ActivityListPublicEventsForOrgParams = { * Results per page (max 100) */ per_page?: number; + + ref: string; + + repo: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; }; -type ActivityListPublicEventsForRepoNetworkParams = { +export type ChecksListForSuiteParams = { + /** + * Returns check runs with the specified `name`. + */ + check_name?: string; + + check_suite_id: number; + /** + * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + */ + filter?: "latest" | "all"; + owner: string; /** * Page number of the results to fetch. @@ -21379,8 +24405,22 @@ type ActivityListPublicEventsForRepoNetworkParams = { per_page?: number; repo: string; + /** + * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; }; -type ActivityListPublicEventsForUserParams = { +export type ChecksListSuitesForRefParams = { + /** + * Filters check suites by GitHub App `id`. + */ + app_id?: number; + /** + * Filters checks suites by the name of the [check run](https://developer.github.com/v3/checks/runs/). + */ + check_name?: string; + + owner: string; /** * Page number of the results to fetch. */ @@ -21390,9 +24430,136 @@ type ActivityListPublicEventsForUserParams = { */ per_page?: number; - username: string; + ref: string; + + repo: string; +}; +export type ChecksRerequestSuiteParams = { + check_suite_id: number; + + owner: string; + + repo: string; +}; +export type ChecksSetSuitesPreferencesParams = { + /** + * Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://developer.github.com/v3/checks/suites/#auto_trigger_checks-object) description for details. + */ + auto_trigger_checks?: ChecksSetSuitesPreferencesParamsAutoTriggerChecks[]; + + owner: string; + + repo: string; +}; +export type ChecksUpdateParams = { + /** + * Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + */ + actions?: ChecksUpdateParamsActions[]; + + check_run_id: number; + /** + * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string; + /** + * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + */ + conclusion?: + | "success" + | "failure" + | "neutral" + | "cancelled" + | "timed_out" + | "action_required"; + /** + * The URL of the integrator's site that has the full details of the check. + */ + details_url?: string; + /** + * A reference for the run on the integrator's system. + */ + external_id?: string; + /** + * The name of the check. For example, "code-coverage". + */ + name?: string; + /** + * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object-1) description. + */ + output?: ChecksUpdateParamsOutput; + + owner: string; + + repo: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string; + /** + * The current status. Can be one of `queued`, `in_progress`, or `completed`. + */ + status?: "queued" | "in_progress" | "completed"; +}; +export type CodesOfConductGetConductCodeParams = { + key: string; +}; +export type CodesOfConductGetForRepoParams = { + owner: string; + + repo: string; +}; +export type GistsCheckIsStarredParams = { + gist_id: string; +}; +export type GistsCreateParams = { + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * The filenames and content of each file in the gist. The keys in the `files` object represent the filename and have the type `string`. + */ + files: GistsCreateParamsFiles; + /** + * When `true`, the gist will be public and available for anyone to see. + */ + public?: boolean; +}; +export type GistsCreateCommentParams = { + /** + * The comment text. + */ + body: string; + + gist_id: string; +}; +export type GistsDeleteParams = { + gist_id: string; +}; +export type GistsDeleteCommentParams = { + comment_id: number; + + gist_id: string; +}; +export type GistsForkParams = { + gist_id: string; +}; +export type GistsGetParams = { + gist_id: string; +}; +export type GistsGetCommentParams = { + comment_id: number; + + gist_id: string; +}; +export type GistsGetRevisionParams = { + gist_id: string; + + sha: string; }; -type ActivityListReceivedEventsForUserParams = { +export type GistsListParams = { /** * Page number of the results to fetch. */ @@ -21401,10 +24568,13 @@ type ActivityListReceivedEventsForUserParams = { * Results per page (max 100) */ per_page?: number; - - username: string; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; }; -type ActivityListReceivedPublicEventsForUserParams = { +export type GistsListCommentsParams = { + gist_id: string; /** * Page number of the results to fetch. */ @@ -21413,11 +24583,9 @@ type ActivityListReceivedPublicEventsForUserParams = { * Results per page (max 100) */ per_page?: number; - - username: string; }; -type ActivityListRepoEventsParams = { - owner: string; +export type GistsListCommitsParams = { + gist_id: string; /** * Page number of the results to fetch. */ @@ -21426,14 +24594,19 @@ type ActivityListRepoEventsParams = { * Results per page (max 100) */ per_page?: number; - - repo: string; }; -type ActivityListReposStarredByAuthenticatedUserParams = { +export type GistsListForksParams = { + gist_id: string; /** - * One of `asc` (ascending) or `desc` (descending). + * Page number of the results to fetch. */ - direction?: "asc" | "desc"; + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; +}; +export type GistsListPublicParams = { /** * Page number of the results to fetch. */ @@ -21443,15 +24616,27 @@ type ActivityListReposStarredByAuthenticatedUserParams = { */ per_page?: number; /** - * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. */ - sort?: "created" | "updated"; + since?: string; }; -type ActivityListReposStarredByUserParams = { +export type GistsListPublicForUserParams = { /** - * One of `asc` (ascending) or `desc` (descending). + * Page number of the results to fetch. */ - direction?: "asc" | "desc"; + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; + + username: string; +}; +export type GistsListStarredParams = { /** * Page number of the results to fetch. */ @@ -21459,120 +24644,183 @@ type ActivityListReposStarredByUserParams = { /** * Results per page (max 100) */ - per_page?: number; + per_page?: number; + /** + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + */ + since?: string; +}; +export type GistsStarParams = { + gist_id: string; +}; +export type GistsUnstarParams = { + gist_id: string; +}; +export type GistsUpdateParams = { + /** + * A descriptive name for this gist. + */ + description?: string; + /** + * The filenames and content that make up this gist. + */ + files?: GistsUpdateParamsFiles; + + gist_id: string; +}; +export type GistsUpdateCommentParams = { + /** + * The comment text. + */ + body: string; + + comment_id: number; + + gist_id: string; +}; +export type GitCreateBlobParams = { + /** + * The new blob's content. + */ + content: string; + /** + * The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + */ + encoding?: string; + + owner: string; + + repo: string; +}; +export type GitCreateCommitParams = { + /** + * Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. + */ + author?: GitCreateCommitParamsAuthor; + /** + * Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. + */ + committer?: GitCreateCommitParamsCommitter; + /** + * The commit message + */ + message: string; + + owner: string; /** - * One of `created` (when the repository was starred) or `updated` (when it was last pushed to). + * The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ - sort?: "created" | "updated"; + parents: string[]; - username: string; -}; -type ActivityListReposWatchedByUserParams = { + repo: string; /** - * Page number of the results to fetch. + * The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ - page?: number; + signature?: string; /** - * Results per page (max 100) + * The SHA of the tree object this commit points to */ - per_page?: number; - - username: string; + tree: string; }; -type ActivityListStargazersForRepoParams = { +export type GitCreateRefParams = { owner: string; /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) + * The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ - per_page?: number; + ref: string; repo: string; + /** + * The SHA1 value for this reference. + */ + sha: string; }; -type ActivityListWatchedReposForAuthenticatedUserParams = { +export type GitCreateTagParams = { /** - * Page number of the results to fetch. + * The tag message. */ - page?: number; + message: string; /** - * Results per page (max 100) + * The SHA of the git object this is tagging. */ - per_page?: number; -}; -type ActivityListWatchersForRepoParams = { + object: string; + owner: string; + + repo: string; /** - * Page number of the results to fetch. + * The tag's name. This is typically a version (e.g., "v0.0.1"). */ - page?: number; + tag: string; /** - * Results per page (max 100) + * An object with information about the individual creating the tag. */ - per_page?: number; - - repo: string; -}; -type ActivityMarkAsReadParams = { + tagger?: GitCreateTagParamsTagger; /** - * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + * The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. */ - last_read_at?: string; + type: "commit" | "tree" | "blob"; }; -type ActivityMarkNotificationsAsReadForRepoParams = { +export type GitCreateTreeParams = { /** - * Describes the last point that notifications were checked. Anything updated since this time will not be updated. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + * The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. */ - last_read_at?: string; + base_tree?: string; owner: string; repo: string; -}; -type ActivityMarkThreadAsReadParams = { - thread_id: number; -}; -type ActivitySetRepoSubscriptionParams = { /** - * Determines if all notifications should be blocked from this repository. + * Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ - ignored?: boolean; + tree: GitCreateTreeParamsTree[]; +}; +export type GitDeleteRefParams = { + owner: string; + + ref: string; + + repo: string; +}; +export type GitGetBlobParams = { + file_sha: string; owner: string; repo: string; - /** - * Determines if notifications should be received from this repository. - */ - subscribed?: boolean; }; -type ActivitySetThreadSubscriptionParams = { - /** - * Unsubscribes and subscribes you to a conversation. Set `ignored` to `true` to block all notifications from this thread. - */ - ignored?: boolean; +export type GitGetCommitParams = { + commit_sha: string; - thread_id: number; + owner: string; + + repo: string; }; -type ActivityStarRepoParams = { +export type GitGetRefParams = { owner: string; + ref: string; + repo: string; }; -type ActivityUnstarRepoParams = { +export type GitGetTagParams = { owner: string; repo: string; + + tag_sha: string; }; -type AppsAddRepoToInstallationParams = { - installation_id: number; +export type GitGetTreeParams = { + owner: string; - repository_id: number; + recursive?: "1"; + + repo: string; + + tree_sha: string; }; -type AppsCheckAccountIsAssociatedWithAnyParams = { - account_id: number; +export type GitListMatchingRefsParams = { + owner: string; /** * Page number of the results to fetch. */ @@ -21581,354 +24829,309 @@ type AppsCheckAccountIsAssociatedWithAnyParams = { * Results per page (max 100) */ per_page?: number; + + ref: string; + + repo: string; }; -type AppsCheckAccountIsAssociatedWithAnyStubbedParams = { - account_id: number; +export type GitListRefsParams = { /** - * Page number of the results to fetch. + * Filter by sub-namespace (reference prefix). Most commen examples would be `'heads/'` and `'tags/'` to retrieve branches or tags */ + namespace?: string; + + owner: string; + page?: number; - /** - * Results per page (max 100) - */ + per_page?: number; -}; -type AppsCheckAuthorizationParams = { - access_token: string; - client_id: string; + repo: string; }; -type AppsCheckTokenParams = { +export type GitUpdateRefParams = { /** - * The OAuth access token used to authenticate to the GitHub API. + * Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. */ - access_token?: string; + force?: boolean; - client_id: string; -}; -type AppsCreateContentAttachmentParams = { - /** - * The body text of the content attachment displayed in the body or comment of an issue or pull request. This parameter supports markdown. - */ - body: string; + owner: string; - content_reference_id: number; + ref: string; + + repo: string; /** - * The title of the content attachment displayed in the body or comment of an issue or pull request. + * The SHA1 value to set this reference to */ - title: string; -}; -type AppsCreateFromManifestParams = { - code: string; + sha: string; }; -type AppsCreateInstallationTokenParams = { - installation_id: number; - /** - * The permissions granted to the access token. The permissions object includes the permission names and their access type. For a complete list of permissions and allowable values, see "[GitHub App permissions](https://developer.github.com/apps/building-github-apps/creating-github-apps-using-url-parameters/#github-app-permissions)." - */ - permissions?: AppsCreateInstallationTokenParamsPermissions; - /** - * The `id`s of the repositories that the installation token can access. Providing repository `id`s restricts the access of an installation token to specific repositories. You can use the "[List repositories](https://developer.github.com/v3/apps/installations/#list-repositories)" endpoint to get the `id` of all repositories that an installation can access. For example, you can select specific repositories when creating an installation token to restrict the number of repositories that can be cloned using the token. - */ - repository_ids?: number[]; +export type GitignoreGetTemplateParams = { + name: string; }; -type AppsDeleteAuthorizationParams = { +export type InteractionsAddOrUpdateRestrictionsForOrgParams = { /** - * The OAuth access token used to authenticate to the GitHub API. + * Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. */ - access_token?: string; + limit: "existing_users" | "contributors_only" | "collaborators_only"; - client_id: string; -}; -type AppsDeleteInstallationParams = { - installation_id: number; + org: string; }; -type AppsDeleteTokenParams = { +export type InteractionsAddOrUpdateRestrictionsForRepoParams = { /** - * The OAuth access token used to authenticate to the GitHub API. + * Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. */ - access_token?: string; + limit: "existing_users" | "contributors_only" | "collaborators_only"; - client_id: string; + owner: string; + + repo: string; }; -type AppsFindOrgInstallationParams = { +export type InteractionsGetRestrictionsForOrgParams = { org: string; }; -type AppsFindRepoInstallationParams = { +export type InteractionsGetRestrictionsForRepoParams = { owner: string; repo: string; }; -type AppsFindUserInstallationParams = { - username: string; -}; -type AppsGetBySlugParams = { - app_slug: string; -}; -type AppsGetInstallationParams = { - installation_id: number; -}; -type AppsGetOrgInstallationParams = { +export type InteractionsRemoveRestrictionsForOrgParams = { org: string; }; -type AppsGetRepoInstallationParams = { +export type InteractionsRemoveRestrictionsForRepoParams = { owner: string; repo: string; }; -type AppsGetUserInstallationParams = { - username: string; -}; -type AppsListAccountsUserOrOrgOnPlanParams = { - /** - * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. - */ - direction?: "asc" | "desc"; +export type IssuesAddAssigneesParamsDeprecatedNumber = { /** - * Page number of the results to fetch. + * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ - page?: number; + assignees?: string[]; /** - * Results per page (max 100) + * @deprecated "number" parameter renamed to "issue_number" */ - per_page?: number; + number: number; - plan_id: number; - /** - * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. - */ - sort?: "created" | "updated"; + owner: string; + + repo: string; }; -type AppsListAccountsUserOrOrgOnPlanStubbedParams = { +export type IssuesAddAssigneesParams = { /** - * To return the oldest accounts first, set to `asc`. Can be one of `asc` or `desc`. Ignored without the `sort` parameter. + * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ - direction?: "asc" | "desc"; + assignees?: string[]; + + issue_number: number; + + owner: string; + + repo: string; +}; +export type IssuesAddLabelsParamsDeprecatedNumber = { /** - * Page number of the results to fetch. + * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. */ - page?: number; + labels: string[]; /** - * Results per page (max 100) + * @deprecated "number" parameter renamed to "issue_number" */ - per_page?: number; + number: number; - plan_id: number; - /** - * Sorts the GitHub accounts by the date they were created or last updated. Can be one of `created` or `updated`. - */ - sort?: "created" | "updated"; + owner: string; + + repo: string; }; -type AppsListInstallationReposForAuthenticatedUserParams = { - installation_id: number; - /** - * Page number of the results to fetch. - */ - page?: number; +export type IssuesAddLabelsParams = { + issue_number: number; /** - * Results per page (max 100) + * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. */ - per_page?: number; + labels: string[]; + + owner: string; + + repo: string; +}; +export type IssuesCheckAssigneeParams = { + assignee: string; + + owner: string; + + repo: string; }; -type AppsListInstallationsParams = { +export type IssuesCreateParamsDeprecatedAssignee = { /** - * Page number of the results to fetch. + * Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ + * @deprecated "assignee" parameter has been deprecated and will be removed in future */ - page?: number; + assignee?: string; /** - * Results per page (max 100) + * Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - per_page?: number; -}; -type AppsListInstallationsForAuthenticatedUserParams = { + assignees?: string[]; /** - * Page number of the results to fetch. + * The contents of the issue. */ - page?: number; + body?: string; /** - * Results per page (max 100) + * Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ - per_page?: number; -}; -type AppsListMarketplacePurchasesForAuthenticatedUserParams = { + labels?: string[]; /** - * Page number of the results to fetch. + * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ */ - page?: number; + milestone?: number; + + owner: string; + + repo: string; /** - * Results per page (max 100) + * The title of the issue. */ - per_page?: number; + title: string; }; -type AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams = { - /** - * Page number of the results to fetch. - */ - page?: number; +export type IssuesCreateParams = { /** - * Results per page (max 100) + * Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - per_page?: number; -}; -type AppsListPlansParams = { + assignees?: string[]; /** - * Page number of the results to fetch. + * The contents of the issue. */ - page?: number; + body?: string; /** - * Results per page (max 100) + * Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ - per_page?: number; -}; -type AppsListPlansStubbedParams = { + labels?: string[]; /** - * Page number of the results to fetch. + * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ */ - page?: number; + milestone?: number; + + owner: string; + + repo: string; /** - * Results per page (max 100) + * The title of the issue. */ - per_page?: number; + title: string; }; -type AppsListReposParams = { +export type IssuesCreateCommentParamsDeprecatedNumber = { /** - * Page number of the results to fetch. + * The contents of the comment. */ - page?: number; + body: string; /** - * Results per page (max 100) + * @deprecated "number" parameter renamed to "issue_number" */ - per_page?: number; -}; -type AppsRemoveRepoFromInstallationParams = { - installation_id: number; + number: number; - repository_id: number; -}; -type AppsResetAuthorizationParams = { - access_token: string; + owner: string; - client_id: string; + repo: string; }; -type AppsResetTokenParams = { +export type IssuesCreateCommentParams = { /** - * The OAuth access token used to authenticate to the GitHub API. + * The contents of the comment. */ - access_token?: string; + body: string; - client_id: string; -}; -type AppsRevokeAuthorizationForApplicationParams = { - access_token: string; + issue_number: number; - client_id: string; -}; -type AppsRevokeGrantForApplicationParams = { - access_token: string; + owner: string; - client_id: string; + repo: string; }; -type ChecksCreateParams = { +export type IssuesCreateLabelParams = { /** - * Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://developer.github.com/v3/activity/events/types/#checkrunevent) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - actions?: ChecksCreateParamsActions[]; + color: string; /** - * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * A short description of the label. */ - completed_at?: string; + description?: string; /** - * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. - * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + * The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). */ - conclusion?: - | "success" - | "failure" - | "neutral" - | "cancelled" - | "timed_out" - | "action_required"; + name: string; + + owner: string; + + repo: string; +}; +export type IssuesCreateMilestoneParams = { /** - * The URL of the integrator's site that has the full details of the check. + * A description of the milestone. */ - details_url?: string; + description?: string; /** - * A reference for the run on the integrator's system. + * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - external_id?: string; + due_on?: string; + + owner: string; + + repo: string; /** - * The SHA of the commit. + * The state of the milestone. Either `open` or `closed`. */ - head_sha: string; + state?: "open" | "closed"; /** - * The name of the check. For example, "code-coverage". + * The title of the milestone. */ + title: string; +}; +export type IssuesDeleteCommentParams = { + comment_id: number; + + owner: string; + + repo: string; +}; +export type IssuesDeleteLabelParams = { name: string; - /** - * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object) description. - */ - output?: ChecksCreateParamsOutput; owner: string; repo: string; - /** - * The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string; - /** - * The current status. Can be one of `queued`, `in_progress`, or `completed`. - */ - status?: "queued" | "in_progress" | "completed"; }; -type ChecksCreateSuiteParams = { +export type IssuesDeleteMilestoneParamsDeprecatedNumber = { /** - * The sha of the head commit. + * @deprecated "number" parameter renamed to "milestone_number" */ - head_sha: string; + number: number; owner: string; repo: string; }; -type ChecksGetParams = { - check_run_id: number; +export type IssuesDeleteMilestoneParams = { + milestone_number: number; owner: string; repo: string; }; -type ChecksGetSuiteParams = { - check_suite_id: number; +export type IssuesGetParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; owner: string; repo: string; }; -type ChecksListAnnotationsParams = { - check_run_id: number; +export type IssuesGetParams = { + issue_number: number; owner: string; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; repo: string; }; -type ChecksListForRefParams = { - /** - * Returns check runs with the specified `name`. - */ - check_name?: string; - /** - * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. - */ - filter?: "latest" | "all"; +export type IssuesGetCommentParams = { + comment_id: number; owner: string; /** @@ -21940,53 +25143,57 @@ type ChecksListForRefParams = { */ per_page?: number; - ref: string; + repo: string; +}; +export type IssuesGetEventParams = { + event_id: number; + + owner: string; repo: string; - /** - * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. - */ - status?: "queued" | "in_progress" | "completed"; }; -type ChecksListForSuiteParams = { - /** - * Returns check runs with the specified `name`. - */ - check_name?: string; +export type IssuesGetLabelParams = { + name: string; - check_suite_id: number; + owner: string; + + repo: string; +}; +export type IssuesGetMilestoneParamsDeprecatedNumber = { /** - * Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. + * @deprecated "number" parameter renamed to "milestone_number" */ - filter?: "latest" | "all"; + number: number; + + owner: string; + + repo: string; +}; +export type IssuesGetMilestoneParams = { + milestone_number: number; owner: string; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; repo: string; +}; +export type IssuesListParams = { /** - * Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. + * The direction of the sort. Can be either `asc` or `desc`. */ - status?: "queued" | "in_progress" | "completed"; -}; -type ChecksListSuitesForRefParams = { + direction?: "asc" | "desc"; /** - * Filters check suites by GitHub App `id`. + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation */ - app_id?: number; + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; /** - * Filters checks suites by the name of the [check run](https://developer.github.com/v3/checks/runs/). + * A list of comma separated label names. Example: `bug,ui,@high` */ - check_name?: string; - - owner: string; + labels?: string; /** * Page number of the results to fetch. */ @@ -21995,137 +25202,98 @@ type ChecksListSuitesForRefParams = { * Results per page (max 100) */ per_page?: number; - - ref: string; - - repo: string; + /** + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + since?: string; + /** + * What to sort results by. Can be either `created`, `updated`, `comments`. + */ + sort?: "created" | "updated" | "comments"; + /** + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; }; -type ChecksRerequestSuiteParams = { - check_suite_id: number; - +export type IssuesListAssigneesParams = { owner: string; - - repo: string; -}; -type ChecksSetSuitesPreferencesParams = { /** - * Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://developer.github.com/v3/checks/suites/#auto_trigger_checks-object) description for details. + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) */ - auto_trigger_checks?: ChecksSetSuitesPreferencesParamsAutoTriggerChecks[]; - - owner: string; + per_page?: number; repo: string; }; -type ChecksUpdateParams = { +export type IssuesListCommentsParamsDeprecatedNumber = { /** - * Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://developer.github.com/v3/checks/runs/#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://developer.github.com/v3/checks/runs/#check-runs-and-requested-actions)." + * @deprecated "number" parameter renamed to "issue_number" */ - actions?: ChecksUpdateParamsActions[]; + number: number; - check_run_id: number; - /** - * The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - completed_at?: string; + owner: string; /** - * **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. - * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. + * Page number of the results to fetch. */ - conclusion?: - | "success" - | "failure" - | "neutral" - | "cancelled" - | "timed_out" - | "action_required"; + page?: number; /** - * The URL of the integrator's site that has the full details of the check. + * Results per page (max 100) */ - details_url?: string; + per_page?: number; + + repo: string; /** - * A reference for the run on the integrator's system. + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - external_id?: string; + since?: string; +}; +export type IssuesListCommentsParams = { + issue_number: number; + + owner: string; /** - * The name of the check. For example, "code-coverage". + * Page number of the results to fetch. */ - name?: string; + page?: number; /** - * Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://developer.github.com/v3/checks/runs/#output-object-1) description. + * Results per page (max 100) */ - output?: ChecksUpdateParamsOutput; - - owner: string; + per_page?: number; repo: string; /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - started_at?: string; + since?: string; +}; +export type IssuesListCommentsForRepoParams = { /** - * The current status. Can be one of `queued`, `in_progress`, or `completed`. + * Either `asc` or `desc`. Ignored without the `sort` parameter. */ - status?: "queued" | "in_progress" | "completed"; -}; -type CodesOfConductGetConductCodeParams = { - key: string; -}; -type CodesOfConductGetForRepoParams = { + direction?: "asc" | "desc"; + owner: string; repo: string; -}; -type GistsCheckIsStarredParams = { - gist_id: string; -}; -type GistsCreateParams = { - /** - * A descriptive name for this gist. - */ - description?: string; /** - * The filenames and content of each file in the gist. The keys in the `files` object represent the filename and have the type `string`. + * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - files: GistsCreateParamsFiles; + since?: string; /** - * When `true`, the gist will be public and available for anyone to see. + * Either `created` or `updated`. */ - public?: boolean; + sort?: "created" | "updated"; }; -type GistsCreateCommentParams = { +export type IssuesListEventsParamsDeprecatedNumber = { /** - * The comment text. + * @deprecated "number" parameter renamed to "issue_number" */ - body: string; - - gist_id: string; -}; -type GistsDeleteParams = { - gist_id: string; -}; -type GistsDeleteCommentParams = { - comment_id: number; - - gist_id: string; -}; -type GistsForkParams = { - gist_id: string; -}; -type GistsGetParams = { - gist_id: string; -}; -type GistsGetCommentParams = { - comment_id: number; - - gist_id: string; -}; -type GistsGetRevisionParams = { - gist_id: string; + number: number; - sha: string; -}; -type GistsListParams = { + owner: string; /** * Page number of the results to fetch. */ @@ -22134,13 +25302,13 @@ type GistsListParams = { * Results per page (max 100) */ per_page?: number; - /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. - */ - since?: string; + + repo: string; }; -type GistsListCommentsParams = { - gist_id: string; +export type IssuesListEventsParams = { + issue_number: number; + + owner: string; /** * Page number of the results to fetch. */ @@ -22149,9 +25317,11 @@ type GistsListCommentsParams = { * Results per page (max 100) */ per_page?: number; + + repo: string; }; -type GistsListCommitsParams = { - gist_id: string; +export type IssuesListEventsForRepoParams = { + owner: string; /** * Page number of the results to fetch. */ @@ -22160,9 +25330,16 @@ type GistsListCommitsParams = { * Results per page (max 100) */ per_page?: number; + + repo: string; }; -type GistsListForksParams = { - gist_id: string; +export type IssuesListEventsForTimelineParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + + owner: string; /** * Page number of the results to fetch. */ @@ -22171,8 +25348,13 @@ type GistsListForksParams = { * Results per page (max 100) */ per_page?: number; + + repo: string; }; -type GistsListPublicParams = { +export type IssuesListEventsForTimelineParams = { + issue_number: number; + + owner: string; /** * Page number of the results to fetch. */ @@ -22181,28 +25363,27 @@ type GistsListPublicParams = { * Results per page (max 100) */ per_page?: number; - /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. - */ - since?: string; + + repo: string; }; -type GistsListPublicForUserParams = { +export type IssuesListForAuthenticatedUserParams = { /** - * Page number of the results to fetch. + * The direction of the sort. Can be either `asc` or `desc`. */ - page?: number; + direction?: "asc" | "desc"; /** - * Results per page (max 100) + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation */ - per_page?: number; + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + * A list of comma separated label names. Example: `bug,ui,@high` */ - since?: string; - - username: string; -}; -type GistsListStarredParams = { + labels?: string; /** * Page number of the results to fetch. */ @@ -22212,180 +25393,176 @@ type GistsListStarredParams = { */ per_page?: number; /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only gists updated at or after this time are returned. + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ since?: string; -}; -type GistsStarParams = { - gist_id: string; -}; -type GistsUnstarParams = { - gist_id: string; -}; -type GistsUpdateParams = { /** - * A descriptive name for this gist. + * What to sort results by. Can be either `created`, `updated`, `comments`. */ - description?: string; + sort?: "created" | "updated" | "comments"; /** - * The filenames and content that make up this gist. + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - files?: GistsUpdateParamsFiles; - - gist_id: string; + state?: "open" | "closed" | "all"; }; -type GistsUpdateCommentParams = { +export type IssuesListForOrgParams = { /** - * The comment text. + * The direction of the sort. Can be either `asc` or `desc`. */ - body: string; - - comment_id: number; - - gist_id: string; -}; -type GitCreateBlobParams = { + direction?: "asc" | "desc"; /** - * The new blob's content. + * Indicates which sorts of issues to return. Can be one of: + * \* `assigned`: Issues assigned to you + * \* `created`: Issues created by you + * \* `mentioned`: Issues mentioning you + * \* `subscribed`: Issues you're subscribed to updates for + * \* `all`: All issues the authenticated user can see, regardless of participation or creation */ - content: string; + filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; /** - * The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * A list of comma separated label names. Example: `bug,ui,@high` */ - encoding?: string; - - owner: string; + labels?: string; - repo: string; -}; -type GitCreateCommitParams = { + org: string; /** - * Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. + * Page number of the results to fetch. */ - author?: GitCreateCommitParamsAuthor; + page?: number; /** - * Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. + * Results per page (max 100) */ - committer?: GitCreateCommitParamsCommitter; + per_page?: number; /** - * The commit message + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - message: string; - - owner: string; + since?: string; /** - * The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. + * What to sort results by. Can be either `created`, `updated`, `comments`. */ - parents: string[]; - - repo: string; + sort?: "created" | "updated" | "comments"; /** - * The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - signature?: string; + state?: "open" | "closed" | "all"; +}; +export type IssuesListForRepoParams = { /** - * The SHA of the tree object this commit points to + * Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. */ - tree: string; -}; -type GitCreateRefParams = { - owner: string; + assignee?: string; /** - * The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. + * The user that created the issue. */ - ref: string; - - repo: string; + creator?: string; /** - * The SHA1 value for this reference. + * The direction of the sort. Can be either `asc` or `desc`. */ - sha: string; -}; -type GitCreateTagParams = { + direction?: "asc" | "desc"; /** - * The tag message. + * A list of comma separated label names. Example: `bug,ui,@high` */ - message: string; + labels?: string; /** - * The SHA of the git object this is tagging. + * A user that's mentioned in the issue. */ - object: string; + mentioned?: string; + /** + * If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. + */ + milestone?: string; owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; /** - * The tag's name. This is typically a version (e.g., "v0.0.1"). + * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - tag: string; + since?: string; /** - * An object with information about the individual creating the tag. + * What to sort results by. Can be either `created`, `updated`, `comments`. */ - tagger?: GitCreateTagParamsTagger; + sort?: "created" | "updated" | "comments"; /** - * The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - type: "commit" | "tree" | "blob"; + state?: "open" | "closed" | "all"; }; -type GitCreateTreeParams = { +export type IssuesListLabelsForMilestoneParamsDeprecatedNumber = { /** - * The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. + * @deprecated "number" parameter renamed to "milestone_number" */ - base_tree?: string; + number: number; owner: string; - - repo: string; /** - * Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. + * Page number of the results to fetch. */ - tree: GitCreateTreeParamsTree[]; -}; -type GitDeleteRefParams = { - owner: string; - - ref: string; + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; }; -type GitGetBlobParams = { - file_sha: string; +export type IssuesListLabelsForMilestoneParams = { + milestone_number: number; owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; }; -type GitGetCommitParams = { - commit_sha: string; - +export type IssuesListLabelsForRepoParams = { owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; }; -type GitGetRefParams = { - owner: string; - - ref: string; +export type IssuesListLabelsOnIssueParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; - repo: string; -}; -type GitGetTagParams = { owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; - - tag_sha: string; }; -type GitGetTreeParams = { - owner: string; - - recursive?: "1"; - - repo: string; +export type IssuesListLabelsOnIssueParams = { + issue_number: number; - tree_sha: string; -}; -type GitListMatchingRefsParams = { owner: string; /** * Page number of the results to fetch. @@ -22396,82 +25573,114 @@ type GitListMatchingRefsParams = { */ per_page?: number; - ref: string; - repo: string; }; -type GitListRefsParams = { +export type IssuesListMilestonesForRepoParams = { /** - * Filter by sub-namespace (reference prefix). Most commen examples would be `'heads/'` and `'tags/'` to retrieve branches or tags + * The direction of the sort. Either `asc` or `desc`. */ - namespace?: string; + direction?: "asc" | "desc"; owner: string; - + /** + * Page number of the results to fetch. + */ page?: number; - + /** + * Results per page (max 100) + */ per_page?: number; repo: string; + /** + * What to sort results by. Either `due_on` or `completeness`. + */ + sort?: "due_on" | "completeness"; + /** + * The state of the milestone. Either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; }; -type GitUpdateRefParams = { +export type IssuesLockParamsDeprecatedNumber = { /** - * Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` */ - force?: boolean; + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; owner: string; - ref: string; - repo: string; +}; +export type IssuesLockParams = { + issue_number: number; /** - * The SHA1 value to set this reference to + * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` */ - sha: string; -}; -type GitignoreGetTemplateParams = { - name: string; + lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + + owner: string; + + repo: string; }; -type InteractionsAddOrUpdateRestrictionsForOrgParams = { +export type IssuesRemoveAssigneesParamsDeprecatedNumber = { /** - * Specifies the group of GitHub users who can comment, open issues, or create pull requests in public repositories for the given organization. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ - limit: "existing_users" | "contributors_only" | "collaborators_only"; + assignees?: string[]; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; - org: string; + owner: string; + + repo: string; }; -type InteractionsAddOrUpdateRestrictionsForRepoParams = { +export type IssuesRemoveAssigneesParams = { /** - * Specifies the group of GitHub users who can comment, open issues, or create pull requests for the given repository. Must be one of: `existing_users`, `contributors_only`, or `collaborators_only`. + * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ - limit: "existing_users" | "contributors_only" | "collaborators_only"; + assignees?: string[]; + + issue_number: number; owner: string; repo: string; }; -type InteractionsGetRestrictionsForOrgParams = { - org: string; -}; -type InteractionsGetRestrictionsForRepoParams = { +export type IssuesRemoveLabelParamsDeprecatedNumber = { + name: string; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; + owner: string; repo: string; }; -type InteractionsRemoveRestrictionsForOrgParams = { - org: string; -}; -type InteractionsRemoveRestrictionsForRepoParams = { +export type IssuesRemoveLabelParams = { + issue_number: number; + + name: string; + owner: string; repo: string; }; -type IssuesAddAssigneesParamsDeprecatedNumber = { - /** - * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ - */ - assignees?: string[]; +export type IssuesRemoveLabelsParamsDeprecatedNumber = { /** * @deprecated "number" parameter renamed to "issue_number" */ @@ -22481,23 +25690,18 @@ type IssuesAddAssigneesParamsDeprecatedNumber = { repo: string; }; -type IssuesAddAssigneesParams = { - /** - * Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ - */ - assignees?: string[]; - +export type IssuesRemoveLabelsParams = { issue_number: number; owner: string; repo: string; }; -type IssuesAddLabelsParamsDeprecatedNumber = { +export type IssuesReplaceLabelsParamsDeprecatedNumber = { /** - * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. */ - labels: string[]; + labels?: string[]; /** * @deprecated "number" parameter renamed to "issue_number" */ @@ -22507,32 +25711,37 @@ type IssuesAddLabelsParamsDeprecatedNumber = { repo: string; }; -type IssuesAddLabelsParams = { +export type IssuesReplaceLabelsParams = { issue_number: number; /** - * The name of the label to add to the issue. Must contain at least one label. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. */ - labels: string[]; + labels?: string[]; owner: string; repo: string; }; -type IssuesCheckAssigneeParams = { - assignee: string; +export type IssuesUnlockParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; owner: string; repo: string; }; -type IssuesCreateParamsDeprecatedAssignee = { - /** - * Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ - * @deprecated "assignee" parameter has been deprecated and will be removed in future - */ - assignee?: string; +export type IssuesUnlockParams = { + issue_number: number; + + owner: string; + + repo: string; +}; +export type IssuesUpdateParamsDeprecatedNumber = { /** - * Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ assignees?: string[]; /** @@ -22540,93 +25749,132 @@ type IssuesCreateParamsDeprecatedAssignee = { */ body?: string; /** - * Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ + * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ labels?: string[]; /** - * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ */ - milestone?: number; + milestone?: number | null; + /** + * @deprecated "number" parameter renamed to "issue_number" + */ + number: number; owner: string; repo: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; /** * The title of the issue. */ - title: string; + title?: string; }; -type IssuesCreateParams = { +export type IssuesUpdateParamsDeprecatedAssignee = { /** - * Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + * Login for the user that this issue should be assigned to. **This field is deprecated.** + * @deprecated "assignee" parameter has been deprecated and will be removed in future + */ + assignee?: string; + /** + * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ assignees?: string[]; /** * The contents of the issue. */ body?: string; + + issue_number: number; /** - * Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ + * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ labels?: string[]; /** - * The `number` of the milestone to associate this issue with. _NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise._ + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ */ - milestone?: number; + milestone?: number | null; owner: string; repo: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; /** * The title of the issue. */ - title: string; + title?: string; }; -type IssuesCreateCommentParamsDeprecatedNumber = { +export type IssuesUpdateParams = { /** - * The contents of the comment. + * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + */ + assignees?: string[]; + /** + * The contents of the issue. + */ + body?: string; + + issue_number: number; + /** + * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ - body: string; + labels?: string[]; /** - * @deprecated "number" parameter renamed to "issue_number" + * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ */ - number: number; + milestone?: number | null; owner: string; repo: string; + /** + * State of the issue. Either `open` or `closed`. + */ + state?: "open" | "closed"; + /** + * The title of the issue. + */ + title?: string; }; -type IssuesCreateCommentParams = { +export type IssuesUpdateCommentParams = { /** * The contents of the comment. */ body: string; - issue_number: number; + comment_id: number; owner: string; repo: string; }; -type IssuesCreateLabelParams = { +export type IssuesUpdateLabelParams = { /** * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color: string; + color?: string; + + current_name: string; /** * A short description of the label. */ description?: string; /** - * The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). + * The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). */ - name: string; + name?: string; owner: string; repo: string; }; -type IssuesCreateMilestoneParams = { +export type IssuesUpdateMilestoneParamsDeprecatedNumber = { /** * A description of the milestone. */ @@ -22635,6 +25883,10 @@ type IssuesCreateMilestoneParams = { * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ due_on?: string; + /** + * @deprecated "number" parameter renamed to "milestone_number" + */ + number: number; owner: string; @@ -22646,120 +25898,108 @@ type IssuesCreateMilestoneParams = { /** * The title of the milestone. */ - title: string; -}; -type IssuesDeleteCommentParams = { - comment_id: number; - - owner: string; - - repo: string; -}; -type IssuesDeleteLabelParams = { - name: string; - - owner: string; - - repo: string; + title?: string; }; -type IssuesDeleteMilestoneParamsDeprecatedNumber = { +export type IssuesUpdateMilestoneParams = { /** - * @deprecated "number" parameter renamed to "milestone_number" + * A description of the milestone. */ - number: number; - - owner: string; + description?: string; + /** + * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string; - repo: string; -}; -type IssuesDeleteMilestoneParams = { milestone_number: number; owner: string; repo: string; -}; -type IssuesGetParamsDeprecatedNumber = { /** - * @deprecated "number" parameter renamed to "issue_number" + * The state of the milestone. Either `open` or `closed`. */ - number: number; - - owner: string; - - repo: string; + state?: "open" | "closed"; + /** + * The title of the milestone. + */ + title?: string; }; -type IssuesGetParams = { - issue_number: number; - +export type LicensesGetParams = { + license: string; +}; +export type LicensesGetForRepoParams = { owner: string; repo: string; }; -type IssuesGetCommentParams = { - comment_id: number; - - owner: string; +export type MarkdownRenderParams = { /** - * Page number of the results to fetch. + * The repository context to use when creating references in `gfm` mode. Omit this parameter when using `markdown` mode. */ - page?: number; + context?: string; /** - * Results per page (max 100) + * The rendering mode. Can be either: + * \* `markdown` to render a document in plain Markdown, just like README.md files are rendered. + * \* `gfm` to render a document in [GitHub Flavored Markdown](https://github.github.com/gfm/), which creates links for user mentions as well as references to SHA-1 hashes, issues, and pull requests. */ - per_page?: number; - - repo: string; + mode?: "markdown" | "gfm"; + /** + * The Markdown text to render in HTML. Markdown content must be 400 KB or less. + */ + text: string; }; -type IssuesGetEventParams = { - event_id: number; - +export type MarkdownRenderRawParams = { + data: string; +}; +export type MigrationsCancelImportParams = { owner: string; repo: string; }; -type IssuesGetLabelParams = { - name: string; +export type MigrationsDeleteArchiveForAuthenticatedUserParams = { + migration_id: number; +}; +export type MigrationsDeleteArchiveForOrgParams = { + migration_id: number; + + org: string; +}; +export type MigrationsGetArchiveForAuthenticatedUserParams = { + migration_id: number; +}; +export type MigrationsGetArchiveForOrgParams = { + migration_id: number; + org: string; +}; +export type MigrationsGetCommitAuthorsParams = { owner: string; repo: string; -}; -type IssuesGetMilestoneParamsDeprecatedNumber = { /** - * @deprecated "number" parameter renamed to "milestone_number" + * Only authors found after this id are returned. Provide the highest author ID you've seen so far. New authors may be added to the list at any point while the importer is performing the `raw` step. */ - number: number; - + since?: string; +}; +export type MigrationsGetImportProgressParams = { owner: string; repo: string; }; -type IssuesGetMilestoneParams = { - milestone_number: number; - +export type MigrationsGetLargeFilesParams = { owner: string; repo: string; }; -type IssuesListParams = { - /** - * The direction of the sort. Can be either `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; - /** - * A list of comma separated label names. Example: `bug,ui,@high` - */ - labels?: string; +export type MigrationsGetStatusForAuthenticatedUserParams = { + migration_id: number; +}; +export type MigrationsGetStatusForOrgParams = { + migration_id: number; + + org: string; +}; +export type MigrationsListForAuthenticatedUserParams = { /** * Page number of the results to fetch. */ @@ -22768,21 +26008,22 @@ type IssuesListParams = { * Results per page (max 100) */ per_page?: number; +}; +export type MigrationsListForOrgParams = { + org: string; /** - * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - since?: string; - /** - * What to sort results by. Can be either `created`, `updated`, `comments`. + * Page number of the results to fetch. */ - sort?: "created" | "updated" | "comments"; + page?: number; /** - * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + * Results per page (max 100) */ - state?: "open" | "closed" | "all"; + per_page?: number; }; -type IssuesListAssigneesParams = { - owner: string; +export type MigrationsListReposForOrgParams = { + migration_id: number; + + org: string; /** * Page number of the results to fetch. */ @@ -22791,16 +26032,9 @@ type IssuesListAssigneesParams = { * Results per page (max 100) */ per_page?: number; - - repo: string; }; -type IssuesListCommentsParamsDeprecatedNumber = { - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - - owner: string; +export type MigrationsListReposForUserParams = { + migration_id: number; /** * Page number of the results to fetch. */ @@ -22809,147 +26043,220 @@ type IssuesListCommentsParamsDeprecatedNumber = { * Results per page (max 100) */ per_page?: number; +}; +export type MigrationsMapCommitAuthorParams = { + author_id: number; + /** + * The new Git author email. + */ + email?: string; + /** + * The new Git author name. + */ + name?: string; + + owner: string; + + repo: string; +}; +export type MigrationsSetLfsPreferenceParams = { + owner: string; repo: string; /** - * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). */ - since?: string; + use_lfs: "opt_in" | "opt_out"; }; -type IssuesListCommentsParams = { - issue_number: number; - - owner: string; +export type MigrationsStartForAuthenticatedUserParams = { /** - * Page number of the results to fetch. + * Does not include attachments uploaded to GitHub.com in the migration data when set to `true`. Excluding attachments will reduce the migration archive file size. */ - page?: number; + exclude_attachments?: boolean; /** - * Results per page (max 100) + * Locks the `repositories` to prevent changes during the migration when set to `true`. */ - per_page?: number; - - repo: string; + lock_repositories?: boolean; /** - * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * An array of repositories to include in the migration. */ - since?: string; + repositories: string[]; }; -type IssuesListCommentsForRepoParams = { +export type MigrationsStartForOrgParams = { /** - * Either `asc` or `desc`. Ignored without the `sort` parameter. + * Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). */ - direction?: "asc" | "desc"; + exclude_attachments?: boolean; + /** + * Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + */ + lock_repositories?: boolean; + org: string; + /** + * A list of arrays indicating which repositories should be migrated. + */ + repositories: string[]; +}; +export type MigrationsStartImportParams = { owner: string; repo: string; /** - * Only comments updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * For a tfvc import, the name of the project that is being imported. */ - since?: string; + tfvc_project?: string; /** - * Either `created` or `updated`. + * The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. */ - sort?: "created" | "updated"; -}; -type IssuesListEventsParamsDeprecatedNumber = { + vcs?: "subversion" | "git" | "mercurial" | "tfvc"; /** - * @deprecated "number" parameter renamed to "issue_number" + * If authentication is required, the password to provide to `vcs_url`. */ - number: number; - - owner: string; + vcs_password?: string; /** - * Page number of the results to fetch. + * The URL of the originating repository. */ - page?: number; + vcs_url: string; /** - * Results per page (max 100) + * If authentication is required, the username to provide to `vcs_url`. */ - per_page?: number; + vcs_username?: string; +}; +export type MigrationsUnlockRepoForAuthenticatedUserParams = { + migration_id: number; - repo: string; + repo_name: string; }; -type IssuesListEventsParams = { - issue_number: number; +export type MigrationsUnlockRepoForOrgParams = { + migration_id: number; + + org: string; + repo_name: string; +}; +export type MigrationsUpdateImportParams = { owner: string; + + repo: string; /** - * Page number of the results to fetch. + * The password to provide to the originating repository. */ - page?: number; + vcs_password?: string; /** - * Results per page (max 100) + * The username to provide to the originating repository. */ - per_page?: number; + vcs_username?: string; +}; +export type OauthAuthorizationsCheckAuthorizationParams = { + access_token: string; - repo: string; + client_id: string; }; -type IssuesListEventsForRepoParams = { - owner: string; +export type OauthAuthorizationsCreateAuthorizationParams = { /** - * Page number of the results to fetch. + * The 20 character OAuth app client key for which to create the token. */ - page?: number; + client_id?: string; /** - * Results per page (max 100) + * The 40 character OAuth app client secret for which to create the token. */ - per_page?: number; - - repo: string; + client_secret?: string; + /** + * A unique string to distinguish an authorization from others created for the same client ID and user. + */ + fingerprint?: string; + /** + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + */ + note: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; +}; +export type OauthAuthorizationsDeleteAuthorizationParams = { + authorization_id: number; +}; +export type OauthAuthorizationsDeleteGrantParams = { + grant_id: number; +}; +export type OauthAuthorizationsGetAuthorizationParams = { + authorization_id: number; }; -type IssuesListEventsForTimelineParamsDeprecatedNumber = { +export type OauthAuthorizationsGetGrantParams = { + grant_id: number; +}; +export type OauthAuthorizationsGetOrCreateAuthorizationForAppParams = { + client_id: string; /** - * @deprecated "number" parameter renamed to "issue_number" + * The 40 character OAuth app client secret associated with the client ID specified in the URL. */ - number: number; - - owner: string; + client_secret: string; /** - * Page number of the results to fetch. + * A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to [Get-or-create an authorization for a specific app and fingerprint](https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint). */ - page?: number; + fingerprint?: string; /** - * Results per page (max 100) + * A note to remind you what the OAuth token is for. */ - per_page?: number; - - repo: string; + note?: string; + /** + * A URL to remind you what app the OAuth token is for. + */ + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; }; -type IssuesListEventsForTimelineParams = { - issue_number: number; +export type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams = { + client_id: string; + /** + * The 40 character OAuth app client secret associated with the client ID specified in the URL. + */ + client_secret: string; - owner: string; + fingerprint: string; /** - * Page number of the results to fetch. + * A note to remind you what the OAuth token is for. */ - page?: number; + note?: string; /** - * Results per page (max 100) + * A URL to remind you what app the OAuth token is for. */ - per_page?: number; - - repo: string; + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; }; -type IssuesListForAuthenticatedUserParams = { +export type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams = { + client_id: string; /** - * The direction of the sort. Can be either `asc` or `desc`. + * The 40 character OAuth app client secret associated with the client ID specified in the URL. */ - direction?: "asc" | "desc"; + client_secret: string; + + fingerprint: string; /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all`: All issues the authenticated user can see, regardless of participation or creation + * A note to remind you what the OAuth token is for. */ - filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + note?: string; /** - * A list of comma separated label names. Example: `bug,ui,@high` + * A URL to remind you what app the OAuth token is for. */ - labels?: string; + note_url?: string; + /** + * A list of scopes that this authorization is in. + */ + scopes?: string[]; +}; +export type OauthAuthorizationsListAuthorizationsParams = { /** * Page number of the results to fetch. */ @@ -22958,87 +26265,166 @@ type IssuesListForAuthenticatedUserParams = { * Results per page (max 100) */ per_page?: number; +}; +export type OauthAuthorizationsListGrantsParams = { /** - * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * Page number of the results to fetch. */ - since?: string; + page?: number; /** - * What to sort results by. Can be either `created`, `updated`, `comments`. + * Results per page (max 100) */ - sort?: "created" | "updated" | "comments"; + per_page?: number; +}; +export type OauthAuthorizationsResetAuthorizationParams = { + access_token: string; + + client_id: string; +}; +export type OauthAuthorizationsRevokeAuthorizationForApplicationParams = { + access_token: string; + + client_id: string; +}; +export type OauthAuthorizationsRevokeGrantForApplicationParams = { + access_token: string; + + client_id: string; +}; +export type OauthAuthorizationsUpdateAuthorizationParams = { /** - * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + * A list of scopes to add to this authorization. */ - state?: "open" | "closed" | "all"; -}; -type IssuesListForOrgParams = { + add_scopes?: string[]; + + authorization_id: number; /** - * The direction of the sort. Can be either `asc` or `desc`. + * A unique string to distinguish an authorization from others created for the same client ID and user. */ - direction?: "asc" | "desc"; + fingerprint?: string; /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all`: All issues the authenticated user can see, regardless of participation or creation + * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. */ - filter?: "assigned" | "created" | "mentioned" | "subscribed" | "all"; + note?: string; /** - * A list of comma separated label names. Example: `bug,ui,@high` + * A URL to remind you what app the OAuth token is for. */ - labels?: string; - - org: string; + note_url?: string; /** - * Page number of the results to fetch. + * A list of scopes to remove from this authorization. */ - page?: number; + remove_scopes?: string[]; /** - * Results per page (max 100) + * Replaces the authorization scopes with these. */ - per_page?: number; + scopes?: string[]; +}; +export type OrgsAddOrUpdateMembershipParams = { + org: string; /** - * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * The role to give the user in the organization. Can be one of: + * \* `admin` - The user will become an owner of the organization. + * \* `member` - The user will become a non-owner member of the organization. */ - since?: string; + role?: "admin" | "member"; + + username: string; +}; +export type OrgsBlockUserParams = { + org: string; + + username: string; +}; +export type OrgsCheckBlockedUserParams = { + org: string; + + username: string; +}; +export type OrgsCheckMembershipParams = { + org: string; + + username: string; +}; +export type OrgsCheckPublicMembershipParams = { + org: string; + + username: string; +}; +export type OrgsConcealMembershipParams = { + org: string; + + username: string; +}; +export type OrgsConvertMemberToOutsideCollaboratorParams = { + org: string; + + username: string; +}; +export type OrgsCreateHookParams = { /** - * What to sort results by. Can be either `created`, `updated`, `comments`. + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ - sort?: "created" | "updated" | "comments"; + active?: boolean; /** - * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#create-hook-config-params). */ - state?: "open" | "closed" | "all"; -}; -type IssuesListForRepoParams = { + config: OrgsCreateHookParamsConfig; /** - * Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. */ - assignee?: string; + events?: string[]; /** - * The user that created the issue. + * Must be passed as "web". */ - creator?: string; + name: string; + + org: string; +}; +export type OrgsCreateInvitationParams = { /** - * The direction of the sort. Can be either `asc` or `desc`. + * **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ - direction?: "asc" | "desc"; + email?: string; /** - * A list of comma separated label names. Example: `bug,ui,@high` + * **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ - labels?: string; + invitee_id?: number; + + org: string; /** - * A user that's mentioned in the issue. + * Specify role for new member. Can be one of: + * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. + * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. + * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. */ - mentioned?: string; + role?: "admin" | "direct_member" | "billing_manager"; /** - * If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. + * Specify IDs for the teams you want to invite new members to. */ - milestone?: string; + team_ids?: number[]; +}; +export type OrgsDeleteHookParams = { + hook_id: number; + + org: string; +}; +export type OrgsGetParams = { + org: string; +}; +export type OrgsGetHookParams = { + hook_id: number; + + org: string; +}; +export type OrgsGetMembershipParams = { + org: string; - owner: string; + username: string; +}; +export type OrgsGetMembershipForAuthenticatedUserParams = { + org: string; +}; +export type OrgsListParams = { /** * Page number of the results to fetch. */ @@ -23047,28 +26433,15 @@ type IssuesListForRepoParams = { * Results per page (max 100) */ per_page?: number; - - repo: string; /** - * Only issues updated at or after this time are returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * The integer ID of the last Organization that you've seen. */ since?: string; - /** - * What to sort results by. Can be either `created`, `updated`, `comments`. - */ - sort?: "created" | "updated" | "comments"; - /** - * Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; }; -type IssuesListLabelsForMilestoneParamsDeprecatedNumber = { - /** - * @deprecated "number" parameter renamed to "milestone_number" - */ - number: number; - - owner: string; +export type OrgsListBlockedUsersParams = { + org: string; +}; +export type OrgsListForAuthenticatedUserParams = { /** * Page number of the results to fetch. */ @@ -23077,13 +26450,8 @@ type IssuesListLabelsForMilestoneParamsDeprecatedNumber = { * Results per page (max 100) */ per_page?: number; - - repo: string; }; -type IssuesListLabelsForMilestoneParams = { - milestone_number: number; - - owner: string; +export type OrgsListForUserParams = { /** * Page number of the results to fetch. */ @@ -23093,10 +26461,10 @@ type IssuesListLabelsForMilestoneParams = { */ per_page?: number; - repo: string; + username: string; }; -type IssuesListLabelsForRepoParams = { - owner: string; +export type OrgsListHooksParams = { + org: string; /** * Page number of the results to fetch. */ @@ -23105,16 +26473,9 @@ type IssuesListLabelsForRepoParams = { * Results per page (max 100) */ per_page?: number; - - repo: string; }; -type IssuesListLabelsOnIssueParamsDeprecatedNumber = { - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; - - owner: string; +export type OrgsListInstallationsParams = { + org: string; /** * Page number of the results to fetch. */ @@ -23123,13 +26484,11 @@ type IssuesListLabelsOnIssueParamsDeprecatedNumber = { * Results per page (max 100) */ per_page?: number; - - repo: string; }; -type IssuesListLabelsOnIssueParams = { - issue_number: number; +export type OrgsListInvitationTeamsParams = { + invitation_id: number; - owner: string; + org: string; /** * Page number of the results to fetch. */ @@ -23138,16 +26497,16 @@ type IssuesListLabelsOnIssueParams = { * Results per page (max 100) */ per_page?: number; - - repo: string; }; -type IssuesListMilestonesForRepoParams = { +export type OrgsListMembersParams = { /** - * The direction of the sort. Either `asc` or `desc`. + * Filter members returned in the list. Can be one of: + * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. + * \* `all` - All members the authenticated user can see. */ - direction?: "asc" | "desc"; + filter?: "2fa_disabled" | "all"; - owner: string; + org: string; /** * Page number of the results to fetch. */ @@ -23156,416 +26515,427 @@ type IssuesListMilestonesForRepoParams = { * Results per page (max 100) */ per_page?: number; - - repo: string; /** - * What to sort results by. Either `due_on` or `completeness`. + * Filter members returned by their role. Can be one of: + * \* `all` - All members of the organization, regardless of role. + * \* `admin` - Organization owners. + * \* `member` - Non-owner organization members. */ - sort?: "due_on" | "completeness"; + role?: "all" | "admin" | "member"; +}; +export type OrgsListMembershipsParams = { /** - * The state of the milestone. Either `open`, `closed`, or `all`. + * Page number of the results to fetch. */ - state?: "open" | "closed" | "all"; -}; -type IssuesLockParamsDeprecatedNumber = { + page?: number; /** - * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: - * \* `off-topic` - * \* `too heated` - * \* `resolved` - * \* `spam` + * Results per page (max 100) */ - lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; + per_page?: number; /** - * @deprecated "number" parameter renamed to "issue_number" + * Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships. */ - number: number; - - owner: string; - - repo: string; + state?: "active" | "pending"; }; -type IssuesLockParams = { - issue_number: number; +export type OrgsListOutsideCollaboratorsParams = { /** - * The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: - * \* `off-topic` - * \* `too heated` - * \* `resolved` - * \* `spam` + * Filter the list of outside collaborators. Can be one of: + * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. + * \* `all`: All outside collaborators. */ - lock_reason?: "off-topic" | "too heated" | "resolved" | "spam"; - - owner: string; + filter?: "2fa_disabled" | "all"; - repo: string; -}; -type IssuesRemoveAssigneesParamsDeprecatedNumber = { + org: string; /** - * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ + * Page number of the results to fetch. */ - assignees?: string[]; + page?: number; /** - * @deprecated "number" parameter renamed to "issue_number" + * Results per page (max 100) */ - number: number; - - owner: string; - - repo: string; + per_page?: number; }; -type IssuesRemoveAssigneesParams = { +export type OrgsListPendingInvitationsParams = { + org: string; /** - * Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ + * Page number of the results to fetch. */ - assignees?: string[]; - - issue_number: number; - - owner: string; - - repo: string; + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; }; -type IssuesRemoveLabelParamsDeprecatedNumber = { - name: string; +export type OrgsListPublicMembersParams = { + org: string; /** - * @deprecated "number" parameter renamed to "issue_number" + * Page number of the results to fetch. */ - number: number; - - owner: string; - - repo: string; + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; }; -type IssuesRemoveLabelParams = { - issue_number: number; - - name: string; +export type OrgsPingHookParams = { + hook_id: number; - owner: string; + org: string; +}; +export type OrgsPublicizeMembershipParams = { + org: string; - repo: string; + username: string; }; -type IssuesRemoveLabelsParamsDeprecatedNumber = { - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; +export type OrgsRemoveMemberParams = { + org: string; - owner: string; + username: string; +}; +export type OrgsRemoveMembershipParams = { + org: string; - repo: string; + username: string; }; -type IssuesRemoveLabelsParams = { - issue_number: number; +export type OrgsRemoveOutsideCollaboratorParams = { + org: string; - owner: string; + username: string; +}; +export type OrgsUnblockUserParams = { + org: string; - repo: string; + username: string; }; -type IssuesReplaceLabelsParamsDeprecatedNumber = { +export type OrgsUpdateParamsDeprecatedMembersAllowedRepositoryCreationType = { /** - * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + * Billing email address. This address is not publicized. */ - labels?: string[]; + billing_email?: string; /** - * @deprecated "number" parameter renamed to "issue_number" + * The company name. */ - number: number; - - owner: string; - - repo: string; -}; -type IssuesReplaceLabelsParams = { - issue_number: number; + company?: string; /** - * The names of the labels to add to the issue. You can pass an empty array to remove all labels. **Note:** Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. + * Default permission level members have for organization repositories: + * \* `read` - can pull, but not push to or administer this repository. + * \* `write` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push, and administer this repository. + * \* `none` - no permissions granted by default. */ - labels?: string[]; - - owner: string; - - repo: string; -}; -type IssuesUnlockParamsDeprecatedNumber = { + default_repository_permission?: "read" | "write" | "admin" | "none"; /** - * @deprecated "number" parameter renamed to "issue_number" + * The description of the company. */ - number: number; - - owner: string; - - repo: string; -}; -type IssuesUnlockParams = { - issue_number: number; - - owner: string; - - repo: string; -}; -type IssuesUpdateParamsDeprecatedNumber = { + description?: string; /** - * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + * The publicly visible email address. */ - assignees?: string[]; + email?: string; /** - * The contents of the issue. + * Toggles whether an organization can use organization projects. */ - body?: string; + has_organization_projects?: boolean; /** - * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ + * Toggles whether repositories that belong to the organization can use repository projects. */ - labels?: string[]; + has_repository_projects?: boolean; /** - * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + * The location. */ - milestone?: number | null; + location?: string; /** - * @deprecated "number" parameter renamed to "issue_number" + * Specifies which types of repositories non-admin organization members can create. Can be one of: + * \* `all` - all organization members can create public and private repositories. + * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud. + * \* `none` - only admin members can create repositories. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + * @deprecated "members_allowed_repository_creation_type" parameter has been deprecated and will be removed in future */ - number: number; - - owner: string; - - repo: string; + members_allowed_repository_creation_type?: string; /** - * State of the issue. Either `open` or `closed`. + * Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud. Can be one of: + * \* `true` - all organization members can create internal repositories. + * \* `false` - only organization owners can create internal repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ - state?: "open" | "closed"; + members_can_create_internal_repositories?: boolean; /** - * The title of the issue. + * Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: + * \* `true` - all organization members can create private repositories. + * \* `false` - only organization owners can create private repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ - title?: string; -}; -type IssuesUpdateParamsDeprecatedAssignee = { + members_can_create_private_repositories?: boolean; /** - * Login for the user that this issue should be assigned to. **This field is deprecated.** - * @deprecated "assignee" parameter has been deprecated and will be removed in future + * Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: + * \* `true` - all organization members can create public repositories. + * \* `false` - only organization owners can create public repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ - assignee?: string; + members_can_create_public_repositories?: boolean; /** - * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + * Toggles the ability of non-admin organization members to create repositories. Can be one of: + * \* `true` - all organization members can create repositories. + * \* `false` - only organization owners can create repositories. + * Default: `true` + * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. */ - assignees?: string[]; + members_can_create_repositories?: boolean; /** - * The contents of the issue. + * The shorthand name of the company. */ - body?: string; + name?: string; - issue_number: number; - /** - * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ - */ - labels?: string[]; + org: string; +}; +export type OrgsUpdateParams = { /** - * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + * Billing email address. This address is not publicized. */ - milestone?: number | null; - - owner: string; - - repo: string; + billing_email?: string; /** - * State of the issue. Either `open` or `closed`. + * The company name. */ - state?: "open" | "closed"; + company?: string; /** - * The title of the issue. + * Default permission level members have for organization repositories: + * \* `read` - can pull, but not push to or administer this repository. + * \* `write` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push, and administer this repository. + * \* `none` - no permissions granted by default. */ - title?: string; -}; -type IssuesUpdateParams = { + default_repository_permission?: "read" | "write" | "admin" | "none"; /** - * Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ + * The description of the company. */ - assignees?: string[]; + description?: string; /** - * The contents of the issue. + * The publicly visible email address. */ - body?: string; - - issue_number: number; + email?: string; /** - * Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ + * Toggles whether an organization can use organization projects. */ - labels?: string[]; + has_organization_projects?: boolean; /** - * The `number` of the milestone to associate this issue with or `null` to remove current. _NOTE: Only users with push access can set the milestone for issues. The milestone is silently dropped otherwise._ + * Toggles whether repositories that belong to the organization can use repository projects. */ - milestone?: number | null; - - owner: string; - - repo: string; + has_repository_projects?: boolean; /** - * State of the issue. Either `open` or `closed`. + * The location. */ - state?: "open" | "closed"; + location?: string; /** - * The title of the issue. + * Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud. Can be one of: + * \* `true` - all organization members can create internal repositories. + * \* `false` - only organization owners can create internal repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ - title?: string; -}; -type IssuesUpdateCommentParams = { + members_can_create_internal_repositories?: boolean; /** - * The contents of the comment. + * Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: + * \* `true` - all organization members can create private repositories. + * \* `false` - only organization owners can create private repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ - body: string; - - comment_id: number; - - owner: string; - - repo: string; -}; -type IssuesUpdateLabelParams = { + members_can_create_private_repositories?: boolean; /** - * The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. + * Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: + * \* `true` - all organization members can create public repositories. + * \* `false` - only organization owners can create public repositories. + * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://help.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ - color?: string; - - current_name: string; + members_can_create_public_repositories?: boolean; /** - * A short description of the label. + * Toggles the ability of non-admin organization members to create repositories. Can be one of: + * \* `true` - all organization members can create repositories. + * \* `false` - only organization owners can create repositories. + * Default: `true` + * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. */ - description?: string; + members_can_create_repositories?: boolean; /** - * The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see [emoji-cheat-sheet.com](http://emoji-cheat-sheet.com/). + * The shorthand name of the company. */ name?: string; - owner: string; - - repo: string; + org: string; }; -type IssuesUpdateMilestoneParamsDeprecatedNumber = { +export type OrgsUpdateHookParams = { /** - * A description of the milestone. + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ - description?: string; + active?: boolean; /** - * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#update-hook-config-params). */ - due_on?: string; + config?: OrgsUpdateHookParamsConfig; /** - * @deprecated "number" parameter renamed to "milestone_number" + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. */ - number: number; + events?: string[]; - owner: string; + hook_id: number; - repo: string; + org: string; +}; +export type OrgsUpdateMembershipParams = { + org: string; /** - * The state of the milestone. Either `open` or `closed`. + * The state that the membership should be in. Only `"active"` will be accepted. */ - state?: "open" | "closed"; + state: "active"; +}; +export type ProjectsAddCollaboratorParams = { /** - * The title of the milestone. + * The permission to grant the collaborator. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." Can be one of: + * \* `read` - can read, but not write to or administer this project. + * \* `write` - can read and write, but not administer this project. + * \* `admin` - can read, write and administer this project. */ - title?: string; + permission?: "read" | "write" | "admin"; + + project_id: number; + + username: string; }; -type IssuesUpdateMilestoneParams = { +export type ProjectsCreateCardParams = { + column_id: number; /** - * A description of the milestone. + * The issue or pull request id you want to associate with this card. You can use the [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) and [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoints to find this id. + * **Note:** Depending on whether you use the issue id or pull request id, you will need to specify `Issue` or `PullRequest` as the `content_type`. */ - description?: string; + content_id?: number; /** - * The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * **Required if you provide `content_id`**. The type of content you want to associate with this card. Use `Issue` when `content_id` is an issue id and use `PullRequest` when `content_id` is a pull request id. */ - due_on?: string; - - milestone_number: number; - - owner: string; - - repo: string; + content_type?: string; /** - * The state of the milestone. Either `open` or `closed`. + * The card's note content. Only valid for cards without another type of content, so you must omit when specifying `content_id` and `content_type`. */ - state?: "open" | "closed"; + note?: string; +}; +export type ProjectsCreateColumnParams = { /** - * The title of the milestone. + * The name of the column. */ - title?: string; -}; -type LicensesGetParams = { - license: string; -}; -type LicensesGetForRepoParams = { - owner: string; + name: string; - repo: string; + project_id: number; }; -type MarkdownRenderParams = { +export type ProjectsCreateForAuthenticatedUserParams = { /** - * The repository context to use when creating references in `gfm` mode. Omit this parameter when using `markdown` mode. + * The description of the project. */ - context?: string; + body?: string; /** - * The rendering mode. Can be either: - * \* `markdown` to render a document in plain Markdown, just like README.md files are rendered. - * \* `gfm` to render a document in [GitHub Flavored Markdown](https://github.github.com/gfm/), which creates links for user mentions as well as references to SHA-1 hashes, issues, and pull requests. + * The name of the project. */ - mode?: "markdown" | "gfm"; + name: string; +}; +export type ProjectsCreateForOrgParams = { /** - * The Markdown text to render in HTML. Markdown content must be 400 KB or less. + * The description of the project. */ - text: string; -}; -type MarkdownRenderRawParams = { - data: string; + body?: string; + /** + * The name of the project. + */ + name: string; + + org: string; }; -type MigrationsCancelImportParams = { +export type ProjectsCreateForRepoParams = { + /** + * The description of the project. + */ + body?: string; + /** + * The name of the project. + */ + name: string; + owner: string; repo: string; }; -type MigrationsDeleteArchiveForAuthenticatedUserParams = { - migration_id: number; +export type ProjectsDeleteParams = { + project_id: number; }; -type MigrationsDeleteArchiveForOrgParams = { - migration_id: number; - - org: string; +export type ProjectsDeleteCardParams = { + card_id: number; }; -type MigrationsGetArchiveForAuthenticatedUserParams = { - migration_id: number; +export type ProjectsDeleteColumnParams = { + column_id: number; }; -type MigrationsGetArchiveForOrgParams = { - migration_id: number; +export type ProjectsGetParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; - org: string; + project_id: number; }; -type MigrationsGetCommitAuthorsParams = { - owner: string; - - repo: string; +export type ProjectsGetCardParams = { + card_id: number; +}; +export type ProjectsGetColumnParams = { + column_id: number; +}; +export type ProjectsListCardsParams = { /** - * Only authors found after this id are returned. Provide the highest author ID you've seen so far. New authors may be added to the list at any point while the importer is performing the `raw` step. + * Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. */ - since?: string; -}; -type MigrationsGetImportProgressParams = { - owner: string; + archived_state?: "all" | "archived" | "not_archived"; - repo: string; + column_id: number; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; }; -type MigrationsGetLargeFilesParams = { - owner: string; +export type ProjectsListCollaboratorsParams = { + /** + * Filters the collaborators by their affiliation. Can be one of: + * \* `outside`: Outside collaborators of a project that are not a member of the project's organization. + * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. + */ + affiliation?: "outside" | "direct" | "all"; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; - repo: string; -}; -type MigrationsGetStatusForAuthenticatedUserParams = { - migration_id: number; + project_id: number; }; -type MigrationsGetStatusForOrgParams = { - migration_id: number; +export type ProjectsListColumnsParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; - org: string; + project_id: number; }; -type MigrationsListForAuthenticatedUserParams = { +export type ProjectsListForOrgParams = { + org: string; /** * Page number of the results to fetch. */ @@ -23574,9 +26944,13 @@ type MigrationsListForAuthenticatedUserParams = { * Results per page (max 100) */ per_page?: number; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; }; -type MigrationsListForOrgParams = { - org: string; +export type ProjectsListForRepoParams = { + owner: string; /** * Page number of the results to fetch. */ @@ -23585,520 +26959,647 @@ type MigrationsListForOrgParams = { * Results per page (max 100) */ per_page?: number; + + repo: string; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; }; -type MigrationsMapCommitAuthorParams = { - author_id: number; +export type ProjectsListForUserParams = { /** - * The new Git author email. + * Page number of the results to fetch. */ - email?: string; + page?: number; /** - * The new Git author name. + * Results per page (max 100) */ - name?: string; + per_page?: number; + /** + * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + */ + state?: "open" | "closed" | "all"; - owner: string; + username: string; +}; +export type ProjectsMoveCardParams = { + card_id: number; + /** + * The `id` value of a column in the same project. + */ + column_id?: number; + /** + * Can be one of `top`, `bottom`, or `after:`, where `` is the `id` value of a card in the same column, or in the new column specified by `column_id`. + */ + position: string; +}; +export type ProjectsMoveColumnParams = { + column_id: number; + /** + * Can be one of `first`, `last`, or `after:`, where `` is the `id` value of a column in the same project. + */ + position: string; +}; +export type ProjectsRemoveCollaboratorParams = { + project_id: number; - repo: string; + username: string; }; -type MigrationsSetLfsPreferenceParams = { - owner: string; +export type ProjectsReviewUserPermissionLevelParams = { + project_id: number; - repo: string; + username: string; +}; +export type ProjectsUpdateParams = { /** - * Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). + * The description of the project. */ - use_lfs: "opt_in" | "opt_out"; -}; -type MigrationsStartForAuthenticatedUserParams = { + body?: string; /** - * Does not include attachments uploaded to GitHub.com in the migration data when set to `true`. Excluding attachments will reduce the migration archive file size. + * The name of the project. */ - exclude_attachments?: boolean; + name?: string; /** - * Locks the `repositories` to prevent changes during the migration when set to `true`. + * The permission level that determines whether all members of the project's organization can see and/or make changes to the project. Setting `organization_permission` is only available for organization projects. If an organization member belongs to a team with a higher level of access or is a collaborator with a higher level of access, their permission level is not lowered by `organization_permission`. For information on changing access for a team or collaborator, see [Add or update team project](https://developer.github.com/v3/teams/#add-or-update-team-project) or [Add user as a collaborator](https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator). + * + * **Note:** Updating a project's `organization_permission` requires `admin` access to the project. + * + * Can be one of: + * \* `read` - Organization members can read, but not write to or administer this project. + * \* `write` - Organization members can read and write, but not administer this project. + * \* `admin` - Organization members can read, write and administer this project. + * \* `none` - Organization members can only see this project if it is public. */ - lock_repositories?: boolean; + organization_permission?: string; /** - * An array of repositories to include in the migration. + * Sets the visibility of a project board. Setting `private` is only available for organization and user projects. **Note:** Updating a project's visibility requires `admin` access to the project. + * + * Can be one of: + * \* `false` - Anyone can see the project. + * \* `true` - Only the user can view a project board created on a user account. Organization members with the appropriate `organization_permission` can see project boards in an organization account. */ - repositories: string[]; -}; -type MigrationsStartForOrgParams = { + private?: boolean; + + project_id: number; /** - * Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * State of the project. Either `open` or `closed`. */ - exclude_attachments?: boolean; + state?: "open" | "closed"; +}; +export type ProjectsUpdateCardParams = { /** - * Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * Use `true` to archive a project card. Specify `false` if you need to restore a previously archived project card. */ - lock_repositories?: boolean; + archived?: boolean; - org: string; + card_id: number; /** - * A list of arrays indicating which repositories should be migrated. + * The card's note content. Only valid for cards without another type of content, so this cannot be specified if the card already has a `content_id` and `content_type`. */ - repositories: string[]; + note?: string; +}; +export type ProjectsUpdateColumnParams = { + column_id: number; + /** + * The new name of the column. + */ + name: string; +}; +export type PullsCheckIfMergedParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; + + repo: string; }; -type MigrationsStartImportParams = { +export type PullsCheckIfMergedParams = { owner: string; + pull_number: number; + repo: string; +}; +export type PullsCreateParams = { /** - * For a tfvc import, the name of the project that is being imported. + * The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ - tfvc_project?: string; + base: string; /** - * The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. + * The contents of the pull request. */ - vcs?: "subversion" | "git" | "mercurial" | "tfvc"; + body?: string; /** - * If authentication is required, the password to provide to `vcs_url`. + * Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ - vcs_password?: string; + draft?: boolean; /** - * The URL of the originating repository. + * The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ - vcs_url: string; + head: string; /** - * If authentication is required, the username to provide to `vcs_url`. + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - vcs_username?: string; -}; -type MigrationsUnlockRepoForAuthenticatedUserParams = { - migration_id: number; - - repo_name: string; -}; -type MigrationsUnlockRepoForOrgParams = { - migration_id: number; - - org: string; + maintainer_can_modify?: boolean; - repo_name: string; -}; -type MigrationsUpdateImportParams = { owner: string; repo: string; /** - * The password to provide to the originating repository. + * The title of the new pull request. */ - vcs_password?: string; + title: string; +}; +export type PullsCreateCommentParamsDeprecatedNumber = { /** - * The username to provide to the originating repository. + * The text of the review comment. */ - vcs_username?: string; -}; -type OauthAuthorizationsCheckAuthorizationParams = { - access_token: string; - - client_id: string; -}; -type OauthAuthorizationsCreateAuthorizationParams = { + body: string; /** - * The 20 character OAuth app client key for which to create the token. + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ - client_id?: string; + commit_id: string; /** - * The 40 character OAuth app client secret for which to create the token. + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - client_secret?: string; + line?: number; /** - * A unique string to distinguish an authorization from others created for the same client ID and user. + * @deprecated "number" parameter renamed to "pull_number" */ - fingerprint?: string; + number: number; + + owner: string; /** - * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + * The relative path to the file that necessitates a comment. */ - note: string; + path: string; /** - * A URL to remind you what app the OAuth token is for. + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - note_url?: string; + position?: number; + + repo: string; /** - * A list of scopes that this authorization is in. + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. */ - scopes?: string[]; -}; -type OauthAuthorizationsDeleteAuthorizationParams = { - authorization_id: number; -}; -type OauthAuthorizationsDeleteGrantParams = { - grant_id: number; -}; -type OauthAuthorizationsGetAuthorizationParams = { - authorization_id: number; -}; -type OauthAuthorizationsGetGrantParams = { - grant_id: number; + side?: "LEFT" | "RIGHT"; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + */ + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + */ + start_side?: "LEFT" | "RIGHT" | "side"; }; -type OauthAuthorizationsGetOrCreateAuthorizationForAppParams = { - client_id: string; +export type PullsCreateCommentParamsDeprecatedInReplyTo = { /** - * The 40 character OAuth app client secret associated with the client ID specified in the URL. + * The text of the review comment. */ - client_secret: string; + body: string; /** - * A unique string to distinguish an authorization from others created for the same client and user. If provided, this API is functionally equivalent to [Get-or-create an authorization for a specific app and fingerprint](https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint). + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ - fingerprint?: string; + commit_id: string; /** - * A note to remind you what the OAuth token is for. + * The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported. + * @deprecated "in_reply_to" parameter has been deprecated and will be removed in future */ - note?: string; + in_reply_to?: number; /** - * A URL to remind you what app the OAuth token is for. + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - note_url?: string; + line?: number; + + owner: string; /** - * A list of scopes that this authorization is in. + * The relative path to the file that necessitates a comment. */ - scopes?: string[]; -}; -type OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams = { - client_id: string; + path: string; /** - * The 40 character OAuth app client secret associated with the client ID specified in the URL. + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - client_secret: string; + position?: number; - fingerprint: string; + pull_number: number; + + repo: string; /** - * A note to remind you what the OAuth token is for. + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. */ - note?: string; + side?: "LEFT" | "RIGHT"; /** - * A URL to remind you what app the OAuth token is for. + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - note_url?: string; + start_line?: number; /** - * A list of scopes that this authorization is in. + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. */ - scopes?: string[]; + start_side?: "LEFT" | "RIGHT" | "side"; }; -type OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams = { - client_id: string; +export type PullsCreateCommentParams = { /** - * The 40 character OAuth app client secret associated with the client ID specified in the URL. + * The text of the review comment. */ - client_secret: string; + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; - fingerprint: string; + owner: string; /** - * A note to remind you what the OAuth token is for. + * The relative path to the file that necessitates a comment. */ - note?: string; + path: string; /** - * A URL to remind you what app the OAuth token is for. + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - note_url?: string; + position?: number; + + pull_number: number; + + repo: string; /** - * A list of scopes that this authorization is in. + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. */ - scopes?: string[]; -}; -type OauthAuthorizationsListAuthorizationsParams = { + side?: "LEFT" | "RIGHT"; /** - * Page number of the results to fetch. + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - page?: number; + start_line?: number; /** - * Results per page (max 100) + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. */ - per_page?: number; + start_side?: "LEFT" | "RIGHT" | "side"; }; -type OauthAuthorizationsListGrantsParams = { +export type PullsCreateCommentReplyParamsDeprecatedNumber = { /** - * Page number of the results to fetch. + * The text of the review comment. */ - page?: number; + body: string; /** - * Results per page (max 100) + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ - per_page?: number; -}; -type OauthAuthorizationsResetAuthorizationParams = { - access_token: string; - - client_id: string; -}; -type OauthAuthorizationsRevokeAuthorizationForApplicationParams = { - access_token: string; - - client_id: string; -}; -type OauthAuthorizationsRevokeGrantForApplicationParams = { - access_token: string; - - client_id: string; -}; -type OauthAuthorizationsUpdateAuthorizationParams = { + commit_id: string; /** - * A list of scopes to add to this authorization. + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - add_scopes?: string[]; + line?: number; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; - authorization_id: number; + owner: string; /** - * A unique string to distinguish an authorization from others created for the same client ID and user. + * The relative path to the file that necessitates a comment. */ - fingerprint?: string; + path: string; /** - * A note to remind you what the OAuth token is for. Tokens not associated with a specific OAuth application (i.e. personal access tokens) must have a unique note. + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - note?: string; + position?: number; + + repo: string; /** - * A URL to remind you what app the OAuth token is for. + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. */ - note_url?: string; + side?: "LEFT" | "RIGHT"; /** - * A list of scopes to remove from this authorization. + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - remove_scopes?: string[]; + start_line?: number; /** - * Replaces the authorization scopes with these. + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. */ - scopes?: string[]; + start_side?: "LEFT" | "RIGHT" | "side"; }; -type OrgsAddOrUpdateMembershipParams = { - org: string; +export type PullsCreateCommentReplyParamsDeprecatedInReplyTo = { /** - * The role to give the user in the organization. Can be one of: - * \* `admin` - The user will become an owner of the organization. - * \* `member` - The user will become a non-owner member of the organization. + * The text of the review comment. */ - role?: "admin" | "member"; - - username: string; -}; -type OrgsBlockUserParams = { - org: string; - - username: string; -}; -type OrgsCheckBlockedUserParams = { - org: string; - - username: string; -}; -type OrgsCheckMembershipParams = { - org: string; - - username: string; -}; -type OrgsCheckPublicMembershipParams = { - org: string; + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported. + * @deprecated "in_reply_to" parameter has been deprecated and will be removed in future + */ + in_reply_to?: number; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; - username: string; -}; -type OrgsConcealMembershipParams = { - org: string; + owner: string; + /** + * The relative path to the file that necessitates a comment. + */ + path: string; + /** + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number; - username: string; -}; -type OrgsConvertMemberToOutsideCollaboratorParams = { - org: string; + pull_number: number; - username: string; -}; -type OrgsCreateHookParams = { + repo: string; /** - * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. */ - active?: boolean; + side?: "LEFT" | "RIGHT"; /** - * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#create-hook-config-params). + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - config: OrgsCreateHookParamsConfig; + start_line?: number; /** - * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. */ - events?: string[]; + start_side?: "LEFT" | "RIGHT" | "side"; +}; +export type PullsCreateCommentReplyParams = { /** - * Must be passed as "web". + * The text of the review comment. */ - name: string; + body: string; + /** + * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + */ + commit_id: string; + /** + * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + */ + line?: number; - org: string; -}; -type OrgsCreateInvitationParams = { + owner: string; /** - * **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. + * The relative path to the file that necessitates a comment. */ - email?: string; + path: string; /** - * **Required unless you provide `email`**. GitHub user ID for the person you are inviting. + * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - invitee_id?: number; + position?: number; - org: string; + pull_number: number; + + repo: string; /** - * Specify role for new member. Can be one of: - * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. - * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. - * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. + * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. */ - role?: "admin" | "direct_member" | "billing_manager"; + side?: "LEFT" | "RIGHT"; /** - * Specify IDs for the teams you want to invite new members to. + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - team_ids?: number[]; + start_line?: number; + /** + * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + */ + start_side?: "LEFT" | "RIGHT" | "side"; }; -type OrgsDeleteHookParams = { - hook_id: number; +export type PullsCreateFromIssueParams = { + base: string; - org: string; -}; -type OrgsGetParams = { - org: string; -}; -type OrgsGetHookParams = { - hook_id: number; + draft?: boolean; - org: string; -}; -type OrgsGetMembershipParams = { - org: string; + head: string; - username: string; -}; -type OrgsGetMembershipForAuthenticatedUserParams = { - org: string; + issue: number; + + maintainer_can_modify?: boolean; + + owner: string; + + repo: string; }; -type OrgsListParams = { +export type PullsCreateReviewParamsDeprecatedNumber = { /** - * Page number of the results to fetch. + * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ - page?: number; + body?: string; /** - * Results per page (max 100) + * Use the following table to specify the location, destination, and contents of the draft review comment. */ - per_page?: number; + comments?: PullsCreateReviewParamsComments[]; /** - * The integer ID of the last Organization that you've seen. + * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ - since?: string; -}; -type OrgsListBlockedUsersParams = { - org: string; -}; -type OrgsListForAuthenticatedUserParams = { + commit_id?: string; /** - * Page number of the results to fetch. + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. */ - page?: number; + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; /** - * Results per page (max 100) + * @deprecated "number" parameter renamed to "pull_number" */ - per_page?: number; + number: number; + + owner: string; + + repo: string; }; -type OrgsListForUserParams = { +export type PullsCreateReviewParams = { + /** + * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. + */ + body?: string; + /** + * Use the following table to specify the location, destination, and contents of the draft review comment. + */ + comments?: PullsCreateReviewParamsComments[]; /** - * Page number of the results to fetch. + * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ - page?: number; + commit_id?: string; /** - * Results per page (max 100) + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. */ - per_page?: number; + event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; - username: string; + owner: string; + + pull_number: number; + + repo: string; }; -type OrgsListHooksParams = { - org: string; +export type PullsCreateReviewCommentReplyParams = { /** - * Page number of the results to fetch. + * The text of the review comment. */ - page?: number; + body: string; + + comment_id: number; + + owner: string; + + pull_number: number; + + repo: string; +}; +export type PullsCreateReviewRequestParamsDeprecatedNumber = { /** - * Results per page (max 100) + * @deprecated "number" parameter renamed to "pull_number" */ - per_page?: number; -}; -type OrgsListInstallationsParams = { - org: string; + number: number; + + owner: string; + + repo: string; /** - * Page number of the results to fetch. + * An array of user `login`s that will be requested. */ - page?: number; + reviewers?: string[]; /** - * Results per page (max 100) + * An array of team `slug`s that will be requested. */ - per_page?: number; + team_reviewers?: string[]; }; -type OrgsListInvitationTeamsParams = { - invitation_id: number; +export type PullsCreateReviewRequestParams = { + owner: string; - org: string; + pull_number: number; + + repo: string; /** - * Page number of the results to fetch. + * An array of user `login`s that will be requested. */ - page?: number; + reviewers?: string[]; /** - * Results per page (max 100) + * An array of team `slug`s that will be requested. */ - per_page?: number; + team_reviewers?: string[]; +}; +export type PullsDeleteCommentParams = { + comment_id: number; + + owner: string; + + repo: string; }; -type OrgsListMembersParams = { +export type PullsDeletePendingReviewParamsDeprecatedNumber = { /** - * Filter members returned in the list. Can be one of: - * \* `2fa_disabled` - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. Available for organization owners. - * \* `all` - All members the authenticated user can see. + * @deprecated "number" parameter renamed to "pull_number" */ - filter?: "2fa_disabled" | "all"; + number: number; - org: string; + owner: string; + + repo: string; + + review_id: number; +}; +export type PullsDeletePendingReviewParams = { + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; +}; +export type PullsDeleteReviewRequestParamsDeprecatedNumber = { /** - * Page number of the results to fetch. + * @deprecated "number" parameter renamed to "pull_number" */ - page?: number; + number: number; + + owner: string; + + repo: string; /** - * Results per page (max 100) + * An array of user `login`s that will be removed. */ - per_page?: number; + reviewers?: string[]; /** - * Filter members returned by their role. Can be one of: - * \* `all` - All members of the organization, regardless of role. - * \* `admin` - Organization owners. - * \* `member` - Non-owner organization members. + * An array of team `slug`s that will be removed. */ - role?: "all" | "admin" | "member"; + team_reviewers?: string[]; }; -type OrgsListMembershipsParams = { +export type PullsDeleteReviewRequestParams = { + owner: string; + + pull_number: number; + + repo: string; /** - * Page number of the results to fetch. + * An array of user `login`s that will be removed. */ - page?: number; + reviewers?: string[]; /** - * Results per page (max 100) + * An array of team `slug`s that will be removed. */ - per_page?: number; + team_reviewers?: string[]; +}; +export type PullsDismissReviewParamsDeprecatedNumber = { /** - * Indicates the state of the memberships to return. Can be either `active` or `pending`. If not specified, the API returns both active and pending memberships. + * The message for the pull request review dismissal */ - state?: "active" | "pending"; -}; -type OrgsListOutsideCollaboratorsParams = { + message: string; /** - * Filter the list of outside collaborators. Can be one of: - * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. - * \* `all`: All outside collaborators. + * @deprecated "number" parameter renamed to "pull_number" */ - filter?: "2fa_disabled" | "all"; + number: number; - org: string; + owner: string; + + repo: string; + + review_id: number; +}; +export type PullsDismissReviewParams = { /** - * Page number of the results to fetch. + * The message for the pull request review dismissal */ - page?: number; + message: string; + + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; +}; +export type PullsGetParamsDeprecatedNumber = { /** - * Results per page (max 100) + * @deprecated "number" parameter renamed to "pull_number" */ - per_page?: number; + number: number; + + owner: string; + + repo: string; }; -type OrgsListPendingInvitationsParams = { - org: string; +export type PullsGetParams = { + owner: string; + + pull_number: number; + + repo: string; +}; +export type PullsGetCommentParams = { + comment_id: number; + + owner: string; + + repo: string; +}; +export type PullsGetCommentsForReviewParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; /** * Page number of the results to fetch. */ @@ -24107,9 +27608,13 @@ type OrgsListPendingInvitationsParams = { * Results per page (max 100) */ per_page?: number; + + repo: string; + + review_id: number; }; -type OrgsListPublicMembersParams = { - org: string; +export type PullsGetCommentsForReviewParams = { + owner: string; /** * Page number of the results to fetch. */ @@ -24118,205 +27623,172 @@ type OrgsListPublicMembersParams = { * Results per page (max 100) */ per_page?: number; -}; -type OrgsPingHookParams = { - hook_id: number; - org: string; -}; -type OrgsPublicizeMembershipParams = { - org: string; + pull_number: number; - username: string; -}; -type OrgsRemoveMemberParams = { - org: string; + repo: string; - username: string; + review_id: number; }; -type OrgsRemoveMembershipParams = { - org: string; +export type PullsGetReviewParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; - username: string; -}; -type OrgsRemoveOutsideCollaboratorParams = { - org: string; + owner: string; - username: string; + repo: string; + + review_id: number; }; -type OrgsUnblockUserParams = { - org: string; +export type PullsGetReviewParams = { + owner: string; - username: string; + pull_number: number; + + repo: string; + + review_id: number; }; -type OrgsUpdateParams = { +export type PullsListParams = { /** - * Billing email address. This address is not publicized. + * Filter pulls by base branch name. Example: `gh-pages`. */ - billing_email?: string; + base?: string; /** - * The company name. + * The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ - company?: string; + direction?: "asc" | "desc"; /** - * Default permission level members have for organization repositories: - * \* `read` - can pull, but not push to or administer this repository. - * \* `write` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push, and administer this repository. - * \* `none` - no permissions granted by default. + * Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. */ - default_repository_permission?: "read" | "write" | "admin" | "none"; + head?: string; + + owner: string; /** - * The description of the company. + * Page number of the results to fetch. */ - description?: string; + page?: number; /** - * The publicly visible email address. + * Results per page (max 100) */ - email?: string; + per_page?: number; + + repo: string; /** - * Toggles whether organization projects are enabled for the organization. + * What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). */ - has_organization_projects?: boolean; + sort?: "created" | "updated" | "popularity" | "long-running"; /** - * Toggles whether repository projects are enabled for repositories that belong to the organization. + * Either `open`, `closed`, or `all` to filter by state. */ - has_repository_projects?: boolean; + state?: "open" | "closed" | "all"; +}; +export type PullsListCommentsParamsDeprecatedNumber = { /** - * The location. + * Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - location?: string; + direction?: "asc" | "desc"; /** - * Specifies which types of repositories non-admin organization members can create. Can be one of: - * \* `all` - all organization members can create public and private repositories. - * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on [GitHub Business Cloud](https://github.com/pricing/business-cloud). - * \* `none` - only admin members can create repositories. - * **Note:** Using this parameter will override values set in `members_can_create_repositories`. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + * @deprecated "number" parameter renamed to "pull_number" */ - members_allowed_repository_creation_type?: "all" | "private" | "none"; + number: number; + + owner: string; /** - * Toggles the ability of non-admin organization members to create repositories. Can be one of: - * \* `true` - all organization members can create repositories. - * \* `false` - only admin members can create repositories. - * Default: `true` - * **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. **Note:** Another parameter can override the this parameter. See [this note](https://developer.github.com/v3/orgs/#members_can_create_repositories) for details. + * Page number of the results to fetch. */ - members_can_create_repositories?: boolean; + page?: number; /** - * The shorthand name of the company. + * Results per page (max 100) */ - name?: string; + per_page?: number; - org: string; -}; -type OrgsUpdateHookParams = { + repo: string; /** - * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. */ - active?: boolean; + since?: string; /** - * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/orgs/hooks/#update-hook-config-params). + * Can be either `created` or `updated` comments. */ - config?: OrgsUpdateHookParamsConfig; + sort?: "created" | "updated"; +}; +export type PullsListCommentsParams = { /** - * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + * Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - events?: string[]; - - hook_id: number; + direction?: "asc" | "desc"; - org: string; -}; -type OrgsUpdateMembershipParams = { - org: string; + owner: string; /** - * The state that the membership should be in. Only `"active"` will be accepted. + * Page number of the results to fetch. */ - state: "active"; -}; -type ProjectsAddCollaboratorParams = { + page?: number; /** - * The permission to grant the collaborator. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." Can be one of: - * \* `read` - can read, but not write to or administer this project. - * \* `write` - can read and write, but not administer this project. - * \* `admin` - can read, write and administer this project. + * Results per page (max 100) */ - permission?: "read" | "write" | "admin"; + per_page?: number; - project_id: number; + pull_number: number; - username: string; -}; -type ProjectsCreateCardParams = { - column_id: number; - /** - * The issue or pull request id you want to associate with this card. You can use the [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) and [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoints to find this id. - * **Note:** Depending on whether you use the issue id or pull request id, you will need to specify `Issue` or `PullRequest` as the `content_type`. - */ - content_id?: number; + repo: string; /** - * **Required if you provide `content_id`**. The type of content you want to associate with this card. Use `Issue` when `content_id` is an issue id and use `PullRequest` when `content_id` is a pull request id. + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. */ - content_type?: string; + since?: string; /** - * The card's note content. Only valid for cards without another type of content, so you must omit when specifying `content_id` and `content_type`. + * Can be either `created` or `updated` comments. */ - note?: string; + sort?: "created" | "updated"; }; -type ProjectsCreateColumnParams = { +export type PullsListCommentsForRepoParams = { /** - * The name of the column. + * Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - name: string; + direction?: "asc" | "desc"; - project_id: number; -}; -type ProjectsCreateForAuthenticatedUserParams = { + owner: string; /** - * The description of the project. + * Page number of the results to fetch. */ - body?: string; + page?: number; /** - * The name of the project. + * Results per page (max 100) */ - name: string; -}; -type ProjectsCreateForOrgParams = { + per_page?: number; + + repo: string; /** - * The description of the project. + * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. */ - body?: string; + since?: string; /** - * The name of the project. + * Can be either `created` or `updated` comments. */ - name: string; - - org: string; + sort?: "created" | "updated"; }; -type ProjectsCreateForRepoParams = { - /** - * The description of the project. - */ - body?: string; +export type PullsListCommitsParamsDeprecatedNumber = { /** - * The name of the project. + * @deprecated "number" parameter renamed to "pull_number" */ - name: string; + number: number; owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; }; -type ProjectsDeleteParams = { - project_id: number; -}; -type ProjectsDeleteCardParams = { - card_id: number; -}; -type ProjectsDeleteColumnParams = { - column_id: number; -}; -type ProjectsGetParams = { +export type PullsListCommitsParams = { + owner: string; /** * Page number of the results to fetch. */ @@ -24326,21 +27798,17 @@ type ProjectsGetParams = { */ per_page?: number; - project_id: number; -}; -type ProjectsGetCardParams = { - card_id: number; -}; -type ProjectsGetColumnParams = { - column_id: number; + pull_number: number; + + repo: string; }; -type ProjectsListCardsParams = { +export type PullsListFilesParamsDeprecatedNumber = { /** - * Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. + * @deprecated "number" parameter renamed to "pull_number" */ - archived_state?: "all" | "archived" | "not_archived"; + number: number; - column_id: number; + owner: string; /** * Page number of the results to fetch. */ @@ -24349,15 +27817,11 @@ type ProjectsListCardsParams = { * Results per page (max 100) */ per_page?: number; + + repo: string; }; -type ProjectsListCollaboratorsParams = { - /** - * Filters the collaborators by their affiliation. Can be one of: - * \* `outside`: Outside collaborators of a project that are not a member of the project's organization. - * \* `direct`: Collaborators with permissions to a project, regardless of organization membership status. - * \* `all`: All collaborators the authenticated user can see. - */ - affiliation?: "outside" | "direct" | "all"; +export type PullsListFilesParams = { + owner: string; /** * Page number of the results to fetch. */ @@ -24367,9 +27831,17 @@ type ProjectsListCollaboratorsParams = { */ per_page?: number; - project_id: number; + pull_number: number; + + repo: string; }; -type ProjectsListColumnsParams = { +export type PullsListReviewRequestsParamsDeprecatedNumber = { + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; + + owner: string; /** * Page number of the results to fetch. */ @@ -24379,10 +27851,10 @@ type ProjectsListColumnsParams = { */ per_page?: number; - project_id: number; + repo: string; }; -type ProjectsListForOrgParams = { - org: string; +export type PullsListReviewRequestsParams = { + owner: string; /** * Page number of the results to fetch. */ @@ -24391,12 +27863,17 @@ type ProjectsListForOrgParams = { * Results per page (max 100) */ per_page?: number; + + pull_number: number; + + repo: string; +}; +export type PullsListReviewsParamsDeprecatedNumber = { /** - * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. + * @deprecated "number" parameter renamed to "pull_number" */ - state?: "open" | "closed" | "all"; -}; -type ProjectsListForRepoParams = { + number: number; + owner: string; /** * Page number of the results to fetch. @@ -24408,12 +27885,9 @@ type ProjectsListForRepoParams = { per_page?: number; repo: string; - /** - * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; }; -type ProjectsListForUserParams = { +export type PullsListReviewsParams = { + owner: string; /** * Page number of the results to fetch. */ @@ -24422,97 +27896,70 @@ type ProjectsListForUserParams = { * Results per page (max 100) */ per_page?: number; - /** - * Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. - */ - state?: "open" | "closed" | "all"; - username: string; + pull_number: number; + + repo: string; }; -type ProjectsMoveCardParams = { - card_id: number; +export type PullsMergeParamsDeprecatedNumber = { /** - * The `id` value of a column in the same project. + * Extra detail to append to automatic commit message. */ - column_id?: number; + commit_message?: string; /** - * Can be one of `top`, `bottom`, or `after:`, where `` is the `id` value of a card in the same column, or in the new column specified by `column_id`. + * Title for the automatic commit message. */ - position: string; -}; -type ProjectsMoveColumnParams = { - column_id: number; + commit_title?: string; /** - * Can be one of `first`, `last`, or `after:`, where `` is the `id` value of a column in the same project. + * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. */ - position: string; -}; -type ProjectsRemoveCollaboratorParams = { - project_id: number; + merge_method?: "merge" | "squash" | "rebase"; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; - username: string; -}; -type ProjectsReviewUserPermissionLevelParams = { - project_id: number; + owner: string; - username: string; -}; -type ProjectsUpdateParams = { + repo: string; /** - * The description of the project. + * SHA that pull request head must match to allow merge. */ - body?: string; + sha?: string; +}; +export type PullsMergeParams = { /** - * The name of the project. + * Extra detail to append to automatic commit message. */ - name?: string; + commit_message?: string; /** - * The permission level that determines whether all members of the project's organization can see and/or make changes to the project. Setting `organization_permission` is only available for organization projects. If an organization member belongs to a team with a higher level of access or is a collaborator with a higher level of access, their permission level is not lowered by `organization_permission`. For information on changing access for a team or collaborator, see [Add or update team project](https://developer.github.com/v3/teams/#add-or-update-team-project) or [Add user as a collaborator](https://developer.github.com/v3/projects/collaborators/#add-user-as-a-collaborator). - * - * **Note:** Updating a project's `organization_permission` requires `admin` access to the project. - * - * Can be one of: - * \* `read` - Organization members can read, but not write to or administer this project. - * \* `write` - Organization members can read and write, but not administer this project. - * \* `admin` - Organization members can read, write and administer this project. - * \* `none` - Organization members can only see this project if it is public. + * Title for the automatic commit message. */ - organization_permission?: string; + commit_title?: string; /** - * Sets the visibility of a project board. Setting `private` is only available for organization and user projects. **Note:** Updating a project's visibility requires `admin` access to the project. - * - * Can be one of: - * \* `false` - Anyone can see the project. - * \* `true` - Only the user can view a project board created on a user account. Organization members with the appropriate `organization_permission` can see project boards in an organization account. + * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. */ - private?: boolean; + merge_method?: "merge" | "squash" | "rebase"; - project_id: number; + owner: string; + + pull_number: number; + + repo: string; /** - * State of the project. Either `open` or `closed`. + * SHA that pull request head must match to allow merge. */ - state?: "open" | "closed"; + sha?: string; }; -type ProjectsUpdateCardParams = { - /** - * Use `true` to archive a project card. Specify `false` if you need to restore a previously archived project card. - */ - archived?: boolean; - - card_id: number; +export type PullsSubmitReviewParamsDeprecatedNumber = { /** - * The card's note content. Only valid for cards without another type of content, so this cannot be specified if the card already has a `content_id` and `content_type`. + * The body text of the pull request review */ - note?: string; -}; -type ProjectsUpdateColumnParams = { - column_id: number; + body?: string; /** - * The new name of the column. + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. */ - name: string; -}; -type PullsCheckIfMergedParamsDeprecatedNumber = { + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; /** * @deprecated "number" parameter renamed to "pull_number" */ @@ -24521,2579 +27968,2677 @@ type PullsCheckIfMergedParamsDeprecatedNumber = { owner: string; repo: string; + + review_id: number; }; -type PullsCheckIfMergedParams = { +export type PullsSubmitReviewParams = { + /** + * The body text of the pull request review + */ + body?: string; + /** + * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + */ + event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + owner: string; pull_number: number; repo: string; + + review_id: number; }; -type PullsCreateParams = { +export type PullsUpdateParamsDeprecatedNumber = { /** - * The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. + * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ - base: string; + base?: string; /** * The contents of the pull request. */ body?: string; - /** - * Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. - */ - draft?: boolean; - /** - * The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. - */ - head: string; /** * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ maintainer_can_modify?: boolean; + /** + * @deprecated "number" parameter renamed to "pull_number" + */ + number: number; owner: string; repo: string; /** - * The title of the new pull request. + * State of this Pull Request. Either `open` or `closed`. */ - title: string; -}; -type PullsCreateCommentParamsDeprecatedNumber = { + state?: "open" | "closed"; /** - * The text of the review comment. + * The title of the pull request. */ - body: string; + title?: string; +}; +export type PullsUpdateParams = { /** - * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ - commit_id: string; + base?: string; /** - * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + * The contents of the pull request. */ - line?: number; + body?: string; /** - * @deprecated "number" parameter renamed to "pull_number" + * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - number: number; + maintainer_can_modify?: boolean; owner: string; + + pull_number: number; + + repo: string; /** - * The relative path to the file that necessitates a comment. + * State of this Pull Request. Either `open` or `closed`. */ - path: string; + state?: "open" | "closed"; /** - * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + * The title of the pull request. */ - position?: number; + title?: string; +}; +export type PullsUpdateBranchParams = { + /** + * The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits on a repository](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. + */ + expected_head_sha?: string; + + owner: string; + + pull_number: number; repo: string; +}; +export type PullsUpdateCommentParams = { /** - * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * The text of the reply to the review comment. */ - side?: "LEFT" | "RIGHT"; + body: string; + + comment_id: number; + + owner: string; + + repo: string; +}; +export type PullsUpdateReviewParamsDeprecatedNumber = { /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + * The body text of the pull request review. */ - start_line?: number; + body: string; /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @deprecated "number" parameter renamed to "pull_number" */ - start_side?: "LEFT" | "RIGHT" | "side"; + number: number; + + owner: string; + + repo: string; + + review_id: number; }; -type PullsCreateCommentParamsDeprecatedInReplyTo = { +export type PullsUpdateReviewParams = { /** - * The text of the review comment. + * The body text of the pull request review. */ body: string; + + owner: string; + + pull_number: number; + + repo: string; + + review_id: number; +}; +export type ReactionsCreateForCommitCommentParams = { + comment_id: number; /** - * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the commit comment. */ - commit_id: string; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + + repo: string; +}; +export type ReactionsCreateForIssueParamsDeprecatedNumber = { /** - * The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported. - * @deprecated "in_reply_to" parameter has been deprecated and will be removed in future + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. */ - in_reply_to?: number; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; /** - * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + * @deprecated "number" parameter renamed to "issue_number" */ - line?: number; + number: number; owner: string; + + repo: string; +}; +export type ReactionsCreateForIssueParams = { /** - * The relative path to the file that necessitates a comment. + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. */ - path: string; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + issue_number: number; + + owner: string; + + repo: string; +}; +export type ReactionsCreateForIssueCommentParams = { + comment_id: number; /** - * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue comment. */ - position?: number; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; - pull_number: number; + owner: string; repo: string; +}; +export type ReactionsCreateForPullRequestReviewCommentParams = { + comment_id: number; /** - * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the pull request review comment. */ - side?: "LEFT" | "RIGHT"; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; + + repo: string; +}; +export type ReactionsCreateForTeamDiscussionParams = { /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. */ - start_line?: number; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + team_id: number; +}; +export type ReactionsCreateForTeamDiscussionCommentParams = { + comment_number: number; /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. */ - start_side?: "LEFT" | "RIGHT" | "side"; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + team_id: number; }; -type PullsCreateCommentParams = { +export type ReactionsCreateForTeamDiscussionCommentInOrgParams = { + comment_number: number; /** - * The text of the review comment. + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. */ - body: string; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + org: string; + + team_slug: string; +}; +export type ReactionsCreateForTeamDiscussionCommentLegacyParams = { + comment_number: number; /** - * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. */ - commit_id: string; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + team_id: number; +}; +export type ReactionsCreateForTeamDiscussionInOrgParams = { /** - * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. */ - line?: number; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; - owner: string; + discussion_number: number; + + org: string; + + team_slug: string; +}; +export type ReactionsCreateForTeamDiscussionLegacyParams = { /** - * The relative path to the file that necessitates a comment. + * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. */ - path: string; + content: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; + + team_id: number; +}; +export type ReactionsDeleteParams = { + reaction_id: number; +}; +export type ReactionsListForCommitCommentParams = { + comment_id: number; /** - * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a commit comment. */ - position?: number; + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; - pull_number: number; + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; +}; +export type ReactionsListForIssueParamsDeprecatedNumber = { /** - * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. */ - side?: "LEFT" | "RIGHT"; + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + * @deprecated "number" parameter renamed to "issue_number" */ - start_line?: number; + number: number; + + owner: string; /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * Page number of the results to fetch. */ - start_side?: "LEFT" | "RIGHT" | "side"; + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + + repo: string; }; -type PullsCreateCommentReplyParamsDeprecatedNumber = { +export type ReactionsListForIssueParams = { /** - * The text of the review comment. + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. */ - body: string; + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + issue_number: number; + + owner: string; /** - * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + * Page number of the results to fetch. */ - commit_id: string; + page?: number; /** - * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + * Results per page (max 100) */ - line?: number; + per_page?: number; + + repo: string; +}; +export type ReactionsListForIssueCommentParams = { + comment_id: number; /** - * @deprecated "number" parameter renamed to "pull_number" + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue comment. */ - number: number; + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; owner: string; /** - * The relative path to the file that necessitates a comment. + * Page number of the results to fetch. */ - path: string; + page?: number; /** - * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + * Results per page (max 100) */ - position?: number; + per_page?: number; repo: string; +}; +export type ReactionsListForPullRequestReviewCommentParams = { + comment_id: number; /** - * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a pull request review comment. */ - side?: "LEFT" | "RIGHT"; + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + owner: string; /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + * Page number of the results to fetch. */ - start_line?: number; + page?: number; /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * Results per page (max 100) */ - start_side?: "LEFT" | "RIGHT" | "side"; + per_page?: number; + + repo: string; }; -type PullsCreateCommentReplyParamsDeprecatedInReplyTo = { +export type ReactionsListForTeamDiscussionParams = { /** - * The text of the review comment. + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. */ - body: string; + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; /** - * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + * Page number of the results to fetch. */ - commit_id: string; + page?: number; /** - * The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported. - * @deprecated "in_reply_to" parameter has been deprecated and will be removed in future + * Results per page (max 100) */ - in_reply_to?: number; + per_page?: number; + + team_id: number; +}; +export type ReactionsListForTeamDiscussionCommentParams = { + comment_number: number; /** - * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ - line?: number; + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; - owner: string; + discussion_number: number; /** - * The relative path to the file that necessitates a comment. + * Page number of the results to fetch. */ - path: string; + page?: number; /** - * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + * Results per page (max 100) */ - position?: number; + per_page?: number; + + team_id: number; +}; +export type ReactionsListForTeamDiscussionCommentInOrgParams = { + comment_number: number; + /** + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. + */ + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; - pull_number: number; + discussion_number: number; - repo: string; - /** - * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. - */ - side?: "LEFT" | "RIGHT"; + org: string; /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + * Page number of the results to fetch. */ - start_line?: number; + page?: number; /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * Results per page (max 100) */ - start_side?: "LEFT" | "RIGHT" | "side"; + per_page?: number; + + team_slug: string; }; -type PullsCreateCommentReplyParams = { +export type ReactionsListForTeamDiscussionCommentLegacyParams = { + comment_number: number; /** - * The text of the review comment. + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ - body: string; + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; /** - * The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. + * Page number of the results to fetch. */ - commit_id: string; + page?: number; /** - * **Required with `comfort-fade` preview**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. + * Results per page (max 100) */ - line?: number; + per_page?: number; - owner: string; - /** - * The relative path to the file that necessitates a comment. - */ - path: string; + team_id: number; +}; +export type ReactionsListForTeamDiscussionInOrgParams = { /** - * **Required without `comfort-fade` preview**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. */ - position?: number; + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; - pull_number: number; + discussion_number: number; - repo: string; - /** - * **Required with `comfort-fade` preview**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://help.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. - */ - side?: "LEFT" | "RIGHT"; + org: string; /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. + * Page number of the results to fetch. */ - start_line?: number; + page?: number; /** - * **Required when using multi-line comments**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://help.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * Results per page (max 100) */ - start_side?: "LEFT" | "RIGHT" | "side"; -}; -type PullsCreateFromIssueParams = { - base: string; - - draft?: boolean; - - head: string; - - issue: number; - - maintainer_can_modify?: boolean; - - owner: string; + per_page?: number; - repo: string; + team_slug: string; }; -type PullsCreateReviewParamsDeprecatedNumber = { - /** - * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. - */ - body?: string; - /** - * Use the following table to specify the location, destination, and contents of the draft review comment. - */ - comments?: PullsCreateReviewParamsComments[]; +export type ReactionsListForTeamDiscussionLegacyParams = { /** - * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. + * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. */ - commit_id?: string; + content?: + | "+1" + | "-1" + | "laugh" + | "confused" + | "heart" + | "hooray" + | "rocket" + | "eyes"; + + discussion_number: number; /** - * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. + * Page number of the results to fetch. */ - event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + page?: number; /** - * @deprecated "number" parameter renamed to "pull_number" + * Results per page (max 100) */ - number: number; + per_page?: number; + team_id: number; +}; +export type ReposAcceptInvitationParams = { + invitation_id: number; +}; +export type ReposAddCollaboratorParams = { owner: string; + /** + * The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: + * \* `pull` - can pull, but not push to or administer this repository. + * \* `push` - can pull and push, but not administer this repository. + * \* `admin` - can pull, push and administer this repository. + */ + permission?: "pull" | "push" | "admin"; repo: string; + + username: string; }; -type PullsCreateReviewParams = { - /** - * **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. - */ - body?: string; +export type ReposAddDeployKeyParams = { /** - * Use the following table to specify the location, destination, and contents of the draft review comment. + * The contents of the key. */ - comments?: PullsCreateReviewParamsComments[]; + key: string; + + owner: string; /** - * The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. + * If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." */ - commit_id?: string; + read_only?: boolean; + + repo: string; /** - * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review) when you are ready. + * A name for the key. */ - event?: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + title?: string; +}; +export type ReposAddProtectedBranchAdminEnforcementParams = { + branch: string; owner: string; - pull_number: number; - repo: string; }; -type PullsCreateReviewCommentReplyParams = { - /** - * The text of the review comment. - */ - body: string; +export type ReposAddProtectedBranchAppRestrictionsParams = { + apps: string[]; - comment_id: number; + branch: string; owner: string; - pull_number: number; - repo: string; }; -type PullsCreateReviewRequestParamsDeprecatedNumber = { - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; +export type ReposAddProtectedBranchRequiredSignaturesParams = { + branch: string; owner: string; repo: string; - /** - * An array of user `login`s that will be requested. - */ - reviewers?: string[]; - /** - * An array of team `slug`s that will be requested. - */ - team_reviewers?: string[]; }; -type PullsCreateReviewRequestParams = { - owner: string; +export type ReposAddProtectedBranchRequiredStatusChecksContextsParams = { + branch: string; - pull_number: number; + contexts: string[]; + + owner: string; repo: string; - /** - * An array of user `login`s that will be requested. - */ - reviewers?: string[]; - /** - * An array of team `slug`s that will be requested. - */ - team_reviewers?: string[]; }; -type PullsDeleteCommentParams = { - comment_id: number; +export type ReposAddProtectedBranchTeamRestrictionsParams = { + branch: string; owner: string; repo: string; + + teams: string[]; }; -type PullsDeletePendingReviewParamsDeprecatedNumber = { - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; +export type ReposAddProtectedBranchUserRestrictionsParams = { + branch: string; owner: string; repo: string; - review_id: number; + users: string[]; }; -type PullsDeletePendingReviewParams = { +export type ReposCheckCollaboratorParams = { owner: string; - pull_number: number; + repo: string; + + username: string; +}; +export type ReposCheckVulnerabilityAlertsParams = { + owner: string; repo: string; +}; +export type ReposCompareCommitsParams = { + base: string; - review_id: number; + head: string; + + owner: string; + + repo: string; }; -type PullsDeleteReviewRequestParamsDeprecatedNumber = { +export type ReposCreateCommitCommentParamsDeprecatedSha = { /** - * @deprecated "number" parameter renamed to "pull_number" + * The contents of the comment. */ - number: number; + body: string; owner: string; - - repo: string; /** - * An array of user `login`s that will be removed. + * Relative path of the file to comment on. */ - reviewers?: string[]; + path?: string; /** - * An array of team `slug`s that will be removed. + * Line index in the diff to comment on. */ - team_reviewers?: string[]; -}; -type PullsDeleteReviewRequestParams = { - owner: string; - - pull_number: number; + position?: number; repo: string; /** - * An array of user `login`s that will be removed. - */ - reviewers?: string[]; - /** - * An array of team `slug`s that will be removed. + * @deprecated "sha" parameter renamed to "commit_sha" */ - team_reviewers?: string[]; + sha: string; }; -type PullsDismissReviewParamsDeprecatedNumber = { +export type ReposCreateCommitCommentParamsDeprecatedLine = { /** - * The message for the pull request review dismissal + * The contents of the comment. */ - message: string; + body: string; + + commit_sha: string; /** - * @deprecated "number" parameter renamed to "pull_number" + * **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. + * @deprecated "line" parameter has been deprecated and will be removed in future */ - number: number; + line?: number; owner: string; - - repo: string; - - review_id: number; -}; -type PullsDismissReviewParams = { /** - * The message for the pull request review dismissal + * Relative path of the file to comment on. */ - message: string; - - owner: string; - - pull_number: number; + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; repo: string; - - review_id: number; }; -type PullsGetParamsDeprecatedNumber = { +export type ReposCreateCommitCommentParams = { /** - * @deprecated "number" parameter renamed to "pull_number" + * The contents of the comment. */ - number: number; + body: string; - owner: string; + commit_sha: string; - repo: string; -}; -type PullsGetParams = { owner: string; - - pull_number: number; + /** + * Relative path of the file to comment on. + */ + path?: string; + /** + * Line index in the diff to comment on. + */ + position?: number; repo: string; }; -type PullsGetCommentParams = { - comment_id: number; +export type ReposCreateDeploymentParams = { + /** + * Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + */ + auto_merge?: boolean; + /** + * Short description of the deployment. + */ + description?: string; + /** + * Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + */ + environment?: string; owner: string; + /** + * JSON payload with extra information about the deployment. + */ + payload?: string; + /** + * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + production_environment?: boolean; + /** + * The ref to deploy. This can be a branch, tag, or SHA. + */ + ref: string; repo: string; + /** + * The [status](https://developer.github.com/v3/repos/statuses/) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. + */ + required_contexts?: string[]; + /** + * Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; + /** + * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. + */ + transient_environment?: boolean; }; -type PullsGetCommentsForReviewParamsDeprecatedNumber = { +export type ReposCreateDeploymentStatusParams = { /** - * @deprecated "number" parameter renamed to "pull_number" + * Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` + * **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. */ - number: number; + auto_inactive?: boolean; - owner: string; + deployment_id: number; /** - * Page number of the results to fetch. + * A short description of the status. The maximum description length is 140 characters. */ - page?: number; + description?: string; /** - * Results per page (max 100) + * Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. */ - per_page?: number; - - repo: string; - - review_id: number; -}; -type PullsGetCommentsForReviewParams = { - owner: string; + environment?: "production" | "staging" | "qa"; /** - * Page number of the results to fetch. + * Sets the URL for accessing your environment. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. */ - page?: number; + environment_url?: string; /** - * Results per page (max 100) + * The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. */ - per_page?: number; + log_url?: string; - pull_number: number; + owner: string; repo: string; - - review_id: number; + /** + * The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. + */ + state: + | "error" + | "failure" + | "inactive" + | "in_progress" + | "queued" + | "pending" + | "success"; + /** + * The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + */ + target_url?: string; }; -type PullsGetReviewParamsDeprecatedNumber = { +export type ReposCreateDispatchEventParams = { /** - * @deprecated "number" parameter renamed to "pull_number" + * JSON payload with extra information about the webhook event that your action or worklow may use. */ - number: number; - - owner: string; - - repo: string; + client_payload?: ReposCreateDispatchEventParamsClientPayload; + /** + * **Required:** A custom webhook event name. + */ + event_type?: string; - review_id: number; -}; -type PullsGetReviewParams = { owner: string; - pull_number: number; - repo: string; - - review_id: number; }; -type PullsListParams = { +export type ReposCreateFileParams = { /** - * Filter pulls by base branch name. Example: `gh-pages`. + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - base?: string; + author?: ReposCreateFileParamsAuthor; /** - * The direction of the sort. Can be either `asc` or `desc`. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. + * The branch name. Default: the repository’s default branch (usually `master`) */ - direction?: "asc" | "desc"; + branch?: string; /** - * Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`. + * The person that committed the file. Default: the authenticated user. */ - head?: string; - - owner: string; + committer?: ReposCreateFileParamsCommitter; /** - * Page number of the results to fetch. + * The new file content, using Base64 encoding. */ - page?: number; + content: string; /** - * Results per page (max 100) + * The commit message. */ - per_page?: number; + message: string; + + owner: string; + + path: string; repo: string; /** - * What to sort results by. Can be either `created`, `updated`, `popularity` (comment count) or `long-running` (age, filtering by pulls updated in the last month). + * **Required if you are updating a file**. The blob SHA of the file being replaced. */ - sort?: "created" | "updated" | "popularity" | "long-running"; + sha?: string; +}; +export type ReposCreateForAuthenticatedUserParams = { /** - * Either `open`, `closed`, or `all` to filter by state. + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. */ - state?: "open" | "closed" | "all"; -}; -type PullsListCommentsParamsDeprecatedNumber = { + allow_merge_commit?: boolean; /** - * Can be either `asc` or `desc`. Ignored without `sort` parameter. + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. */ - direction?: "asc" | "desc"; + allow_rebase_merge?: boolean; /** - * @deprecated "number" parameter renamed to "pull_number" + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. */ - number: number; - - owner: string; + allow_squash_merge?: boolean; /** - * Page number of the results to fetch. + * Pass `true` to create an initial commit with empty README. */ - page?: number; + auto_init?: boolean; /** - * Results per page (max 100) + * Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. */ - per_page?: number; - - repo: string; + delete_branch_on_merge?: boolean; /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + * A short description of the repository. */ - since?: string; + description?: string; /** - * Can be either `created` or `updated` comments. + * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". */ - sort?: "created" | "updated"; -}; -type PullsListCommentsParams = { + gitignore_template?: string; /** - * Can be either `asc` or `desc`. Ignored without `sort` parameter. + * Either `true` to enable issues for this repository or `false` to disable them. */ - direction?: "asc" | "desc"; - - owner: string; + has_issues?: boolean; /** - * Page number of the results to fetch. + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. */ - page?: number; + has_projects?: boolean; /** - * Results per page (max 100) + * Either `true` to enable the wiki for this repository or `false` to disable it. */ - per_page?: number; - - pull_number: number; - - repo: string; + has_wiki?: boolean; /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + * A URL with more information about the repository. */ - since?: string; + homepage?: string; /** - * Can be either `created` or `updated` comments. + * Either `true` to make this repo available as a template repository or `false` to prevent it. */ - sort?: "created" | "updated"; -}; -type PullsListCommentsForRepoParams = { + is_template?: boolean; /** - * Can be either `asc` or `desc`. Ignored without `sort` parameter. + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". */ - direction?: "asc" | "desc"; - - owner: string; + license_template?: string; /** - * Page number of the results to fetch. + * The name of the repository. */ - page?: number; + name: string; /** - * Results per page (max 100) + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. */ - per_page?: number; - - repo: string; + private?: boolean; /** - * This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Only returns comments `updated` at or after this time. + * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ - since?: string; + team_id?: number; /** - * Can be either `created` or `updated` comments. + * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `visibility` can also be `internal`. For more information, see "[Creating an internal repository](https://help.github.com/github/creating-cloning-and-archiving-repositories/creating-an-internal-repository)" in the GitHub Help documentation. + * The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header. */ - sort?: "created" | "updated"; + visibility?: "public" | "private" | "visibility" | "internal"; }; -type PullsListCommitsParamsDeprecatedNumber = { +export type ReposCreateForkParams = { /** - * @deprecated "number" parameter renamed to "pull_number" + * Optional parameter to specify the organization name if forking into an organization. */ - number: number; + organization?: string; owner: string; + + repo: string; +}; +export type ReposCreateHookParams = { /** - * Page number of the results to fetch. + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ - page?: number; + active?: boolean; /** - * Results per page (max 100) + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). */ - per_page?: number; - - repo: string; -}; -type PullsListCommitsParams = { - owner: string; + config: ReposCreateHookParamsConfig; /** - * Page number of the results to fetch. + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. */ - page?: number; + events?: string[]; /** - * Results per page (max 100) + * Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ - per_page?: number; + name?: string; - pull_number: number; + owner: string; repo: string; }; -type PullsListFilesParamsDeprecatedNumber = { - /** - * @deprecated "number" parameter renamed to "pull_number" - */ - number: number; - - owner: string; +export type ReposCreateInOrgParams = { /** - * Page number of the results to fetch. + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. */ - page?: number; + allow_merge_commit?: boolean; /** - * Results per page (max 100) + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. */ - per_page?: number; - - repo: string; -}; -type PullsListFilesParams = { - owner: string; + allow_rebase_merge?: boolean; /** - * Page number of the results to fetch. + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. */ - page?: number; + allow_squash_merge?: boolean; /** - * Results per page (max 100) + * Pass `true` to create an initial commit with empty README. */ - per_page?: number; - - pull_number: number; - - repo: string; -}; -type PullsListReviewRequestsParamsDeprecatedNumber = { + auto_init?: boolean; /** - * @deprecated "number" parameter renamed to "pull_number" + * Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. */ - number: number; - - owner: string; + delete_branch_on_merge?: boolean; /** - * Page number of the results to fetch. + * A short description of the repository. */ - page?: number; + description?: string; /** - * Results per page (max 100) + * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". */ - per_page?: number; - - repo: string; -}; -type PullsListReviewRequestsParams = { - owner: string; + gitignore_template?: string; /** - * Page number of the results to fetch. + * Either `true` to enable issues for this repository or `false` to disable them. */ - page?: number; + has_issues?: boolean; /** - * Results per page (max 100) + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. */ - per_page?: number; - - pull_number: number; - - repo: string; -}; -type PullsListReviewsParamsDeprecatedNumber = { + has_projects?: boolean; /** - * @deprecated "number" parameter renamed to "pull_number" + * Either `true` to enable the wiki for this repository or `false` to disable it. */ - number: number; - - owner: string; + has_wiki?: boolean; /** - * Page number of the results to fetch. + * A URL with more information about the repository. */ - page?: number; + homepage?: string; /** - * Results per page (max 100) + * Either `true` to make this repo available as a template repository or `false` to prevent it. */ - per_page?: number; - - repo: string; -}; -type PullsListReviewsParams = { - owner: string; + is_template?: boolean; /** - * Page number of the results to fetch. + * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". */ - page?: number; + license_template?: string; /** - * Results per page (max 100) + * The name of the repository. */ - per_page?: number; - - pull_number: number; + name: string; - repo: string; -}; -type PullsMergeParamsDeprecatedNumber = { + org: string; /** - * Extra detail to append to automatic commit message. + * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. */ - commit_message?: string; + private?: boolean; /** - * Title for the automatic commit message. + * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ - commit_title?: string; + team_id?: number; /** - * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `visibility` can also be `internal`. For more information, see "[Creating an internal repository](https://help.github.com/github/creating-cloning-and-archiving-repositories/creating-an-internal-repository)" in the GitHub Help documentation. + * The `visibility` parameter overrides the `private` parameter when you use both parameters with the `nebula-preview` preview header. */ - merge_method?: "merge" | "squash" | "rebase"; + visibility?: "public" | "private" | "visibility" | "internal"; +}; +export type ReposCreateOrUpdateFileParams = { /** - * @deprecated "number" parameter renamed to "pull_number" + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - number: number; - - owner: string; - - repo: string; + author?: ReposCreateOrUpdateFileParamsAuthor; /** - * SHA that pull request head must match to allow merge. + * The branch name. Default: the repository’s default branch (usually `master`) */ - sha?: string; -}; -type PullsMergeParams = { + branch?: string; /** - * Extra detail to append to automatic commit message. + * The person that committed the file. Default: the authenticated user. */ - commit_message?: string; + committer?: ReposCreateOrUpdateFileParamsCommitter; /** - * Title for the automatic commit message. + * The new file content, using Base64 encoding. */ - commit_title?: string; + content: string; /** - * Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * The commit message. */ - merge_method?: "merge" | "squash" | "rebase"; + message: string; owner: string; - pull_number: number; + path: string; repo: string; /** - * SHA that pull request head must match to allow merge. + * **Required if you are updating a file**. The blob SHA of the file being replaced. */ sha?: string; }; -type PullsSubmitReviewParamsDeprecatedNumber = { +export type ReposCreateReleaseParams = { /** - * The body text of the pull request review + * Text describing the contents of the tag. */ body?: string; /** - * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * `true` to create a draft (unpublished) release, `false` to create a published one. */ - event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; + draft?: boolean; /** - * @deprecated "number" parameter renamed to "pull_number" + * The name of the release. */ - number: number; + name?: string; owner: string; - - repo: string; - - review_id: number; -}; -type PullsSubmitReviewParams = { - /** - * The body text of the pull request review - */ - body?: string; /** - * The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * `true` to identify the release as a prerelease. `false` to identify the release as a full release. */ - event: "APPROVE" | "REQUEST_CHANGES" | "COMMENT"; - - owner: string; - - pull_number: number; + prerelease?: boolean; repo: string; - - review_id: number; -}; -type PullsUpdateParamsDeprecatedNumber = { /** - * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. + * The name of the tag. */ - base?: string; + tag_name: string; /** - * The contents of the pull request. + * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - body?: string; + target_commitish?: string; +}; +export type ReposCreateStatusParams = { /** - * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + * A string label to differentiate this status from the status of other systems. */ - maintainer_can_modify?: boolean; + context?: string; /** - * @deprecated "number" parameter renamed to "pull_number" + * A short description of the status. */ - number: number; + description?: string; owner: string; repo: string; + + sha: string; /** - * State of this Pull Request. Either `open` or `closed`. + * The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. */ - state?: "open" | "closed"; + state: "error" | "failure" | "pending" | "success"; /** - * The title of the pull request. + * The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` */ - title?: string; + target_url?: string; }; -type PullsUpdateParams = { +export type ReposCreateUsingTemplateParams = { /** - * The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. + * A short description of the new repository. */ - base?: string; + description?: string; /** - * The contents of the pull request. + * The name of the new repository. */ - body?: string; + name: string; /** - * Indicates whether [maintainers can modify](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. + * The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ - maintainer_can_modify?: boolean; + owner?: string; + /** + * Either `true` to create a new private repository or `false` to create a new public one. + */ + private?: boolean; - owner: string; + template_owner: string; - pull_number: number; + template_repo: string; +}; +export type ReposDeclineInvitationParams = { + invitation_id: number; +}; +export type ReposDeleteParams = { + owner: string; repo: string; - /** - * State of this Pull Request. Either `open` or `closed`. - */ - state?: "open" | "closed"; - /** - * The title of the pull request. - */ - title?: string; }; -type PullsUpdateBranchParams = { - /** - * The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits on a repository](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. - */ - expected_head_sha?: string; +export type ReposDeleteCommitCommentParams = { + comment_id: number; owner: string; - pull_number: number; - repo: string; }; -type PullsUpdateCommentParams = { - /** - * The text of the reply to the review comment. - */ - body: string; - - comment_id: number; +export type ReposDeleteDownloadParams = { + download_id: number; owner: string; repo: string; }; -type PullsUpdateReviewParamsDeprecatedNumber = { +export type ReposDeleteFileParams = { /** - * The body text of the pull request review. + * object containing information about the author. */ - body: string; + author?: ReposDeleteFileParamsAuthor; /** - * @deprecated "number" parameter renamed to "pull_number" + * The branch name. Default: the repository’s default branch (usually `master`) */ - number: number; - - owner: string; - - repo: string; - - review_id: number; -}; -type PullsUpdateReviewParams = { + branch?: string; /** - * The body text of the pull request review. + * object containing information about the committer. */ - body: string; + committer?: ReposDeleteFileParamsCommitter; + /** + * The commit message. + */ + message: string; owner: string; - pull_number: number; + path: string; repo: string; - - review_id: number; -}; -type ReactionsCreateForCommitCommentParams = { - comment_id: number; /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the commit comment. + * The blob SHA of the file being replaced. */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; + sha: string; +}; +export type ReposDeleteHookParams = { + hook_id: number; owner: string; repo: string; }; -type ReactionsCreateForIssueParamsDeprecatedNumber = { - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; +export type ReposDeleteInvitationParams = { + invitation_id: number; owner: string; repo: string; }; -type ReactionsCreateForIssueParams = { - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - - issue_number: number; - +export type ReposDeleteReleaseParams = { owner: string; + release_id: number; + repo: string; }; -type ReactionsCreateForIssueCommentParams = { - comment_id: number; - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the issue comment. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; +export type ReposDeleteReleaseAssetParams = { + asset_id: number; owner: string; repo: string; }; -type ReactionsCreateForPullRequestReviewCommentParams = { - comment_id: number; - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the pull request review comment. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; +export type ReposDisableAutomatedSecurityFixesParams = { + owner: string; + repo: string; +}; +export type ReposDisablePagesSiteParams = { owner: string; repo: string; }; -type ReactionsCreateForTeamDiscussionParams = { - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; +export type ReposDisableVulnerabilityAlertsParams = { + owner: string; - discussion_number: number; + repo: string; +}; +export type ReposEnableAutomatedSecurityFixesParams = { + owner: string; - team_id: number; + repo: string; }; -type ReactionsCreateForTeamDiscussionCommentParams = { - comment_number: number; - /** - * The [reaction type](https://developer.github.com/v3/reactions/#reaction-types) to add to the team discussion comment. - */ - content: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; +export type ReposEnablePagesSiteParams = { + owner: string; - discussion_number: number; + repo: string; - team_id: number; -}; -type ReactionsDeleteParams = { - reaction_id: number; + source?: ReposEnablePagesSiteParamsSource; }; -type ReactionsListForCommitCommentParams = { - comment_id: number; - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a commit comment. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; +export type ReposEnableVulnerabilityAlertsParams = { + owner: string; + repo: string; +}; +export type ReposGetParams = { owner: string; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; repo: string; }; -type ReactionsListForIssueParamsDeprecatedNumber = { - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - /** - * @deprecated "number" parameter renamed to "issue_number" - */ - number: number; +export type ReposGetAppsWithAccessToProtectedBranchParams = { + branch: string; owner: string; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; repo: string; }; -type ReactionsListForIssueParams = { - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; - - issue_number: number; +export type ReposGetArchiveLinkParams = { + archive_format: string; owner: string; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; + + ref: string; repo: string; }; -type ReactionsListForIssueCommentParams = { - comment_id: number; - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to an issue comment. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; +export type ReposGetBranchParams = { + branch: string; + + owner: string; + + repo: string; +}; +export type ReposGetBranchProtectionParams = { + branch: string; owner: string; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; repo: string; }; -type ReactionsListForPullRequestReviewCommentParams = { - comment_id: number; +export type ReposGetClonesParams = { + owner: string; /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a pull request review comment. + * Must be one of: `day`, `week`. */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; + per?: "day" | "week"; + repo: string; +}; +export type ReposGetCodeFrequencyStatsParams = { owner: string; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; repo: string; }; -type ReactionsListForTeamDiscussionParams = { - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; +export type ReposGetCollaboratorPermissionLevelParams = { + owner: string; - discussion_number: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; + repo: string; - team_id: number; + username: string; }; -type ReactionsListForTeamDiscussionCommentParams = { - comment_number: number; - /** - * Returns a single [reaction type](https://developer.github.com/v3/reactions/#reaction-types). Omit this parameter to list all reactions to a team discussion comment. - */ - content?: - | "+1" - | "-1" - | "laugh" - | "confused" - | "heart" - | "hooray" - | "rocket" - | "eyes"; +export type ReposGetCombinedStatusForRefParams = { + owner: string; - discussion_number: number; + ref: string; + + repo: string; +}; +export type ReposGetCommitParamsDeprecatedSha = { + owner: string; + + repo: string; /** - * Page number of the results to fetch. + * @deprecated "sha" parameter renamed to "ref" */ - page?: number; + sha: string; +}; +export type ReposGetCommitParamsDeprecatedCommitSha = { /** - * Results per page (max 100) + * @deprecated "commit_sha" parameter renamed to "ref" */ - per_page?: number; + commit_sha: string; - team_id: number; + owner: string; + + repo: string; }; -type ReposAcceptInvitationParams = { - invitation_id: number; +export type ReposGetCommitParams = { + owner: string; + + ref: string; + + repo: string; }; -type ReposAddCollaboratorParams = { +export type ReposGetCommitActivityStatsParams = { owner: string; - /** - * The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: - * \* `pull` - can pull, but not push to or administer this repository. - * \* `push` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push and administer this repository. - */ - permission?: "pull" | "push" | "admin"; repo: string; +}; +export type ReposGetCommitCommentParams = { + comment_id: number; - username: string; + owner: string; + + repo: string; }; -type ReposAddDeployKeyParams = { - /** - * The contents of the key. - */ - key: string; +export type ReposGetCommitRefShaParams = { + owner: string; + + ref: string; + repo: string; +}; +export type ReposGetContentsParams = { owner: string; + + path: string; /** - * If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. - * - * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/)." + * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - read_only?: boolean; + ref?: string; repo: string; - /** - * A name for the key. - */ - title?: string; }; -type ReposAddProtectedBranchAdminEnforcementParams = { - branch: string; - +export type ReposGetContributorsStatsParams = { owner: string; repo: string; }; -type ReposAddProtectedBranchAppRestrictionsParams = { - apps: string[]; - - branch: string; +export type ReposGetDeployKeyParams = { + key_id: number; owner: string; repo: string; }; -type ReposAddProtectedBranchRequiredSignaturesParams = { - branch: string; +export type ReposGetDeploymentParams = { + deployment_id: number; owner: string; repo: string; }; -type ReposAddProtectedBranchRequiredStatusChecksContextsParams = { - branch: string; - - contexts: string[]; +export type ReposGetDeploymentStatusParams = { + deployment_id: number; owner: string; repo: string; + + status_id: number; }; -type ReposAddProtectedBranchTeamRestrictionsParams = { - branch: string; +export type ReposGetDownloadParams = { + download_id: number; owner: string; repo: string; - - teams: string[]; }; -type ReposAddProtectedBranchUserRestrictionsParams = { - branch: string; +export type ReposGetHookParams = { + hook_id: number; owner: string; repo: string; +}; +export type ReposGetLatestPagesBuildParams = { + owner: string; - users: string[]; + repo: string; }; -type ReposCheckCollaboratorParams = { +export type ReposGetLatestReleaseParams = { owner: string; repo: string; +}; +export type ReposGetPagesParams = { + owner: string; - username: string; + repo: string; }; -type ReposCheckVulnerabilityAlertsParams = { +export type ReposGetPagesBuildParams = { + build_id: number; + owner: string; repo: string; }; -type ReposCompareCommitsParams = { - base: string; +export type ReposGetParticipationStatsParams = { + owner: string; - head: string; + repo: string; +}; +export type ReposGetProtectedBranchAdminEnforcementParams = { + branch: string; owner: string; repo: string; }; -type ReposCreateCommitCommentParamsDeprecatedSha = { - /** - * The contents of the comment. - */ - body: string; +export type ReposGetProtectedBranchPullRequestReviewEnforcementParams = { + branch: string; owner: string; - /** - * Relative path of the file to comment on. - */ - path?: string; - /** - * Line index in the diff to comment on. - */ - position?: number; repo: string; - /** - * @deprecated "sha" parameter renamed to "commit_sha" - */ - sha: string; }; -type ReposCreateCommitCommentParamsDeprecatedLine = { - /** - * The contents of the comment. - */ - body: string; +export type ReposGetProtectedBranchRequiredSignaturesParams = { + branch: string; - commit_sha: string; - /** - * **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. - * @deprecated "line" parameter has been deprecated and will be removed in future - */ - line?: number; + owner: string; + + repo: string; +}; +export type ReposGetProtectedBranchRequiredStatusChecksParams = { + branch: string; owner: string; - /** - * Relative path of the file to comment on. - */ - path?: string; - /** - * Line index in the diff to comment on. - */ - position?: number; repo: string; }; -type ReposCreateCommitCommentParams = { - /** - * The contents of the comment. - */ - body: string; +export type ReposGetProtectedBranchRestrictionsParams = { + branch: string; - commit_sha: string; + owner: string; + repo: string; +}; +export type ReposGetPunchCardStatsParams = { owner: string; - /** - * Relative path of the file to comment on. - */ - path?: string; - /** - * Line index in the diff to comment on. - */ - position?: number; repo: string; }; -type ReposCreateDeploymentParams = { - /** - * Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. - */ - auto_merge?: boolean; - /** - * Short description of the deployment. - */ - description?: string; +export type ReposGetReadmeParams = { + owner: string; /** - * Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - environment?: string; + ref?: string; + repo: string; +}; +export type ReposGetReleaseParams = { owner: string; - /** - * JSON payload with extra information about the deployment. - */ - payload?: string; - /** - * Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. - */ - production_environment?: boolean; - /** - * The ref to deploy. This can be a branch, tag, or SHA. - */ - ref: string; + + release_id: number; repo: string; - /** - * The [status](https://developer.github.com/v3/repos/statuses/) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. - */ - required_contexts?: string[]; - /** - * Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). - */ - task?: string; - /** - * Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. - */ - transient_environment?: boolean; }; -type ReposCreateDeploymentStatusParams = { - /** - * Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` - * **Note:** To add an `inactive` status to `production` environments, you must use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. - */ - auto_inactive?: boolean; +export type ReposGetReleaseAssetParams = { + asset_id: number; - deployment_id: number; - /** - * A short description of the status. The maximum description length is 140 characters. - */ - description?: string; - /** - * Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. **Note:** This parameter requires you to use the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. - */ - environment?: "production" | "staging" | "qa"; - /** - * Sets the URL for accessing your environment. Default: `""` - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. - */ - environment_url?: string; - /** - * The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` - * **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. **Note:** This parameter requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. - */ - log_url?: string; + owner: string; + repo: string; +}; +export type ReposGetReleaseByTagParams = { owner: string; repo: string; - /** - * The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued` `pending`, or `success`. **Note:** To use the `inactive` state, you must provide the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/v3/previews/#enhanced-deployments) custom media type. To use the `in_progress` and `queued` states, you must provide the [`application/vnd.github.flash-preview+json`](https://developer.github.com/v3/previews/#deployment-statuses) custom media type. - */ - state: - | "error" - | "failure" - | "inactive" - | "in_progress" - | "queued" - | "pending" - | "success"; - /** - * The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. - */ - target_url?: string; + + tag: string; }; -type ReposCreateDispatchEventParams = { - /** - * JSON payload with extra information about the webhook event that your action or worklow may use. - */ - client_payload?: ReposCreateDispatchEventParamsClientPayload; - /** - * **Required:** A custom webhook event name. - */ - event_type?: string; +export type ReposGetTeamsWithAccessToProtectedBranchParams = { + branch: string; owner: string; repo: string; }; -type ReposCreateFileParams = { - /** - * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. - */ - author?: ReposCreateFileParamsAuthor; - /** - * The branch name. Default: the repository’s default branch (usually `master`) - */ - branch?: string; - /** - * The person that committed the file. Default: the authenticated user. - */ - committer?: ReposCreateFileParamsCommitter; - /** - * The new file content, using Base64 encoding. - */ - content: string; - /** - * The commit message. - */ - message: string; +export type ReposGetTopPathsParams = { + owner: string; + repo: string; +}; +export type ReposGetTopReferrersParams = { owner: string; - path: string; + repo: string; +}; +export type ReposGetUsersWithAccessToProtectedBranchParams = { + branch: string; + + owner: string; repo: string; - /** - * **Required if you are updating a file**. The blob SHA of the file being replaced. - */ - sha?: string; }; -type ReposCreateForAuthenticatedUserParams = { - /** - * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - */ - allow_merge_commit?: boolean; - /** - * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. - */ - allow_rebase_merge?: boolean; - /** - * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. - */ - allow_squash_merge?: boolean; - /** - * Pass `true` to create an initial commit with empty README. - */ - auto_init?: boolean; - /** - * A short description of the repository. - */ - description?: string; - /** - * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". - */ - gitignore_template?: string; - /** - * Either `true` to enable issues for this repository or `false` to disable them. - */ - has_issues?: boolean; +export type ReposGetViewsParams = { + owner: string; /** - * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * Must be one of: `day`, `week`. */ - has_projects?: boolean; + per?: "day" | "week"; + + repo: string; +}; +export type ReposListParams = { /** - * Either `true` to enable the wiki for this repository or `false` to disable it. + * Comma-separated list of values. Can include: + * \* `owner`: Repositories that are owned by the authenticated user. + * \* `collaborator`: Repositories that the user has been added to as a collaborator. + * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. */ - has_wiki?: boolean; + affiliation?: string; /** - * A URL with more information about the repository. + * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ - homepage?: string; + direction?: "asc" | "desc"; /** - * Either `true` to make this repo available as a template repository or `false` to prevent it. + * Page number of the results to fetch. */ - is_template?: boolean; + page?: number; /** - * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". + * Results per page (max 100) */ - license_template?: string; + per_page?: number; /** - * The name of the repository. + * Can be one of `created`, `updated`, `pushed`, `full_name`. */ - name: string; + sort?: "created" | "updated" | "pushed" | "full_name"; /** - * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + * Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` + * + * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ - private?: boolean; + type?: "all" | "owner" | "public" | "private" | "member"; /** - * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + * Can be one of `all`, `public`, or `private`. */ - team_id?: number; + visibility?: "all" | "public" | "private"; }; -type ReposCreateForkParams = { - /** - * Optional parameter to specify the organization name if forking into an organization. - */ - organization?: string; +export type ReposListAppsWithAccessToProtectedBranchParams = { + branch: string; owner: string; repo: string; }; -type ReposCreateHookParams = { - /** - * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - */ - active?: boolean; - /** - * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). - */ - config: ReposCreateHookParamsConfig; +export type ReposListAssetsForReleaseParams = { + owner: string; /** - * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. + * Page number of the results to fetch. */ - events?: string[]; + page?: number; /** - * Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. + * Results per page (max 100) */ - name?: string; + per_page?: number; - owner: string; + release_id: number; repo: string; }; -type ReposCreateInOrgParams = { - /** - * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - */ - allow_merge_commit?: boolean; - /** - * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. - */ - allow_rebase_merge?: boolean; +export type ReposListBranchesParams = { + owner: string; /** - * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * Page number of the results to fetch. */ - allow_squash_merge?: boolean; + page?: number; /** - * Pass `true` to create an initial commit with empty README. + * Results per page (max 100) */ - auto_init?: boolean; + per_page?: number; /** - * A short description of the repository. + * Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ - description?: string; + protected?: boolean; + + repo: string; +}; +export type ReposListBranchesForHeadCommitParams = { + commit_sha: string; + + owner: string; + + repo: string; +}; +export type ReposListCollaboratorsParams = { /** - * Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". + * Filter collaborators returned by their affiliation. Can be one of: + * \* `outside`: All outside collaborators of an organization-owned repository. + * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. + * \* `all`: All collaborators the authenticated user can see. */ - gitignore_template?: string; + affiliation?: "outside" | "direct" | "all"; + + owner: string; /** - * Either `true` to enable issues for this repository or `false` to disable them. + * Page number of the results to fetch. */ - has_issues?: boolean; + page?: number; /** - * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * Results per page (max 100) */ - has_projects?: boolean; + per_page?: number; + + repo: string; +}; +export type ReposListCommentsForCommitParamsDeprecatedRef = { + owner: string; /** - * Either `true` to enable the wiki for this repository or `false` to disable it. + * Page number of the results to fetch. */ - has_wiki?: boolean; + page?: number; /** - * A URL with more information about the repository. + * Results per page (max 100) */ - homepage?: string; + per_page?: number; /** - * Either `true` to make this repo available as a template repository or `false` to prevent it. + * @deprecated "ref" parameter renamed to "commit_sha" */ - is_template?: boolean; + ref: string; + + repo: string; +}; +export type ReposListCommentsForCommitParams = { + commit_sha: string; + + owner: string; /** - * Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". + * Page number of the results to fetch. */ - license_template?: string; + page?: number; /** - * The name of the repository. + * Results per page (max 100) */ - name: string; + per_page?: number; - org: string; + repo: string; +}; +export type ReposListCommitCommentsParams = { + owner: string; /** - * Either `true` to create a private repository or `false` to create a public one. Creating private repositories requires a paid GitHub account. + * Page number of the results to fetch. */ - private?: boolean; + page?: number; /** - * The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. + * Results per page (max 100) */ - team_id?: number; + per_page?: number; + + repo: string; }; -type ReposCreateOrUpdateFileParams = { +export type ReposListCommitsParams = { /** - * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. - */ - author?: ReposCreateOrUpdateFileParamsAuthor; - /** - * The branch name. Default: the repository’s default branch (usually `master`) + * GitHub login or email address by which to filter by commit author. */ - branch?: string; + author?: string; + + owner: string; /** - * The person that committed the file. Default: the authenticated user. + * Page number of the results to fetch. */ - committer?: ReposCreateOrUpdateFileParamsCommitter; + page?: number; /** - * The new file content, using Base64 encoding. + * Only commits containing this file path will be returned. */ - content: string; + path?: string; /** - * The commit message. + * Results per page (max 100) */ - message: string; - - owner: string; - - path: string; + per_page?: number; repo: string; /** - * **Required if you are updating a file**. The blob SHA of the file being replaced. + * SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ sha?: string; -}; -type ReposCreateReleaseParams = { /** - * Text describing the contents of the tag. + * Only commits after this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - body?: string; + since?: string; /** - * `true` to create a draft (unpublished) release, `false` to create a published one. + * Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - draft?: boolean; + until?: string; +}; +export type ReposListContributorsParams = { /** - * The name of the release. + * Set to `1` or `true` to include anonymous contributors in results. */ - name?: string; + anon?: string; owner: string; /** - * `true` to identify the release as a prerelease. `false` to identify the release as a full release. - */ - prerelease?: boolean; - - repo: string; - /** - * The name of the tag. + * Page number of the results to fetch. */ - tag_name: string; + page?: number; /** - * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). + * Results per page (max 100) */ - target_commitish?: string; + per_page?: number; + + repo: string; }; -type ReposCreateStatusParams = { +export type ReposListDeployKeysParams = { + owner: string; /** - * A string label to differentiate this status from the status of other systems. + * Page number of the results to fetch. */ - context?: string; + page?: number; /** - * A short description of the status. + * Results per page (max 100) */ - description?: string; - - owner: string; + per_page?: number; repo: string; +}; +export type ReposListDeploymentStatusesParams = { + deployment_id: number; - sha: string; + owner: string; /** - * The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. + * Page number of the results to fetch. */ - state: "error" | "failure" | "pending" | "success"; + page?: number; /** - * The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. - * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: - * `http://ci.example.com/user/repo/build/sha` + * Results per page (max 100) */ - target_url?: string; + per_page?: number; + + repo: string; }; -type ReposCreateUsingTemplateParams = { +export type ReposListDeploymentsParams = { /** - * A short description of the new repository. + * The name of the environment that was deployed to (e.g., `staging` or `production`). */ - description?: string; + environment?: string; + + owner: string; /** - * The name of the new repository. + * Page number of the results to fetch. */ - name: string; + page?: number; /** - * The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. + * Results per page (max 100) */ - owner?: string; + per_page?: number; /** - * Either `true` to create a new private repository or `false` to create a new public one. + * The name of the ref. This can be a branch, tag, or SHA. */ - private?: boolean; - - template_owner: string; - - template_repo: string; -}; -type ReposDeclineInvitationParams = { - invitation_id: number; -}; -type ReposDeleteParams = { - owner: string; + ref?: string; repo: string; + /** + * The SHA recorded at creation time. + */ + sha?: string; + /** + * The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). + */ + task?: string; }; -type ReposDeleteCommitCommentParams = { - comment_id: number; - +export type ReposListDownloadsParams = { owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; }; -type ReposDeleteDownloadParams = { - download_id: number; - - owner: string; +export type ReposListForOrgParams = { + /** + * Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` + */ + direction?: "asc" | "desc"; - repo: string; + org: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * Can be one of `created`, `updated`, `pushed`, `full_name`. + */ + sort?: "created" | "updated" | "pushed" | "full_name"; + /** + * Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `type` can also be `internal`. + */ + type?: + | "all" + | "public" + | "private" + | "forks" + | "sources" + | "member" + | "internal"; }; -type ReposDeleteFileParams = { +export type ReposListForUserParams = { /** - * object containing information about the author. + * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ - author?: ReposDeleteFileParamsAuthor; + direction?: "asc" | "desc"; /** - * The branch name. Default: the repository’s default branch (usually `master`) + * Page number of the results to fetch. */ - branch?: string; + page?: number; /** - * object containing information about the committer. + * Results per page (max 100) */ - committer?: ReposDeleteFileParamsCommitter; + per_page?: number; /** - * The commit message. + * Can be one of `created`, `updated`, `pushed`, `full_name`. */ - message: string; - - owner: string; - - path: string; - - repo: string; + sort?: "created" | "updated" | "pushed" | "full_name"; /** - * The blob SHA of the file being replaced. + * Can be one of `all`, `owner`, `member`. */ - sha: string; -}; -type ReposDeleteHookParams = { - hook_id: number; - - owner: string; - - repo: string; -}; -type ReposDeleteInvitationParams = { - invitation_id: number; - - owner: string; - - repo: string; -}; -type ReposDeleteReleaseParams = { - owner: string; - - release_id: number; - - repo: string; -}; -type ReposDeleteReleaseAssetParams = { - asset_id: number; - - owner: string; - - repo: string; -}; -type ReposDisableAutomatedSecurityFixesParams = { - owner: string; + type?: "all" | "owner" | "member"; - repo: string; + username: string; }; -type ReposDisablePagesSiteParams = { +export type ReposListForksParams = { owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; + /** + * The sort order. Can be either `newest`, `oldest`, or `stargazers`. + */ + sort?: "newest" | "oldest" | "stargazers"; }; -type ReposDisableVulnerabilityAlertsParams = { +export type ReposListHooksParams = { owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; }; -type ReposEnableAutomatedSecurityFixesParams = { +export type ReposListInvitationsParams = { owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; }; -type ReposEnablePagesSiteParams = { - owner: string; - - repo: string; - - source?: ReposEnablePagesSiteParamsSource; +export type ReposListInvitationsForAuthenticatedUserParams = { + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; }; -type ReposEnableVulnerabilityAlertsParams = { +export type ReposListLanguagesParams = { owner: string; repo: string; }; -type ReposGetParams = { +export type ReposListPagesBuildsParams = { owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; }; -type ReposGetAppsWithAccessToProtectedBranchParams = { +export type ReposListProtectedBranchRequiredStatusChecksContextsParams = { branch: string; owner: string; repo: string; }; -type ReposGetArchiveLinkParams = { - archive_format: string; - - owner: string; - - ref: string; - - repo: string; -}; -type ReposGetBranchParams = { +export type ReposListProtectedBranchTeamRestrictionsParams = { branch: string; owner: string; repo: string; }; -type ReposGetBranchProtectionParams = { +export type ReposListProtectedBranchUserRestrictionsParams = { branch: string; owner: string; repo: string; }; -type ReposGetClonesParams = { - owner: string; +export type ReposListPublicParams = { /** - * Must be one of: `day`, `week`. + * Page number of the results to fetch. */ - per?: "day" | "week"; - - repo: string; + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; + /** + * The integer ID of the last Repository that you've seen. + */ + since?: string; }; -type ReposGetCodeFrequencyStatsParams = { +export type ReposListPullRequestsAssociatedWithCommitParams = { + commit_sha: string; + owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; }; -type ReposGetCollaboratorPermissionLevelParams = { +export type ReposListReleasesParams = { owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; - - username: string; }; -type ReposGetCombinedStatusForRefParams = { +export type ReposListStatusesForRefParams = { owner: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; ref: string; repo: string; }; -type ReposGetCommitParamsDeprecatedSha = { +export type ReposListTagsParams = { owner: string; - - repo: string; /** - * @deprecated "sha" parameter renamed to "ref" + * Page number of the results to fetch. */ - sha: string; -}; -type ReposGetCommitParamsDeprecatedCommitSha = { + page?: number; /** - * @deprecated "commit_sha" parameter renamed to "ref" + * Results per page (max 100) */ - commit_sha: string; - - owner: string; + per_page?: number; repo: string; }; -type ReposGetCommitParams = { +export type ReposListTeamsParams = { owner: string; - - ref: string; + /** + * Page number of the results to fetch. + */ + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; repo: string; }; -type ReposGetCommitActivityStatsParams = { +export type ReposListTeamsWithAccessToProtectedBranchParams = { + branch: string; + owner: string; repo: string; }; -type ReposGetCommitCommentParams = { - comment_id: number; - +export type ReposListTopicsParams = { owner: string; repo: string; }; -type ReposGetCommitRefShaParams = { - owner: string; +export type ReposListUsersWithAccessToProtectedBranchParams = { + branch: string; - ref: string; + owner: string; repo: string; }; -type ReposGetContentsParams = { - owner: string; - - path: string; +export type ReposMergeParams = { /** - * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) + * The name of the base branch that the head will be merged into. */ - ref?: string; + base: string; + /** + * Commit message to use for the merge commit. If omitted, a default message will be used. + */ + commit_message?: string; + /** + * The head to merge. This can be a branch name or a commit SHA1. + */ + head: string; - repo: string; -}; -type ReposGetContributorsStatsParams = { owner: string; repo: string; }; -type ReposGetDeployKeyParams = { - key_id: number; +export type ReposPingHookParams = { + hook_id: number; owner: string; repo: string; }; -type ReposGetDeploymentParams = { - deployment_id: number; +export type ReposRemoveBranchProtectionParams = { + branch: string; owner: string; repo: string; }; -type ReposGetDeploymentStatusParams = { - deployment_id: number; - +export type ReposRemoveCollaboratorParams = { owner: string; repo: string; - status_id: number; + username: string; }; -type ReposGetDownloadParams = { - download_id: number; +export type ReposRemoveDeployKeyParams = { + key_id: number; owner: string; repo: string; }; -type ReposGetHookParams = { - hook_id: number; +export type ReposRemoveProtectedBranchAdminEnforcementParams = { + branch: string; owner: string; repo: string; }; -type ReposGetLatestPagesBuildParams = { - owner: string; +export type ReposRemoveProtectedBranchAppRestrictionsParams = { + apps: string[]; - repo: string; -}; -type ReposGetLatestReleaseParams = { - owner: string; + branch: string; - repo: string; -}; -type ReposGetPagesParams = { owner: string; repo: string; }; -type ReposGetPagesBuildParams = { - build_id: number; +export type ReposRemoveProtectedBranchPullRequestReviewEnforcementParams = { + branch: string; owner: string; repo: string; }; -type ReposGetParticipationStatsParams = { +export type ReposRemoveProtectedBranchRequiredSignaturesParams = { + branch: string; + owner: string; repo: string; }; -type ReposGetProtectedBranchAdminEnforcementParams = { +export type ReposRemoveProtectedBranchRequiredStatusChecksParams = { branch: string; owner: string; repo: string; }; -type ReposGetProtectedBranchPullRequestReviewEnforcementParams = { +export type ReposRemoveProtectedBranchRequiredStatusChecksContextsParams = { branch: string; + contexts: string[]; + owner: string; repo: string; }; -type ReposGetProtectedBranchRequiredSignaturesParams = { +export type ReposRemoveProtectedBranchRestrictionsParams = { branch: string; owner: string; repo: string; }; -type ReposGetProtectedBranchRequiredStatusChecksParams = { +export type ReposRemoveProtectedBranchTeamRestrictionsParams = { branch: string; owner: string; repo: string; + + teams: string[]; }; -type ReposGetProtectedBranchRestrictionsParams = { +export type ReposRemoveProtectedBranchUserRestrictionsParams = { branch: string; owner: string; repo: string; -}; -type ReposGetPunchCardStatsParams = { - owner: string; - repo: string; + users: string[]; }; -type ReposGetReadmeParams = { +export type ReposReplaceProtectedBranchAppRestrictionsParams = { + apps: string[]; + + branch: string; + owner: string; - /** - * The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) - */ - ref?: string; repo: string; }; -type ReposGetReleaseParams = { - owner: string; +export type ReposReplaceProtectedBranchRequiredStatusChecksContextsParams = { + branch: string; - release_id: number; + contexts: string[]; + + owner: string; repo: string; }; -type ReposGetReleaseAssetParams = { - asset_id: number; +export type ReposReplaceProtectedBranchTeamRestrictionsParams = { + branch: string; owner: string; repo: string; + + teams: string[]; }; -type ReposGetReleaseByTagParams = { +export type ReposReplaceProtectedBranchUserRestrictionsParams = { + branch: string; + owner: string; repo: string; - tag: string; + users: string[]; }; -type ReposGetTeamsWithAccessToProtectedBranchParams = { - branch: string; +export type ReposReplaceTopicsParams = { + /** + * An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. + */ + names: string[]; owner: string; repo: string; }; -type ReposGetTopPathsParams = { +export type ReposRequestPageBuildParams = { owner: string; repo: string; }; -type ReposGetTopReferrersParams = { +export type ReposRetrieveCommunityProfileMetricsParams = { owner: string; repo: string; }; -type ReposGetUsersWithAccessToProtectedBranchParams = { - branch: string; +export type ReposTestPushHookParams = { + hook_id: number; owner: string; repo: string; }; -type ReposGetViewsParams = { - owner: string; +export type ReposTransferParams = { /** - * Must be one of: `day`, `week`. + * **Required:** The username or organization name the repository will be transferred to. */ - per?: "day" | "week"; + new_owner?: string; + + owner: string; repo: string; + /** + * ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + */ + team_ids?: number[]; }; -type ReposListParams = { +export type ReposUpdateParams = { /** - * Comma-separated list of values. Can include: - * \* `owner`: Repositories that are owned by the authenticated user. - * \* `collaborator`: Repositories that the user has been added to as a collaborator. - * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. + * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. */ - affiliation?: string; + allow_merge_commit?: boolean; /** - * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` + * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. */ - direction?: "asc" | "desc"; + allow_rebase_merge?: boolean; /** - * Page number of the results to fetch. + * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. */ - page?: number; + allow_squash_merge?: boolean; + /** + * `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + */ + archived?: boolean; + /** + * Updates the default branch for this repository. + */ + default_branch?: string; + /** + * Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + */ + delete_branch_on_merge?: boolean; + /** + * A short description of the repository. + */ + description?: string; + /** + * Either `true` to enable issues for this repository or `false` to disable them. + */ + has_issues?: boolean; + /** + * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + */ + has_projects?: boolean; + /** + * Either `true` to enable the wiki for this repository or `false` to disable it. + */ + has_wiki?: boolean; + /** + * A URL with more information about the repository. + */ + homepage?: string; + /** + * Either `true` to make this repo available as a template repository or `false` to prevent it. + */ + is_template?: boolean; + /** + * The name of the repository. + */ + name?: string; + + owner: string; + /** + * Either `true` to make the repository private or `false` to make it public. Creating private repositories requires a paid GitHub account. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + */ + private?: boolean; + + repo: string; /** - * Results per page (max 100) + * Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud, `visibility` can also be `internal`. The `visibility` parameter overrides the `private` parameter when you use both along with the `nebula-preview` preview header. */ - per_page?: number; + visibility?: "public" | "private" | "visibility" | "internal"; +}; +export type ReposUpdateBranchProtectionParams = { /** - * Can be one of `created`, `updated`, `pushed`, `full_name`. + * Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ - sort?: "created" | "updated" | "pushed" | "full_name"; + allow_deletions?: boolean; /** - * Can be one of `all`, `owner`, `public`, `private`, `member`. Default: `all` - * - * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. + * Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://help.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ - type?: "all" | "owner" | "public" | "private" | "member"; + allow_force_pushes?: boolean | null; + + branch: string; /** - * Can be one of `all`, `public`, or `private`. + * Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. */ - visibility?: "all" | "public" | "private"; -}; -type ReposListAppsWithAccessToProtectedBranchParams = { - branch: string; + enforce_admins: boolean | null; owner: string; repo: string; -}; -type ReposListAssetsForReleaseParams = { - owner: string; /** - * Page number of the results to fetch. + * Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://help.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ - page?: number; + required_linear_history?: boolean; /** - * Results per page (max 100) + * Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ - per_page?: number; - - release_id: number; - - repo: string; -}; -type ReposListBranchesParams = { - owner: string; + required_pull_request_reviews: ReposUpdateBranchProtectionParamsRequiredPullRequestReviews | null; /** - * Page number of the results to fetch. + * Require status checks to pass before merging. Set to `null` to disable. */ - page?: number; + required_status_checks: ReposUpdateBranchProtectionParamsRequiredStatusChecks | null; /** - * Results per page (max 100) + * Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ - per_page?: number; + restrictions: ReposUpdateBranchProtectionParamsRestrictions | null; +}; +export type ReposUpdateCommitCommentParams = { /** - * Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. + * The contents of the comment */ - protected?: boolean; + body: string; - repo: string; -}; -type ReposListBranchesForHeadCommitParams = { - commit_sha: string; + comment_id: number; owner: string; repo: string; }; -type ReposListCollaboratorsParams = { +export type ReposUpdateFileParams = { /** - * Filter collaborators returned by their affiliation. Can be one of: - * \* `outside`: All outside collaborators of an organization-owned repository. - * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. - * \* `all`: All collaborators the authenticated user can see. + * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - affiliation?: "outside" | "direct" | "all"; - - owner: string; + author?: ReposUpdateFileParamsAuthor; /** - * Page number of the results to fetch. + * The branch name. Default: the repository’s default branch (usually `master`) */ - page?: number; + branch?: string; /** - * Results per page (max 100) + * The person that committed the file. Default: the authenticated user. */ - per_page?: number; + committer?: ReposUpdateFileParamsCommitter; + /** + * The new file content, using Base64 encoding. + */ + content: string; + /** + * The commit message. + */ + message: string; + + owner: string; + + path: string; repo: string; + /** + * **Required if you are updating a file**. The blob SHA of the file being replaced. + */ + sha?: string; }; -type ReposListCommentsForCommitParamsDeprecatedRef = { - owner: string; +export type ReposUpdateHookParams = { /** - * Page number of the results to fetch. + * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. */ - page?: number; + active?: boolean; /** - * Results per page (max 100) + * Determines a list of events to be added to the list of events that the Hook triggers for. */ - per_page?: number; + add_events?: string[]; /** - * @deprecated "ref" parameter renamed to "commit_sha" + * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). */ - ref: string; + config?: ReposUpdateHookParamsConfig; + /** + * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. This replaces the entire array of events. + */ + events?: string[]; - repo: string; -}; -type ReposListCommentsForCommitParams = { - commit_sha: string; + hook_id: number; owner: string; /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) + * Determines a list of events to be removed from the list of events that the Hook triggers for. */ - per_page?: number; + remove_events?: string[]; repo: string; }; -type ReposListCommitCommentsParams = { +export type ReposUpdateInformationAboutPagesSiteParams = { + /** + * Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://help.github.com/articles/using-a-custom-domain-with-github-pages/)." + */ + cname?: string; + owner: string; + + repo: string; /** - * Page number of the results to fetch. + * Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master /docs"`. */ - page?: number; + source?: '"gh-pages"' | '"master"' | '"master /docs"'; +}; +export type ReposUpdateInvitationParams = { + invitation_id: number; + + owner: string; /** - * Results per page (max 100) + * The permissions that the associated user will have on the repository. Valid values are `read`, `write`, and `admin`. */ - per_page?: number; + permissions?: "read" | "write" | "admin"; repo: string; }; -type ReposListCommitsParams = { +export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParams = { + branch: string; /** - * GitHub login or email address by which to filter by commit author. + * Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ - author?: string; + dismiss_stale_reviews?: boolean; + /** + * Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. + */ + dismissal_restrictions?: ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions; owner: string; + + repo: string; /** - * Page number of the results to fetch. + * Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. */ - page?: number; + require_code_owner_reviews?: boolean; /** - * Only commits containing this file path will be returned. + * Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. */ - path?: string; + required_approving_review_count?: number; +}; +export type ReposUpdateProtectedBranchRequiredStatusChecksParams = { + branch: string; /** - * Results per page (max 100) + * The list of status checks to require in order to merge into this branch */ - per_page?: number; + contexts?: string[]; + + owner: string; repo: string; /** - * SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). + * Require branches to be up to date before merging. */ - sha?: string; + strict?: boolean; +}; +export type ReposUpdateReleaseParams = { /** - * Only commits after this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * Text describing the contents of the tag. */ - since?: string; + body?: string; /** - * Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * `true` makes the release a draft, and `false` publishes the release. */ - until?: string; -}; -type ReposListContributorsParams = { + draft?: boolean; /** - * Set to `1` or `true` to include anonymous contributors in results. + * The name of the release. */ - anon?: string; + name?: string; owner: string; /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) + * `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ - per_page?: number; + prerelease?: boolean; + + release_id: number; repo: string; + /** + * The name of the tag. + */ + tag_name?: string; + /** + * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). + */ + target_commitish?: string; }; -type ReposListDeployKeysParams = { - owner: string; +export type ReposUpdateReleaseAssetParams = { + asset_id: number; /** - * Page number of the results to fetch. + * An alternate short description of the asset. Used in place of the filename. */ - page?: number; + label?: string; /** - * Results per page (max 100) + * The file name of the asset. */ - per_page?: number; + name?: string; + + owner: string; repo: string; }; -type ReposListDeploymentStatusesParams = { - deployment_id: number; +export type ReposUploadReleaseAssetParams = { + file: string | object; - owner: string; + headers: ReposUploadReleaseAssetParamsHeaders; /** - * Page number of the results to fetch. + * An alternate short description of the asset. Used in place of the filename. This should be set in a URI query parameter. */ - page?: number; + label?: string; /** - * Results per page (max 100) + * The file name of the asset. This should be set in a URI query parameter. */ - per_page?: number; - - repo: string; + name: string; + /** + * The `upload_url` key returned from creating or getting a release + */ + url: string; }; -type ReposListDeploymentsParams = { +export type SearchCodeParams = { /** - * The name of the environment that was deployed to (e.g., `staging` or `production`). + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - environment?: string; - - owner: string; + order?: "desc" | "asc"; /** * Page number of the results to fetch. */ @@ -27103,22 +30648,19 @@ type ReposListDeploymentsParams = { */ per_page?: number; /** - * The name of the ref. This can be a branch, tag, or SHA. + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching code](https://help.github.com/articles/searching-code/)" for a detailed list of qualifiers. */ - ref?: string; - - repo: string; + q: string; /** - * The SHA recorded at creation time. + * Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) */ - sha?: string; + sort?: "indexed"; +}; +export type SearchCommitsParams = { /** - * The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - task?: string; -}; -type ReposListDownloadsParams = { - owner: string; + order?: "desc" | "asc"; /** * Page number of the results to fetch. */ @@ -27127,16 +30669,26 @@ type ReposListDownloadsParams = { * Results per page (max 100) */ per_page?: number; - - repo: string; + /** + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching commits](https://help.github.com/articles/searching-commits/)" for a detailed list of qualifiers. + */ + q: string; + /** + * Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + */ + sort?: "author-date" | "committer-date"; }; -type ReposListForOrgParams = { +export type SearchEmailLegacyParams = { /** - * Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` + * The email address. */ - direction?: "asc" | "desc"; - - org: string; + email: string; +}; +export type SearchIssuesParams = { + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; /** * Page number of the results to fetch. */ @@ -27146,19 +30698,30 @@ type ReposListForOrgParams = { */ per_page?: number; /** - * Can be one of `created`, `updated`, `pushed`, `full_name`. + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. */ - sort?: "created" | "updated" | "pushed" | "full_name"; + q: string; /** - * Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`. + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) */ - type?: "all" | "public" | "private" | "forks" | "sources" | "member"; + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; }; -type ReposListForUserParams = { +export type SearchIssuesAndPullRequestsParams = { /** - * Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - direction?: "asc" | "desc"; + order?: "desc" | "asc"; /** * Page number of the results to fetch. */ @@ -27168,60 +30731,62 @@ type ReposListForUserParams = { */ per_page?: number; /** - * Can be one of `created`, `updated`, `pushed`, `full_name`. + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. */ - sort?: "created" | "updated" | "pushed" | "full_name"; + q: string; /** - * Can be one of `all`, `owner`, `member`. + * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) */ - type?: "all" | "owner" | "member"; - - username: string; + sort?: + | "comments" + | "reactions" + | "reactions-+1" + | "reactions--1" + | "reactions-smile" + | "reactions-thinking_face" + | "reactions-heart" + | "reactions-tada" + | "interactions" + | "created" + | "updated"; }; -type ReposListForksParams = { - owner: string; - /** - * Page number of the results to fetch. - */ - page?: number; +export type SearchIssuesLegacyParams = { /** - * Results per page (max 100) + * The search term. */ - per_page?: number; + keyword: string; - repo: string; + owner: string; + + repository: string; /** - * The sort order. Can be either `newest`, `oldest`, or `stargazers`. + * Indicates the state of the issues to return. Can be either `open` or `closed`. */ - sort?: "newest" | "oldest" | "stargazers"; + state: "open" | "closed"; }; -type ReposListHooksParams = { - owner: string; +export type SearchLabelsParams = { /** - * Page number of the results to fetch. + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - page?: number; + order?: "desc" | "asc"; /** - * Results per page (max 100) + * The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). */ - per_page?: number; - - repo: string; -}; -type ReposListInvitationsParams = { - owner: string; + q: string; /** - * Page number of the results to fetch. + * The id of the repository. */ - page?: number; + repository_id: number; /** - * Results per page (max 100) + * Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) */ - per_page?: number; - - repo: string; + sort?: "created" | "updated"; }; -type ReposListInvitationsForAuthenticatedUserParams = { +export type SearchReposParams = { + /** + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + */ + order?: "desc" | "asc"; /** * Page number of the results to fetch. */ @@ -27230,90 +30795,48 @@ type ReposListInvitationsForAuthenticatedUserParams = { * Results per page (max 100) */ per_page?: number; -}; -type ReposListLanguagesParams = { - owner: string; - - repo: string; -}; -type ReposListPagesBuildsParams = { - owner: string; /** - * Page number of the results to fetch. + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ - page?: number; + q: string; /** - * Results per page (max 100) + * Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) */ - per_page?: number; - - repo: string; -}; -type ReposListProtectedBranchRequiredStatusChecksContextsParams = { - branch: string; - - owner: string; - - repo: string; -}; -type ReposListProtectedBranchTeamRestrictionsParams = { - branch: string; - - owner: string; - - repo: string; -}; -type ReposListProtectedBranchUserRestrictionsParams = { - branch: string; - - owner: string; - - repo: string; + sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; }; -type ReposListPublicParams = { +export type SearchReposLegacyParams = { /** - * Page number of the results to fetch. + * The search term. */ - page?: number; + keyword: string; /** - * Results per page (max 100) + * Filter results by language. */ - per_page?: number; + language?: string; /** - * The integer ID of the last Repository that you've seen. + * The sort field. if `sort` param is provided. Can be either `asc` or `desc`. */ - since?: string; -}; -type ReposListPullRequestsAssociatedWithCommitParams = { - commit_sha: string; - - owner: string; + order?: "asc" | "desc"; /** - * Page number of the results to fetch. + * The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match. */ - page?: number; + sort?: "stars" | "forks" | "updated"; /** - * Results per page (max 100) + * The page number to fetch. */ - per_page?: number; - - repo: string; + start_page?: string; }; -type ReposListReleasesParams = { - owner: string; +export type SearchTopicsParams = { /** - * Page number of the results to fetch. + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). */ - page?: number; + q: string; +}; +export type SearchUsersParams = { /** - * Results per page (max 100) + * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - per_page?: number; - - repo: string; -}; -type ReposListStatusesForRefParams = { - owner: string; + order?: "desc" | "asc"; /** * Page number of the results to fetch. */ @@ -27322,536 +30845,612 @@ type ReposListStatusesForRefParams = { * Results per page (max 100) */ per_page?: number; - - ref: string; - - repo: string; -}; -type ReposListTagsParams = { - owner: string; /** - * Page number of the results to fetch. + * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching users](https://help.github.com/articles/searching-users/)" for a detailed list of qualifiers. */ - page?: number; + q: string; /** - * Results per page (max 100) + * Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) */ - per_page?: number; - - repo: string; + sort?: "followers" | "repositories" | "joined"; }; -type ReposListTeamsParams = { - owner: string; - /** - * Page number of the results to fetch. - */ - page?: number; +export type SearchUsersLegacyParams = { /** - * Results per page (max 100) + * The search term. */ - per_page?: number; - - repo: string; -}; -type ReposListTeamsWithAccessToProtectedBranchParams = { - branch: string; - - owner: string; - - repo: string; -}; -type ReposListTopicsParams = { - owner: string; - - repo: string; -}; -type ReposListUsersWithAccessToProtectedBranchParams = { - branch: string; - - owner: string; - - repo: string; -}; -type ReposMergeParams = { + keyword: string; /** - * The name of the base branch that the head will be merged into. + * The sort field. if `sort` param is provided. Can be either `asc` or `desc`. */ - base: string; + order?: "asc" | "desc"; /** - * Commit message to use for the merge commit. If omitted, a default message will be used. + * The sort field. One of `stars`, `forks`, or `updated`. Default: results are sorted by best match. */ - commit_message?: string; + sort?: "stars" | "forks" | "updated"; /** - * The head to merge. This can be a branch name or a commit SHA1. + * The page number to fetch. */ - head: string; - - owner: string; - - repo: string; -}; -type ReposPingHookParams = { - hook_id: number; - - owner: string; - - repo: string; -}; -type ReposRemoveBranchProtectionParams = { - branch: string; - - owner: string; - - repo: string; + start_page?: string; }; -type ReposRemoveCollaboratorParams = { - owner: string; - - repo: string; +export type TeamsAddMemberParams = { + team_id: number; username: string; }; -type ReposRemoveDeployKeyParams = { - key_id: number; - - owner: string; - - repo: string; -}; -type ReposRemoveProtectedBranchAdminEnforcementParams = { - branch: string; - - owner: string; - - repo: string; -}; -type ReposRemoveProtectedBranchAppRestrictionsParams = { - apps: string[]; - - branch: string; - - owner: string; +export type TeamsAddMemberLegacyParams = { + team_id: number; - repo: string; + username: string; }; -type ReposRemoveProtectedBranchPullRequestReviewEnforcementParams = { - branch: string; +export type TeamsAddOrUpdateMembershipParams = { + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; - owner: string; + team_id: number; - repo: string; + username: string; }; -type ReposRemoveProtectedBranchRequiredSignaturesParams = { - branch: string; +export type TeamsAddOrUpdateMembershipInOrgParams = { + org: string; + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; - owner: string; + team_slug: string; - repo: string; + username: string; }; -type ReposRemoveProtectedBranchRequiredStatusChecksParams = { - branch: string; +export type TeamsAddOrUpdateMembershipLegacyParams = { + /** + * The role that this user should have in the team. Can be one of: + * \* `member` - a normal member of the team. + * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + */ + role?: "member" | "maintainer"; - owner: string; + team_id: number; - repo: string; + username: string; }; -type ReposRemoveProtectedBranchRequiredStatusChecksContextsParams = { - branch: string; - - contexts: string[]; +export type TeamsAddOrUpdateProjectParams = { + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + permission?: "read" | "write" | "admin"; - owner: string; + project_id: number; - repo: string; + team_id: number; }; -type ReposRemoveProtectedBranchRestrictionsParams = { - branch: string; +export type TeamsAddOrUpdateProjectInOrgParams = { + org: string; + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + permission?: "read" | "write" | "admin"; - owner: string; + project_id: number; - repo: string; + team_slug: string; }; -type ReposRemoveProtectedBranchTeamRestrictionsParams = { - branch: string; - - owner: string; +export type TeamsAddOrUpdateProjectLegacyParams = { + /** + * The permission to grant to the team for this project. Can be one of: + * \* `read` - team members can read, but not write to or administer this project. + * \* `write` - team members can read and write, but not administer this project. + * \* `admin` - team members can read, write and administer this project. + * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + permission?: "read" | "write" | "admin"; - repo: string; + project_id: number; - teams: string[]; + team_id: number; }; -type ReposRemoveProtectedBranchUserRestrictionsParams = { - branch: string; - +export type TeamsAddOrUpdateRepoParams = { owner: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + */ + permission?: "pull" | "push" | "admin"; repo: string; - users: string[]; + team_id: number; }; -type ReposReplaceProtectedBranchAppRestrictionsParams = { - apps: string[]; - - branch: string; +export type TeamsAddOrUpdateRepoInOrgParams = { + org: string; owner: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + */ + permission?: "pull" | "push" | "admin"; repo: string; -}; -type ReposReplaceProtectedBranchRequiredStatusChecksContextsParams = { - branch: string; - - contexts: string[]; - - owner: string; - repo: string; + team_slug: string; }; -type ReposReplaceProtectedBranchTeamRestrictionsParams = { - branch: string; - +export type TeamsAddOrUpdateRepoLegacyParams = { owner: string; + /** + * The permission to grant the team on this repository. Can be one of: + * \* `pull` - team members can pull, but not push to or administer this repository. + * \* `push` - team members can pull and push, but not administer this repository. + * \* `admin` - team members can pull, push and administer this repository. + * + * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + */ + permission?: "pull" | "push" | "admin"; repo: string; - teams: string[]; + team_id: number; }; -type ReposReplaceProtectedBranchUserRestrictionsParams = { - branch: string; - +export type TeamsCheckManagesRepoParams = { owner: string; repo: string; - users: string[]; + team_id: number; }; -type ReposReplaceTopicsParams = { - /** - * An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. - */ - names: string[]; +export type TeamsCheckManagesRepoInOrgParams = { + org: string; owner: string; repo: string; -}; -type ReposRequestPageBuildParams = { - owner: string; - repo: string; + team_slug: string; }; -type ReposRetrieveCommunityProfileMetricsParams = { +export type TeamsCheckManagesRepoLegacyParams = { owner: string; repo: string; -}; -type ReposTestPushHookParams = { - hook_id: number; - - owner: string; - repo: string; + team_id: number; }; -type ReposTransferParams = { +export type TeamsCreateParamsDeprecatedPermission = { /** - * **Required:** The username or organization name the repository will be transferred to. + * The description of the team. */ - new_owner?: string; - - owner: string; - - repo: string; + description?: string; /** - * ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. + * List GitHub IDs for organization members who will become team maintainers. */ - team_ids?: number[]; -}; -type ReposUpdateParams = { + maintainers?: string[]; /** - * Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * The name of the team. */ - allow_merge_commit?: boolean; + name: string; + + org: string; /** - * Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * The ID of a team to set as the parent team. */ - allow_rebase_merge?: boolean; + parent_team_id?: number; /** - * Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + * @deprecated "permission" parameter has been deprecated and will be removed in future */ - allow_squash_merge?: boolean; + permission?: string; /** - * `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + * The level of privacy this team should have. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * Default: `secret` + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * Default for child team: `closed` */ - archived?: boolean; + privacy?: "secret" | "closed"; /** - * Updates the default branch for this repository. + * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ - default_branch?: string; + repo_names?: string[]; +}; +export type TeamsCreateParams = { /** - * A short description of the repository. + * The description of the team. */ description?: string; /** - * Either `true` to enable issues for this repository or `false` to disable them. + * List GitHub IDs for organization members who will become team maintainers. */ - has_issues?: boolean; + maintainers?: string[]; /** - * Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * The name of the team. */ - has_projects?: boolean; + name: string; + + org: string; /** - * Either `true` to enable the wiki for this repository or `false` to disable it. + * The ID of a team to set as the parent team. */ - has_wiki?: boolean; + parent_team_id?: number; /** - * A URL with more information about the repository. + * The level of privacy this team should have. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * Default: `secret` + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * Default for child team: `closed` */ - homepage?: string; + privacy?: "secret" | "closed"; /** - * Either `true` to make this repo available as a template repository or `false` to prevent it. + * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ - is_template?: boolean; + repo_names?: string[]; +}; +export type TeamsCreateDiscussionParams = { /** - * The name of the repository. + * The discussion post's body text. */ - name?: string; - - owner: string; + body: string; /** - * Either `true` to make the repository private or `false` to make it public. Creating private repositories requires a paid GitHub account. Default: `false`. - * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. */ private?: boolean; - repo: string; + team_id: number; + /** + * The discussion post's title. + */ + title: string; }; -type ReposUpdateBranchProtectionParams = { - branch: string; +export type TeamsCreateDiscussionCommentParams = { /** - * Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. + * The discussion comment's body text. */ - enforce_admins: boolean | null; + body: string; - owner: string; + discussion_number: number; - repo: string; - /** - * Require at least one approving review on a pull request, before merging. Set to `null` to disable. - */ - required_pull_request_reviews: ReposUpdateBranchProtectionParamsRequiredPullRequestReviews | null; - /** - * Require status checks to pass before merging. Set to `null` to disable. - */ - required_status_checks: ReposUpdateBranchProtectionParamsRequiredStatusChecks | null; - /** - * Restrict who can push to this branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. - */ - restrictions: ReposUpdateBranchProtectionParamsRestrictions | null; + team_id: number; }; -type ReposUpdateCommitCommentParams = { +export type TeamsCreateDiscussionCommentInOrgParams = { /** - * The contents of the comment + * The discussion comment's body text. */ body: string; - comment_id: number; + discussion_number: number; - owner: string; + org: string; - repo: string; + team_slug: string; }; -type ReposUpdateFileParams = { - /** - * The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. - */ - author?: ReposUpdateFileParamsAuthor; - /** - * The branch name. Default: the repository’s default branch (usually `master`) - */ - branch?: string; +export type TeamsCreateDiscussionCommentLegacyParams = { /** - * The person that committed the file. Default: the authenticated user. + * The discussion comment's body text. */ - committer?: ReposUpdateFileParamsCommitter; + body: string; + + discussion_number: number; + + team_id: number; +}; +export type TeamsCreateDiscussionInOrgParams = { /** - * The new file content, using Base64 encoding. + * The discussion post's body text. */ - content: string; + body: string; + + org: string; /** - * The commit message. + * Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. */ - message: string; - - owner: string; - - path: string; + private?: boolean; - repo: string; + team_slug: string; /** - * **Required if you are updating a file**. The blob SHA of the file being replaced. + * The discussion post's title. */ - sha?: string; + title: string; }; -type ReposUpdateHookParams = { - /** - * Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - */ - active?: boolean; +export type TeamsCreateDiscussionLegacyParams = { /** - * Determines a list of events to be added to the list of events that the Hook triggers for. + * The discussion post's body text. */ - add_events?: string[]; + body: string; /** - * Key/value pairs to provide settings for this webhook. [These are defined below](https://developer.github.com/v3/repos/hooks/#create-hook-config-params). + * Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. */ - config?: ReposUpdateHookParamsConfig; + private?: boolean; + + team_id: number; /** - * Determines what [events](https://developer.github.com/v3/activity/events/types/) the hook is triggered for. This replaces the entire array of events. + * The discussion post's title. */ - events?: string[]; + title: string; +}; +export type TeamsDeleteParams = { + team_id: number; +}; +export type TeamsDeleteDiscussionParams = { + discussion_number: number; - hook_id: number; + team_id: number; +}; +export type TeamsDeleteDiscussionCommentParams = { + comment_number: number; - owner: string; - /** - * Determines a list of events to be removed from the list of events that the Hook triggers for. - */ - remove_events?: string[]; + discussion_number: number; - repo: string; + team_id: number; }; -type ReposUpdateInformationAboutPagesSiteParams = { - /** - * Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://help.github.com/articles/using-a-custom-domain-with-github-pages/)." - */ - cname?: string; +export type TeamsDeleteDiscussionCommentInOrgParams = { + comment_number: number; - owner: string; + discussion_number: number; - repo: string; - /** - * Update the source for the repository. Must include the branch name, and may optionally specify the subdirectory `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master /docs"`. - */ - source?: '"gh-pages"' | '"master"' | '"master /docs"'; + org: string; + + team_slug: string; }; -type ReposUpdateInvitationParams = { - invitation_id: number; +export type TeamsDeleteDiscussionCommentLegacyParams = { + comment_number: number; - owner: string; + discussion_number: number; + + team_id: number; +}; +export type TeamsDeleteDiscussionInOrgParams = { + discussion_number: number; + + org: string; + + team_slug: string; +}; +export type TeamsDeleteDiscussionLegacyParams = { + discussion_number: number; + + team_id: number; +}; +export type TeamsDeleteInOrgParams = { + org: string; + + team_slug: string; +}; +export type TeamsDeleteLegacyParams = { + team_id: number; +}; +export type TeamsGetParams = { + team_id: number; +}; +export type TeamsGetByNameParams = { + org: string; + + team_slug: string; +}; +export type TeamsGetDiscussionParams = { + discussion_number: number; + + team_id: number; +}; +export type TeamsGetDiscussionCommentParams = { + comment_number: number; + + discussion_number: number; + + team_id: number; +}; +export type TeamsGetDiscussionCommentInOrgParams = { + comment_number: number; + + discussion_number: number; + + org: string; + + team_slug: string; +}; +export type TeamsGetDiscussionCommentLegacyParams = { + comment_number: number; + + discussion_number: number; + + team_id: number; +}; +export type TeamsGetDiscussionInOrgParams = { + discussion_number: number; + + org: string; + + team_slug: string; +}; +export type TeamsGetDiscussionLegacyParams = { + discussion_number: number; + + team_id: number; +}; +export type TeamsGetLegacyParams = { + team_id: number; +}; +export type TeamsGetMemberParams = { + team_id: number; + + username: string; +}; +export type TeamsGetMemberLegacyParams = { + team_id: number; + + username: string; +}; +export type TeamsGetMembershipParams = { + team_id: number; + + username: string; +}; +export type TeamsGetMembershipInOrgParams = { + org: string; + + team_slug: string; + + username: string; +}; +export type TeamsGetMembershipLegacyParams = { + team_id: number; + + username: string; +}; +export type TeamsListParams = { + org: string; /** - * The permissions that the associated user will have on the repository. Valid values are `read`, `write`, and `admin`. + * Page number of the results to fetch. */ - permissions?: "read" | "write" | "admin"; - - repo: string; + page?: number; + /** + * Results per page (max 100) + */ + per_page?: number; }; -type ReposUpdateProtectedBranchPullRequestReviewEnforcementParams = { - branch: string; +export type TeamsListChildParams = { /** - * Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. + * Page number of the results to fetch. */ - dismiss_stale_reviews?: boolean; + page?: number; /** - * Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. + * Results per page (max 100) */ - dismissal_restrictions?: ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions; - - owner: string; + per_page?: number; - repo: string; + team_id: number; +}; +export type TeamsListChildInOrgParams = { + org: string; /** - * Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/) have reviewed. + * Page number of the results to fetch. */ - require_code_owner_reviews?: boolean; + page?: number; /** - * Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6. + * Results per page (max 100) */ - required_approving_review_count?: number; + per_page?: number; + + team_slug: string; }; -type ReposUpdateProtectedBranchRequiredStatusChecksParams = { - branch: string; +export type TeamsListChildLegacyParams = { /** - * The list of status checks to require in order to merge into this branch + * Page number of the results to fetch. */ - contexts?: string[]; - - owner: string; - - repo: string; + page?: number; /** - * Require branches to be up to date before merging. + * Results per page (max 100) */ - strict?: boolean; + per_page?: number; + + team_id: number; }; -type ReposUpdateReleaseParams = { +export type TeamsListDiscussionCommentsParams = { /** - * Text describing the contents of the tag. + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. */ - body?: string; + direction?: "asc" | "desc"; + + discussion_number: number; /** - * `true` makes the release a draft, and `false` publishes the release. + * Page number of the results to fetch. */ - draft?: boolean; + page?: number; /** - * The name of the release. + * Results per page (max 100) */ - name?: string; + per_page?: number; - owner: string; + team_id: number; +}; +export type TeamsListDiscussionCommentsInOrgParams = { /** - * `true` to identify the release as a prerelease, `false` to identify the release as a full release. + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. */ - prerelease?: boolean; + direction?: "asc" | "desc"; - release_id: number; + discussion_number: number; - repo: string; + org: string; /** - * The name of the tag. + * Page number of the results to fetch. */ - tag_name?: string; + page?: number; /** - * Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). + * Results per page (max 100) */ - target_commitish?: string; + per_page?: number; + + team_slug: string; }; -type ReposUpdateReleaseAssetParams = { - asset_id: number; +export type TeamsListDiscussionCommentsLegacyParams = { + /** + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + */ + direction?: "asc" | "desc"; + + discussion_number: number; /** - * An alternate short description of the asset. Used in place of the filename. + * Page number of the results to fetch. */ - label?: string; + page?: number; /** - * The file name of the asset. + * Results per page (max 100) */ - name?: string; - - owner: string; + per_page?: number; - repo: string; + team_id: number; }; -type ReposUploadReleaseAssetParams = { - file: string | object; - - headers: ReposUploadReleaseAssetParamsHeaders; +export type TeamsListDiscussionsParams = { /** - * An alternate short description of the asset. Used in place of the filename. This should be set in a URI query parameter. + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. */ - label?: string; + direction?: "asc" | "desc"; /** - * The file name of the asset. This should be set in a URI query parameter. + * Page number of the results to fetch. */ - name: string; + page?: number; /** - * The `upload_url` key returned from creating or getting a release + * Results per page (max 100) */ - url: string; + per_page?: number; + + team_id: number; }; -type SearchCodeParams = { +export type TeamsListDiscussionsInOrgParams = { /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. */ - order?: "desc" | "asc"; + direction?: "asc" | "desc"; + + org: string; /** * Page number of the results to fetch. */ @@ -27860,20 +31459,26 @@ type SearchCodeParams = { * Results per page (max 100) */ per_page?: number; + + team_slug: string; +}; +export type TeamsListDiscussionsLegacyParams = { /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching code](https://help.github.com/articles/searching-code/)" for a detailed list of qualifiers. + * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. */ - q: string; + direction?: "asc" | "desc"; /** - * Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + * Page number of the results to fetch. */ - sort?: "indexed"; -}; -type SearchCommitsParams = { + page?: number; /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + * Results per page (max 100) */ - order?: "desc" | "asc"; + per_page?: number; + + team_id: number; +}; +export type TeamsListForAuthenticatedUserParams = { /** * Page number of the results to fetch. */ @@ -27882,20 +31487,28 @@ type SearchCommitsParams = { * Results per page (max 100) */ per_page?: number; +}; +export type TeamsListMembersParams = { /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching commits](https://help.github.com/articles/searching-commits/)" for a detailed list of qualifiers. + * Page number of the results to fetch. */ - q: string; + page?: number; /** - * Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + * Results per page (max 100) */ - sort?: "author-date" | "committer-date"; -}; -type SearchIssuesParams = { + per_page?: number; /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. */ - order?: "desc" | "asc"; + role?: "member" | "maintainer" | "all"; + + team_id: number; +}; +export type TeamsListMembersInOrgParams = { + org: string; /** * Page number of the results to fetch. */ @@ -27905,30 +31518,35 @@ type SearchIssuesParams = { */ per_page?: number; /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. */ - q: string; + role?: "member" | "maintainer" | "all"; + + team_slug: string; +}; +export type TeamsListMembersLegacyParams = { /** - * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + * Page number of the results to fetch. */ - sort?: - | "comments" - | "reactions" - | "reactions-+1" - | "reactions--1" - | "reactions-smile" - | "reactions-thinking_face" - | "reactions-heart" - | "reactions-tada" - | "interactions" - | "created" - | "updated"; -}; -type SearchIssuesAndPullRequestsParams = { + page?: number; /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + * Results per page (max 100) */ - order?: "desc" | "asc"; + per_page?: number; + /** + * Filters members returned by their role in the team. Can be one of: + * \* `member` - normal members of the team. + * \* `maintainer` - team maintainers. + * \* `all` - all members of the team. + */ + role?: "member" | "maintainer" | "all"; + + team_id: number; +}; +export type TeamsListPendingInvitationsParams = { /** * Page number of the results to fetch. */ @@ -27937,49 +31555,48 @@ type SearchIssuesAndPullRequestsParams = { * Results per page (max 100) */ per_page?: number; + + team_id: number; +}; +export type TeamsListPendingInvitationsInOrgParams = { + org: string; /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching issues and pull requests](https://help.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. + * Page number of the results to fetch. */ - q: string; + page?: number; /** - * Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + * Results per page (max 100) */ - sort?: - | "comments" - | "reactions" - | "reactions-+1" - | "reactions--1" - | "reactions-smile" - | "reactions-thinking_face" - | "reactions-heart" - | "reactions-tada" - | "interactions" - | "created" - | "updated"; + per_page?: number; + + team_slug: string; }; -type SearchLabelsParams = { +export type TeamsListPendingInvitationsLegacyParams = { /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + * Page number of the results to fetch. */ - order?: "desc" | "asc"; + page?: number; /** - * The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). + * Results per page (max 100) */ - q: string; + per_page?: number; + + team_id: number; +}; +export type TeamsListProjectsParams = { /** - * The id of the repository. + * Page number of the results to fetch. */ - repository_id: number; + page?: number; /** - * Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + * Results per page (max 100) */ - sort?: "created" | "updated"; + per_page?: number; + + team_id: number; }; -type SearchReposParams = { - /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. - */ - order?: "desc" | "asc"; +export type TeamsListProjectsInOrgParams = { + org: string; /** * Page number of the results to fetch. */ @@ -27988,26 +31605,35 @@ type SearchReposParams = { * Results per page (max 100) */ per_page?: number; + + team_slug: string; +}; +export type TeamsListProjectsLegacyParams = { /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching for repositories](https://help.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. + * Page number of the results to fetch. */ - q: string; + page?: number; /** - * Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + * Results per page (max 100) */ - sort?: "stars" | "forks" | "help-wanted-issues" | "updated"; + per_page?: number; + + team_id: number; }; -type SearchTopicsParams = { +export type TeamsListReposParams = { /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). + * Page number of the results to fetch. */ - q: string; -}; -type SearchUsersParams = { + page?: number; /** - * Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. + * Results per page (max 100) */ - order?: "desc" | "asc"; + per_page?: number; + + team_id: number; +}; +export type TeamsListReposInOrgParams = { + org: string; /** * Page number of the results to fetch. */ @@ -28016,88 +31642,116 @@ type SearchUsersParams = { * Results per page (max 100) */ per_page?: number; + + team_slug: string; +}; +export type TeamsListReposLegacyParams = { /** - * The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://developer.github.com/v3/search/#constructing-a-search-query). See "[Searching users](https://help.github.com/articles/searching-users/)" for a detailed list of qualifiers. + * Page number of the results to fetch. */ - q: string; + page?: number; /** - * Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://developer.github.com/v3/search/#ranking-search-results) + * Results per page (max 100) */ - sort?: "followers" | "repositories" | "joined"; + per_page?: number; + + team_id: number; }; -type TeamsAddMemberParams = { +export type TeamsRemoveMemberParams = { team_id: number; username: string; }; -type TeamsAddOrUpdateMembershipParams = { - /** - * The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. - */ - role?: "member" | "maintainer"; +export type TeamsRemoveMemberLegacyParams = { + team_id: number; + username: string; +}; +export type TeamsRemoveMembershipParams = { team_id: number; username: string; }; -type TeamsAddOrUpdateProjectParams = { - /** - * The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - * **Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited from a parent team. - */ - permission?: "read" | "write" | "admin"; +export type TeamsRemoveMembershipInOrgParams = { + org: string; + team_slug: string; + + username: string; +}; +export type TeamsRemoveMembershipLegacyParams = { + team_id: number; + + username: string; +}; +export type TeamsRemoveProjectParams = { + project_id: number; + + team_id: number; +}; +export type TeamsRemoveProjectInOrgParams = { + org: string; + + project_id: number; + + team_slug: string; +}; +export type TeamsRemoveProjectLegacyParams = { project_id: number; team_id: number; }; -type TeamsAddOrUpdateRepoParams = { +export type TeamsRemoveRepoParams = { owner: string; - /** - * The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - * **Note**: If you pass the `hellcat-preview` media type, you can promote—but not demote—a `permission` attribute inherited through a parent team. - */ - permission?: "pull" | "push" | "admin"; repo: string; team_id: number; }; -type TeamsCheckManagesRepoParams = { +export type TeamsRemoveRepoInOrgParams = { + org: string; + + owner: string; + + repo: string; + + team_slug: string; +}; +export type TeamsRemoveRepoLegacyParams = { owner: string; repo: string; team_id: number; }; -type TeamsCreateParamsDeprecatedPermission = { +export type TeamsReviewProjectParams = { + project_id: number; + + team_id: number; +}; +export type TeamsReviewProjectInOrgParams = { + org: string; + + project_id: number; + + team_slug: string; +}; +export type TeamsReviewProjectLegacyParams = { + project_id: number; + + team_id: number; +}; +export type TeamsUpdateParamsDeprecatedPermission = { /** * The description of the team. */ description?: string; - /** - * The logins of organization members to add as maintainers of the team. - */ - maintainers?: string[]; /** * The name of the team. */ name: string; - - org: string; /** - * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + * The ID of a team to set as the parent team. */ parent_team_id?: number; /** @@ -28109,279 +31763,187 @@ type TeamsCreateParamsDeprecatedPermission = { */ permission?: string; /** - * The level of privacy this team should have. The options are: + * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: * **For a non-nested team:** * \* `secret` - only visible to organization owners and members of this team. * \* `closed` - visible to all members of this organization. - * Default: `secret` * **For a parent or child team:** * \* `closed` - visible to all members of this organization. - * Default for child team: `closed` - * **Note**: You must pass the `hellcat-preview` media type to set privacy default to `closed` for child teams. */ privacy?: "secret" | "closed"; - /** - * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. - */ - repo_names?: string[]; + + team_id: number; }; -type TeamsCreateParams = { +export type TeamsUpdateParams = { /** * The description of the team. */ description?: string; - /** - * The logins of organization members to add as maintainers of the team. - */ - maintainers?: string[]; /** * The name of the team. */ name: string; - - org: string; /** - * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + * The ID of a team to set as the parent team. */ parent_team_id?: number; /** - * The level of privacy this team should have. The options are: + * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: * **For a non-nested team:** * \* `secret` - only visible to organization owners and members of this team. * \* `closed` - visible to all members of this organization. - * Default: `secret` * **For a parent or child team:** * \* `closed` - visible to all members of this organization. - * Default for child team: `closed` - * **Note**: You must pass the `hellcat-preview` media type to set privacy default to `closed` for child teams. */ privacy?: "secret" | "closed"; - /** - * The full name (e.g., "organization-name/repository-name") of repositories to add the team to. - */ - repo_names?: string[]; + + team_id: number; }; -type TeamsCreateDiscussionParams = { +export type TeamsUpdateDiscussionParams = { /** * The discussion post's body text. */ - body: string; - /** - * Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. - */ - private?: boolean; + body?: string; + + discussion_number: number; team_id: number; /** * The discussion post's title. */ - title: string; + title?: string; }; -type TeamsCreateDiscussionCommentParams = { +export type TeamsUpdateDiscussionCommentParams = { /** * The discussion comment's body text. */ body: string; - discussion_number: number; + comment_number: number; - team_id: number; -}; -type TeamsDeleteParams = { - team_id: number; -}; -type TeamsDeleteDiscussionParams = { discussion_number: number; team_id: number; }; -type TeamsDeleteDiscussionCommentParams = { +export type TeamsUpdateDiscussionCommentInOrgParams = { + /** + * The discussion comment's body text. + */ + body: string; + comment_number: number; discussion_number: number; - team_id: number; -}; -type TeamsGetParams = { - team_id: number; -}; -type TeamsGetByNameParams = { org: string; team_slug: string; }; -type TeamsGetDiscussionParams = { - discussion_number: number; +export type TeamsUpdateDiscussionCommentLegacyParams = { + /** + * The discussion comment's body text. + */ + body: string; - team_id: number; -}; -type TeamsGetDiscussionCommentParams = { comment_number: number; discussion_number: number; team_id: number; }; -type TeamsGetMemberParams = { - team_id: number; +export type TeamsUpdateDiscussionInOrgParams = { + /** + * The discussion post's body text. + */ + body?: string; - username: string; -}; -type TeamsGetMembershipParams = { - team_id: number; + discussion_number: number; - username: string; -}; -type TeamsListParams = { org: string; + + team_slug: string; /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; -}; -type TeamsListChildParams = { - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) + * The discussion post's title. */ - per_page?: number; - - team_id: number; + title?: string; }; -type TeamsListDiscussionCommentsParams = { +export type TeamsUpdateDiscussionLegacyParams = { /** - * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. + * The discussion post's body text. */ - direction?: "asc" | "desc"; + body?: string; discussion_number: number; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; - - team_id: number; -}; -type TeamsListDiscussionsParams = { - /** - * Sorts the discussion comments by the date they were created. To return the oldest comments first, set to `asc`. Can be one of `asc` or `desc`. - */ - direction?: "asc" | "desc"; - /** - * Page number of the results to fetch. - */ - page?: number; - /** - * Results per page (max 100) - */ - per_page?: number; team_id: number; -}; -type TeamsListForAuthenticatedUserParams = { - /** - * Page number of the results to fetch. - */ - page?: number; /** - * Results per page (max 100) + * The discussion post's title. */ - per_page?: number; + title?: string; }; -type TeamsListMembersParams = { +export type TeamsUpdateInOrgParamsDeprecatedPermission = { /** - * Page number of the results to fetch. + * The description of the team. */ - page?: number; + description?: string; /** - * Results per page (max 100) + * The name of the team. */ - per_page?: number; + name: string; + + org: string; /** - * Filters members returned by their role in the team. Can be one of: - * \* `member` - normal members of the team. - * \* `maintainer` - team maintainers. - * \* `all` - all members of the team. + * The ID of a team to set as the parent team. */ - role?: "member" | "maintainer" | "all"; - - team_id: number; -}; -type TeamsListPendingInvitationsParams = { + parent_team_id?: number; /** - * Page number of the results to fetch. + * **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: + * \* `pull` - team members can pull, but not push to or administer newly-added repositories. + * \* `push` - team members can pull and push, but not administer newly-added repositories. + * \* `admin` - team members can pull, push and administer newly-added repositories. + * @deprecated "permission" parameter has been deprecated and will be removed in future */ - page?: number; + permission?: string; /** - * Results per page (max 100) + * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. */ - per_page?: number; + privacy?: "secret" | "closed"; - team_id: number; + team_slug: string; }; -type TeamsListProjectsParams = { +export type TeamsUpdateInOrgParams = { /** - * Page number of the results to fetch. + * The description of the team. */ - page?: number; + description?: string; /** - * Results per page (max 100) + * The name of the team. */ - per_page?: number; + name: string; - team_id: number; -}; -type TeamsListReposParams = { + org: string; /** - * Page number of the results to fetch. + * The ID of a team to set as the parent team. */ - page?: number; + parent_team_id?: number; /** - * Results per page (max 100) + * The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. */ - per_page?: number; - - team_id: number; -}; -type TeamsRemoveMemberParams = { - team_id: number; - - username: string; -}; -type TeamsRemoveMembershipParams = { - team_id: number; - - username: string; -}; -type TeamsRemoveProjectParams = { - project_id: number; - - team_id: number; -}; -type TeamsRemoveRepoParams = { - owner: string; - - repo: string; - - team_id: number; -}; -type TeamsReviewProjectParams = { - project_id: number; + privacy?: "secret" | "closed"; - team_id: number; + team_slug: string; }; -type TeamsUpdateParamsDeprecatedPermission = { +export type TeamsUpdateLegacyParamsDeprecatedPermission = { /** * The description of the team. */ @@ -28391,7 +31953,7 @@ type TeamsUpdateParamsDeprecatedPermission = { */ name: string; /** - * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + * The ID of a team to set as the parent team. */ parent_team_id?: number; /** @@ -28414,7 +31976,7 @@ type TeamsUpdateParamsDeprecatedPermission = { team_id: number; }; -type TeamsUpdateParams = { +export type TeamsUpdateLegacyParams = { /** * The description of the team. */ @@ -28424,7 +31986,7 @@ type TeamsUpdateParams = { */ name: string; /** - * The ID of a team to set as the parent team. **Note**: You must pass the `hellcat-preview` media type to use this parameter. + * The ID of a team to set as the parent team. */ parent_team_id?: number; /** @@ -28434,64 +31996,38 @@ type TeamsUpdateParams = { * \* `closed` - visible to all members of this organization. * **For a parent or child team:** * \* `closed` - visible to all members of this organization. - */ - privacy?: "secret" | "closed"; - - team_id: number; -}; -type TeamsUpdateDiscussionParams = { - /** - * The discussion post's body text. - */ - body?: string; - - discussion_number: number; - - team_id: number; - /** - * The discussion post's title. - */ - title?: string; -}; -type TeamsUpdateDiscussionCommentParams = { - /** - * The discussion comment's body text. - */ - body: string; - - comment_number: number; - - discussion_number: number; + */ + privacy?: "secret" | "closed"; team_id: number; }; -type UsersAddEmailsParams = { +export type UsersAddEmailsParams = { /** * Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. */ emails: string[]; }; -type UsersBlockParams = { +export type UsersBlockParams = { username: string; }; -type UsersCheckBlockedParams = { +export type UsersCheckBlockedParams = { username: string; }; -type UsersCheckFollowingParams = { +export type UsersCheckFollowingParams = { username: string; }; -type UsersCheckFollowingForUserParams = { +export type UsersCheckFollowingForUserParams = { target_user: string; username: string; }; -type UsersCreateGpgKeyParams = { +export type UsersCreateGpgKeyParams = { /** * Your GPG key, generated in ASCII-armored format. See "[Generating a new GPG key](https://help.github.com/articles/generating-a-new-gpg-key/)" for help creating a GPG key. */ armored_public_key?: string; }; -type UsersCreatePublicKeyParams = { +export type UsersCreatePublicKeyParams = { /** * The public SSH key to add to your GitHub account. See "[Generating a new SSH key](https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/)" for guidance on how to create a public SSH key. */ @@ -28501,25 +32037,25 @@ type UsersCreatePublicKeyParams = { */ title?: string; }; -type UsersDeleteEmailsParams = { +export type UsersDeleteEmailsParams = { /** * Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key. */ emails: string[]; }; -type UsersDeleteGpgKeyParams = { +export type UsersDeleteGpgKeyParams = { gpg_key_id: number; }; -type UsersDeletePublicKeyParams = { +export type UsersDeletePublicKeyParams = { key_id: number; }; -type UsersFollowParams = { +export type UsersFollowParams = { username: string; }; -type UsersGetByUsernameParams = { +export type UsersGetByUsernameParams = { username: string; }; -type UsersGetContextForUserParams = { +export type UsersGetContextForUserParams = { /** * Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`. */ @@ -28531,13 +32067,13 @@ type UsersGetContextForUserParams = { username: string; }; -type UsersGetGpgKeyParams = { +export type UsersGetGpgKeyParams = { gpg_key_id: number; }; -type UsersGetPublicKeyParams = { +export type UsersGetPublicKeyParams = { key_id: number; }; -type UsersListParams = { +export type UsersListParams = { /** * Page number of the results to fetch. */ @@ -28551,7 +32087,7 @@ type UsersListParams = { */ since?: string; }; -type UsersListEmailsParams = { +export type UsersListEmailsParams = { /** * Page number of the results to fetch. */ @@ -28561,7 +32097,7 @@ type UsersListEmailsParams = { */ per_page?: number; }; -type UsersListFollowersForAuthenticatedUserParams = { +export type UsersListFollowersForAuthenticatedUserParams = { /** * Page number of the results to fetch. */ @@ -28571,7 +32107,7 @@ type UsersListFollowersForAuthenticatedUserParams = { */ per_page?: number; }; -type UsersListFollowersForUserParams = { +export type UsersListFollowersForUserParams = { /** * Page number of the results to fetch. */ @@ -28583,7 +32119,7 @@ type UsersListFollowersForUserParams = { username: string; }; -type UsersListFollowingForAuthenticatedUserParams = { +export type UsersListFollowingForAuthenticatedUserParams = { /** * Page number of the results to fetch. */ @@ -28593,7 +32129,7 @@ type UsersListFollowingForAuthenticatedUserParams = { */ per_page?: number; }; -type UsersListFollowingForUserParams = { +export type UsersListFollowingForUserParams = { /** * Page number of the results to fetch. */ @@ -28605,7 +32141,7 @@ type UsersListFollowingForUserParams = { username: string; }; -type UsersListGpgKeysParams = { +export type UsersListGpgKeysParams = { /** * Page number of the results to fetch. */ @@ -28615,7 +32151,7 @@ type UsersListGpgKeysParams = { */ per_page?: number; }; -type UsersListGpgKeysForUserParams = { +export type UsersListGpgKeysForUserParams = { /** * Page number of the results to fetch. */ @@ -28627,7 +32163,7 @@ type UsersListGpgKeysForUserParams = { username: string; }; -type UsersListPublicEmailsParams = { +export type UsersListPublicEmailsParams = { /** * Page number of the results to fetch. */ @@ -28637,7 +32173,7 @@ type UsersListPublicEmailsParams = { */ per_page?: number; }; -type UsersListPublicKeysParams = { +export type UsersListPublicKeysParams = { /** * Page number of the results to fetch. */ @@ -28647,7 +32183,7 @@ type UsersListPublicKeysParams = { */ per_page?: number; }; -type UsersListPublicKeysForUserParams = { +export type UsersListPublicKeysForUserParams = { /** * Page number of the results to fetch. */ @@ -28659,7 +32195,7 @@ type UsersListPublicKeysForUserParams = { username: string; }; -type UsersTogglePrimaryEmailVisibilityParams = { +export type UsersTogglePrimaryEmailVisibilityParams = { /** * Specify the _primary_ email address that needs a visibility change. */ @@ -28669,13 +32205,13 @@ type UsersTogglePrimaryEmailVisibilityParams = { */ visibility: string; }; -type UsersUnblockParams = { +export type UsersUnblockParams = { username: string; }; -type UsersUnfollowParams = { +export type UsersUnfollowParams = { username: string; }; -type UsersUpdateAuthenticatedParams = { +export type UsersUpdateAuthenticatedParams = { /** * The new short biography of the user. */ @@ -28707,20 +32243,20 @@ type UsersUpdateAuthenticatedParams = { }; // child param types -type AppsCreateInstallationTokenParamsPermissions = {}; -type ChecksCreateParamsActions = { +export type AppsCreateInstallationTokenParamsPermissions = {}; +export type ChecksCreateParamsActions = { description: string; identifier: string; label: string; }; -type ChecksCreateParamsOutput = { +export type ChecksCreateParamsOutput = { annotations?: ChecksCreateParamsOutputAnnotations[]; images?: ChecksCreateParamsOutputImages[]; summary: string; text?: string; title: string; }; -type ChecksCreateParamsOutputAnnotations = { +export type ChecksCreateParamsOutputAnnotations = { annotation_level: "notice" | "warning" | "failure"; end_column?: number; end_line: number; @@ -28731,28 +32267,28 @@ type ChecksCreateParamsOutputAnnotations = { start_line: number; title?: string; }; -type ChecksCreateParamsOutputImages = { +export type ChecksCreateParamsOutputImages = { alt: string; caption?: string; image_url: string; }; -type ChecksSetSuitesPreferencesParamsAutoTriggerChecks = { +export type ChecksSetSuitesPreferencesParamsAutoTriggerChecks = { app_id: number; setting: boolean; }; -type ChecksUpdateParamsActions = { +export type ChecksUpdateParamsActions = { description: string; identifier: string; label: string; }; -type ChecksUpdateParamsOutput = { +export type ChecksUpdateParamsOutput = { annotations?: ChecksUpdateParamsOutputAnnotations[]; images?: ChecksUpdateParamsOutputImages[]; summary: string; text?: string; title?: string; }; -type ChecksUpdateParamsOutputAnnotations = { +export type ChecksUpdateParamsOutputAnnotations = { annotation_level: "notice" | "warning" | "failure"; end_column?: number; end_line: number; @@ -28763,130 +32299,130 @@ type ChecksUpdateParamsOutputAnnotations = { start_line: number; title?: string; }; -type ChecksUpdateParamsOutputImages = { +export type ChecksUpdateParamsOutputImages = { alt: string; caption?: string; image_url: string; }; -type GistsCreateParamsFiles = { +export type GistsCreateParamsFiles = { content?: string; }; -type GistsUpdateParamsFiles = { +export type GistsUpdateParamsFiles = { content?: string; filename?: string; }; -type GitCreateCommitParamsAuthor = { +export type GitCreateCommitParamsAuthor = { date?: string; email?: string; name?: string; }; -type GitCreateCommitParamsCommitter = { +export type GitCreateCommitParamsCommitter = { date?: string; email?: string; name?: string; }; -type GitCreateTagParamsTagger = { +export type GitCreateTagParamsTagger = { date?: string; email?: string; name?: string; }; -type GitCreateTreeParamsTree = { +export type GitCreateTreeParamsTree = { content?: string; mode?: "100644" | "100755" | "040000" | "160000" | "120000"; path?: string; sha?: string; type?: "blob" | "tree" | "commit"; }; -type OrgsCreateHookParamsConfig = { +export type OrgsCreateHookParamsConfig = { content_type?: string; insecure_ssl?: string; secret?: string; url: string; }; -type OrgsUpdateHookParamsConfig = { +export type OrgsUpdateHookParamsConfig = { content_type?: string; insecure_ssl?: string; secret?: string; url: string; }; -type PullsCreateReviewParamsComments = { +export type PullsCreateReviewParamsComments = { body: string; path: string; position: number; }; -type ReposCreateDispatchEventParamsClientPayload = {}; -type ReposCreateFileParamsAuthor = { +export type ReposCreateDispatchEventParamsClientPayload = {}; +export type ReposCreateFileParamsAuthor = { email: string; name: string; }; -type ReposCreateFileParamsCommitter = { +export type ReposCreateFileParamsCommitter = { email: string; name: string; }; -type ReposCreateHookParamsConfig = { +export type ReposCreateHookParamsConfig = { content_type?: string; insecure_ssl?: string; secret?: string; url: string; }; -type ReposCreateOrUpdateFileParamsAuthor = { +export type ReposCreateOrUpdateFileParamsAuthor = { email: string; name: string; }; -type ReposCreateOrUpdateFileParamsCommitter = { +export type ReposCreateOrUpdateFileParamsCommitter = { email: string; name: string; }; -type ReposDeleteFileParamsAuthor = { +export type ReposDeleteFileParamsAuthor = { email?: string; name?: string; }; -type ReposDeleteFileParamsCommitter = { +export type ReposDeleteFileParamsCommitter = { email?: string; name?: string; }; -type ReposEnablePagesSiteParamsSource = { +export type ReposEnablePagesSiteParamsSource = { branch?: "master" | "gh-pages"; path?: string; }; -type ReposUpdateBranchProtectionParamsRequiredPullRequestReviews = { +export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviews = { dismiss_stale_reviews?: boolean; dismissal_restrictions?: ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions; require_code_owner_reviews?: boolean; required_approving_review_count?: number; }; -type ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions = { +export type ReposUpdateBranchProtectionParamsRequiredPullRequestReviewsDismissalRestrictions = { teams?: string[]; users?: string[]; }; -type ReposUpdateBranchProtectionParamsRequiredStatusChecks = { +export type ReposUpdateBranchProtectionParamsRequiredStatusChecks = { contexts: string[]; strict: boolean; }; -type ReposUpdateBranchProtectionParamsRestrictions = { +export type ReposUpdateBranchProtectionParamsRestrictions = { apps?: string[]; teams: string[]; users: string[]; }; -type ReposUpdateFileParamsAuthor = { +export type ReposUpdateFileParamsAuthor = { email: string; name: string; }; -type ReposUpdateFileParamsCommitter = { +export type ReposUpdateFileParamsCommitter = { email: string; name: string; }; -type ReposUpdateHookParamsConfig = { +export type ReposUpdateHookParamsConfig = { content_type?: string; insecure_ssl?: string; secret?: string; url: string; }; -type ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions = { +export type ReposUpdateProtectedBranchPullRequestReviewEnforcementParamsDismissalRestrictions = { teams?: string[]; users?: string[]; }; -type ReposUploadReleaseAssetParamsHeaders = { +export type ReposUploadReleaseAssetParamsHeaders = { "content-length": number; "content-type": string; }; @@ -28894,6182 +32430,7681 @@ type ReposUploadReleaseAssetParamsHeaders = { export type RestEndpointMethods = { activity: { /** - * Requires for the user to be authenticated. + * Requires for the user to be authenticated. + */ + checkStarringRepo: { + ( + params?: RequestParameters & + ActivityCheckStarringRepoParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Requires for the user to be authenticated. + */ + checkWatchingRepoLegacy: { + ( + params?: RequestParameters & + ActivityCheckWatchingRepoLegacyParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://developer.github.com/v3/activity/watching/#set-a-repository-subscription). + */ + deleteRepoSubscription: { + ( + params?: RequestParameters & + ActivityDeleteRepoSubscriptionParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Mutes all future notifications for a conversation until you comment on the thread or get **@mention**ed. + */ + deleteThreadSubscription: { + ( + params?: RequestParameters & + ActivityDeleteThreadSubscriptionParams + ): Promise; + + endpoint: EndpointInterface; + }; + + getRepoSubscription: { + ( + params?: RequestParameters & + ActivityGetRepoSubscriptionParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + getThread: { + ( + params?: RequestParameters & ActivityGetThreadParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://developer.github.com/v3/activity/watching/#get-a-repository-subscription). + * + * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + */ + getThreadSubscription: { + ( + params?: RequestParameters & + ActivityGetThreadSubscriptionParams + ): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * This is the user's organization dashboard. You must be authenticated as the user to view this. + */ + listEventsForOrg: { + ( + params?: RequestParameters & ActivityListEventsForOrgParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + */ + listEventsForUser: { + ( + params?: RequestParameters & + ActivityListEventsForUserParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: + * + * * **Timeline**: The GitHub global public timeline + * * **User**: The public timeline for any user, using [URI template](https://developer.github.com/v3/#hypermedia) + * * **Current user public**: The public timeline for the authenticated user + * * **Current user**: The private timeline for the authenticated user + * * **Current user actor**: The private timeline for activity created by the authenticated user + * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. + * + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://developer.github.com/v3/#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + */ + listFeeds: { + (params?: RequestParameters & EmptyParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * List all notifications for the current user, sorted by most recently updated. + * + * The following example uses the `since` parameter to list notifications that have been updated after the specified time. + */ + listNotifications: { + ( + params?: RequestParameters & + ActivityListNotificationsParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * List all notifications for the current user. + */ + listNotificationsForRepo: { + ( + params?: RequestParameters & + ActivityListNotificationsForRepoParams + ): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + */ + listPublicEvents: { + ( + params?: RequestParameters & ActivityListPublicEventsParams + ): Promise; + + endpoint: EndpointInterface; + }; + + listPublicEventsForOrg: { + ( + params?: RequestParameters & + ActivityListPublicEventsForOrgParams + ): Promise; + + endpoint: EndpointInterface; + }; + + listPublicEventsForRepoNetwork: { + ( + params?: RequestParameters & + ActivityListPublicEventsForRepoNetworkParams + ): Promise; + + endpoint: EndpointInterface; + }; + + listPublicEventsForUser: { + ( + params?: RequestParameters & + ActivityListPublicEventsForUserParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + */ + listReceivedEventsForUser: { + ( + params?: RequestParameters & + ActivityListReceivedEventsForUserParams + ): Promise; + + endpoint: EndpointInterface; + }; + + listReceivedPublicEventsForUser: { + ( + params?: RequestParameters & + ActivityListReceivedPublicEventsForUserParams + ): Promise; + + endpoint: EndpointInterface; + }; + + listRepoEvents: { + ( + params?: RequestParameters & ActivityListRepoEventsParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listReposStarredByAuthenticatedUser: { + ( + params?: RequestParameters & + ActivityListReposStarredByAuthenticatedUserParams + ): Promise< + OctokitResponse< + ActivityListReposStarredByAuthenticatedUserResponse + > + >; + + endpoint: EndpointInterface; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listReposStarredByUser: { + ( + params?: RequestParameters & + ActivityListReposStarredByUserParams + ): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + + listReposWatchedByUser: { + ( + params?: RequestParameters & + ActivityListReposWatchedByUserParams + ): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + */ + listStargazersForRepo: { + ( + params?: RequestParameters & + ActivityListStargazersForRepoParams + ): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + + listWatchedReposForAuthenticatedUser: { + ( + params?: RequestParameters & + ActivityListWatchedReposForAuthenticatedUserParams + ): Promise< + OctokitResponse< + ActivityListWatchedReposForAuthenticatedUserResponse + > + >; + + endpoint: EndpointInterface; + }; + + listWatchersForRepo: { + ( + params?: RequestParameters & + ActivityListWatchersForRepoParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Marks a notification as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List your notifications](https://developer.github.com/v3/activity/notifications/#list-your-notifications) endpoint and pass the query parameter `all=false`. + */ + markAsRead: { + ( + params?: RequestParameters & ActivityMarkAsReadParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List your notifications in a repository](https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository) endpoint and pass the query parameter `all=false`. + */ + markNotificationsAsReadForRepo: { + ( + params?: RequestParameters & + ActivityMarkNotificationsAsReadForRepoParams + ): Promise; + + endpoint: EndpointInterface; + }; + + markThreadAsRead: { + ( + params?: RequestParameters & ActivityMarkThreadAsReadParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription) completely. + */ + setRepoSubscription: { + ( + params?: RequestParameters & + ActivitySetRepoSubscriptionParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * This lets you subscribe or unsubscribe from a conversation. + */ + setThreadSubscription: { + ( + params?: RequestParameters & + ActivitySetThreadSubscriptionParams + ): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * Requires for the user to be authenticated. + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + starRepo: { + ( + params?: RequestParameters & ActivityStarRepoParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Requires for the user to be authenticated. + */ + stopWatchingRepoLegacy: { + ( + params?: RequestParameters & + ActivityStopWatchingRepoLegacyParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Requires for the user to be authenticated. + */ + unstarRepo: { + ( + params?: RequestParameters & ActivityUnstarRepoParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Requires the user to be authenticated. + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + */ + watchRepoLegacy: { + ( + params?: RequestParameters & ActivityWatchRepoLegacyParams + ): Promise; + + endpoint: EndpointInterface; + }; + }; + apps: { + /** + * Add a single repository to an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. + */ + addRepoToInstallation: { + ( + params?: RequestParameters & + AppsAddRepoToInstallationParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + checkAccountIsAssociatedWithAny: { + ( + params?: RequestParameters & + AppsCheckAccountIsAssociatedWithAnyParams + ): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + checkAccountIsAssociatedWithAnyStubbed: { + ( + params?: RequestParameters & + AppsCheckAccountIsAssociatedWithAnyStubbedParams + ): Promise< + OctokitResponse< + AppsCheckAccountIsAssociatedWithAnyStubbedResponse + > + >; + + endpoint: EndpointInterface; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + * @deprecated apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization + */ + checkAuthorization: { + ( + params?: RequestParameters & AppsCheckAuthorizationParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + */ + checkToken: { + (params?: RequestParameters & AppsCheckTokenParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://developer.github.com/v3/activity/events/types/#contentreferenceevent) to create an attachment. + * + * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://developer.github.com/apps/using-content-attachments/)" for details about content attachments. + * + * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * + * This example creates a content attachment for the domain `https://errors.ai/`. + */ + createContentAttachment: { + ( + params?: RequestParameters & + AppsCreateContentAttachmentParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. + */ + createFromManifest: { + ( + params?: RequestParameters & AppsCreateFromManifestParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. + * + * By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * This example grants the token "Read and write" permission to `issues` and "Read" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269. + */ + createInstallationToken: { + ( + params?: RequestParameters & + AppsCreateInstallationTokenParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + */ + deleteAuthorization: { + ( + params?: RequestParameters & AppsDeleteAuthorizationParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Uninstalls a GitHub App on a user, organization, or business account. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + deleteInstallation: { + ( + params?: RequestParameters & AppsDeleteInstallationParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + */ + deleteToken: { + ( + params?: RequestParameters & AppsDeleteTokenParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * @deprecated apps.findOrgInstallation() has been renamed to apps.getOrgInstallation() (2019-04-10) + */ + findOrgInstallation: { + ( + params?: RequestParameters & AppsFindOrgInstallationParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * @deprecated apps.findRepoInstallation() has been renamed to apps.getRepoInstallation() (2019-04-10) + */ + findRepoInstallation: { + ( + params?: RequestParameters & AppsFindRepoInstallationParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * @deprecated apps.findUserInstallation() has been renamed to apps.getUserInstallation() (2019-04-10) + */ + findUserInstallation: { + ( + params?: RequestParameters & AppsFindUserInstallationParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations](https://developer.github.com/v3/apps/#list-installations)" endpoint. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getAuthenticated: { + (params?: RequestParameters & EmptyParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). + * + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - checkStarringRepo: { - (params?: RequestParameters & ActivityCheckStarringRepoParams): Promise< - AnyResponse + getBySlug: { + (params?: RequestParameters & AppsGetBySlugParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * This endpoint should only be used to stop watching a repository. To control whether or not you wish to receive notifications from a repository, [set the repository's subscription manually](https://developer.github.com/v3/activity/watching/#set-a-repository-subscription). + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - deleteRepoSubscription: { + getInstallation: { ( - params?: RequestParameters & ActivityDeleteRepoSubscriptionParams - ): Promise; + params?: RequestParameters & AppsGetInstallationParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Mutes all future notifications for a conversation until you comment on the thread or get **@mention**ed. + * Enables an authenticated GitHub App to find the organization's installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - deleteThreadSubscription: { + getOrgInstallation: { ( - params?: RequestParameters & ActivityDeleteThreadSubscriptionParams - ): Promise; + params?: RequestParameters & AppsGetOrgInstallationParams + ): Promise>; endpoint: EndpointInterface; }; - - getRepoSubscription: { - (params?: RequestParameters & ActivityGetRepoSubscriptionParams): Promise< - OctokitResponse - >; + /** + * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getRepoInstallation: { + ( + params?: RequestParameters & AppsGetRepoInstallationParams + ): Promise>; endpoint: EndpointInterface; }; + /** + * Enables an authenticated GitHub App to find the user’s installation information. + * + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + getUserInstallation: { + ( + params?: RequestParameters & AppsGetUserInstallationParams + ): Promise>; - getThread: { - (params?: RequestParameters & ActivityGetThreadParams): Promise< - OctokitResponse + endpoint: EndpointInterface; + }; + /** + * Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listAccountsUserOrOrgOnPlan: { + ( + params?: RequestParameters & + AppsListAccountsUserOrOrgOnPlanParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://developer.github.com/v3/activity/watching/#get-a-repository-subscription). + * Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. * - * Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread. + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. */ - getThreadSubscription: { + listAccountsUserOrOrgOnPlanStubbed: { ( - params?: RequestParameters & ActivityGetThreadSubscriptionParams - ): Promise>; + params?: RequestParameters & + AppsListAccountsUserOrOrgOnPlanStubbedParams + ): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * This is the user's organization dashboard. You must be authenticated as the user to view this. + * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. + * + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * + * The access the user has to each repository is included in the hash under the `permissions` key. */ - listEventsForOrg: { - (params?: RequestParameters & ActivityListEventsForOrgParams): Promise< - AnyResponse + listInstallationReposForAuthenticatedUser: { + ( + params?: RequestParameters & + AppsListInstallationReposForAuthenticatedUserParams + ): Promise< + OctokitResponse< + AppsListInstallationReposForAuthenticatedUserResponse + > >; endpoint: EndpointInterface; }; /** - * If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. + * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * + * The permissions the installation has are included under the `permissions` key. */ - listEventsForUser: { - (params?: RequestParameters & ActivityListEventsForUserParams): Promise< - AnyResponse - >; + listInstallations: { + ( + params?: RequestParameters & AppsListInstallationsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * GitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user: + * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. * - * * **Timeline**: The GitHub global public timeline - * * **User**: The public timeline for any user, using [URI template](https://developer.github.com/v3/#hypermedia) - * * **Current user public**: The public timeline for the authenticated user - * * **Current user**: The private timeline for the authenticated user - * * **Current user actor**: The private timeline for activity created by the authenticated user - * * **Current user organizations**: The private timeline for the organizations the authenticated user is a member of. - * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub. + * You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. * - * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://developer.github.com/v3/#basic-authentication) since current feed URIs use the older, non revocable auth tokens. + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * + * You can find the permissions for the installation under the `permissions` key. */ - listFeeds: { - (params?: RequestParameters & EmptyParams): Promise< - OctokitResponse + listInstallationsForAuthenticatedUser: { + ( + params?: RequestParameters & + AppsListInstallationsForAuthenticatedUserParams + ): Promise< + OctokitResponse< + AppsListInstallationsForAuthenticatedUserResponse + > >; endpoint: EndpointInterface; }; /** - * List all notifications for the current user, sorted by most recently updated. - * - * The following example uses the `since` parameter to list notifications that have been updated after the specified time. + * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - listNotifications: { - (params?: RequestParameters & ActivityListNotificationsParams): Promise< - OctokitResponse + listMarketplacePurchasesForAuthenticatedUser: { + ( + params?: RequestParameters & + AppsListMarketplacePurchasesForAuthenticatedUserParams + ): Promise< + OctokitResponse< + AppsListMarketplacePurchasesForAuthenticatedUserResponse + > >; endpoint: EndpointInterface; }; /** - * List all notifications for the current user. + * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - listNotificationsForRepo: { + listMarketplacePurchasesForAuthenticatedUserStubbed: { ( - params?: RequestParameters & ActivityListNotificationsForRepoParams - ): Promise>; + params?: RequestParameters & + AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams + ): Promise< + OctokitResponse< + AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponse + > + >; endpoint: EndpointInterface; }; /** - * We delay the public events feed by five minutes, which means the most recent event returned by the public events API actually occurred at least five minutes ago. + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. */ - listPublicEvents: { - (params?: RequestParameters & ActivityListPublicEventsParams): Promise< - AnyResponse + listPlans: { + (params?: RequestParameters & AppsListPlansParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - listPublicEventsForOrg: { + /** + * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + */ + listPlansStubbed: { ( - params?: RequestParameters & ActivityListPublicEventsForOrgParams - ): Promise; + params?: RequestParameters & AppsListPlansStubbedParams + ): Promise>; endpoint: EndpointInterface; }; + /** + * List repositories that an installation can access. + * + * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + listRepos: { + (params?: RequestParameters & AppsListReposParams): Promise< + OctokitResponse + >; - listPublicEventsForRepoNetwork: { + endpoint: EndpointInterface; + }; + /** + * Remove a single repository from an installation. The authenticated user must have admin access to the repository. + * + * You must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. + */ + removeRepoFromInstallation: { ( params?: RequestParameters & - ActivityListPublicEventsForRepoNetworkParams + AppsRemoveRepoFromInstallationParams ): Promise; endpoint: EndpointInterface; }; - - listPublicEventsForUser: { + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + * @deprecated apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization + */ + resetAuthorization: { ( - params?: RequestParameters & ActivityListPublicEventsForUserParams - ): Promise; + params?: RequestParameters & AppsResetAuthorizationParams + ): Promise>; endpoint: EndpointInterface; }; /** - * These are events that you've received by watching repos and following users. If you are authenticated as the given user, you will see private events. Otherwise, you'll only see public events. + * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - listReceivedEventsForUser: { + resetToken: { + (params?: RequestParameters & AppsResetTokenParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + * @deprecated apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application + */ + revokeAuthorizationForApplication: { ( - params?: RequestParameters & ActivityListReceivedEventsForUserParams + params?: RequestParameters & + AppsRevokeAuthorizationForApplicationParams ): Promise; endpoint: EndpointInterface; }; - - listReceivedPublicEventsForUser: { + /** + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted. + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). + * @deprecated apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application + */ + revokeGrantForApplication: { ( params?: RequestParameters & - ActivityListReceivedPublicEventsForUserParams + AppsRevokeGrantForApplicationParams ): Promise; endpoint: EndpointInterface; }; - - listRepoEvents: { - (params?: RequestParameters & ActivityListRepoEventsParams): Promise< + /** + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. + * + * Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create a new installation token](https://developer.github.com/v3/apps/#create-a-new-installation-token)" endpoint. + * + * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + revokeInstallationToken: { + (params?: RequestParameters & EmptyParams): Promise< AnyResponse >; endpoint: EndpointInterface; }; + }; + checks: { /** - * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. */ - listReposStarredByAuthenticatedUser: { + create: { + (params?: RequestParameters & ChecksCreateParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * By default, check suites are automatically created when you create a [check run](https://developer.github.com/v3/checks/runs/). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Set preferences for check suites on a repository](https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + createSuite: { ( - params?: RequestParameters & - ActivityListReposStarredByAuthenticatedUserParams - ): Promise< - OctokitResponse + params?: RequestParameters & ChecksCreateSuiteParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + get: { + (params?: RequestParameters & ChecksGetParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. */ - listReposStarredByUser: { + getSuite: { + (params?: RequestParameters & ChecksGetSuiteParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. + */ + listAnnotations: { ( - params?: RequestParameters & ActivityListReposStarredByUserParams - ): Promise>; + params?: RequestParameters & ChecksListAnnotationsParams + ): Promise>; endpoint: EndpointInterface; }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + listForRef: { + ( + params?: RequestParameters & ChecksListForRefParams + ): Promise>; - listReposWatchedByUser: { + endpoint: EndpointInterface; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + */ + listForSuite: { ( - params?: RequestParameters & ActivityListReposWatchedByUserParams - ): Promise>; + params?: RequestParameters & ChecksListForSuiteParams + ): Promise>; endpoint: EndpointInterface; }; /** - * You can also find out _when_ stars were created by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * + * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. */ - listStargazersForRepo: { + listSuitesForRef: { ( - params?: RequestParameters & ActivityListStargazersForRepoParams - ): Promise>; + params?: RequestParameters & ChecksListSuitesForRefParams + ): Promise>; endpoint: EndpointInterface; }; + /** + * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://developer.github.com/v3/activity/events/types/#checksuiteevent) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * + * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + */ + rerequestSuite: { + ( + params?: RequestParameters & ChecksRerequestSuiteParams + ): Promise; - listWatchedReposForAuthenticatedUser: { + endpoint: EndpointInterface; + }; + /** + * Changes the default automatic flow when creating check suites. By default, the CheckSuiteEvent is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://developer.github.com/v3/checks/suites/#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. + */ + setSuitesPreferences: { ( params?: RequestParameters & - ActivityListWatchedReposForAuthenticatedUserParams + ChecksSetSuitesPreferencesParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + */ + update: { + (params?: RequestParameters & ChecksUpdateParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + }; + codesOfConduct: { + getConductCode: { + ( + params?: RequestParameters & + CodesOfConductGetConductCodeParams ): Promise< - OctokitResponse + OctokitResponse >; endpoint: EndpointInterface; }; + /** + * This method returns the contents of the repository's code of conduct file, if one is detected. + */ + getForRepo: { + ( + params?: RequestParameters & CodesOfConductGetForRepoParams + ): Promise>; + + endpoint: EndpointInterface; + }; - listWatchersForRepo: { - (params?: RequestParameters & ActivityListWatchersForRepoParams): Promise< - OctokitResponse + listConductCodes: { + (params?: RequestParameters & EmptyParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; + }; + emojis: { /** - * Marks a notification as "read" removes it from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List your notifications](https://developer.github.com/v3/activity/notifications/#list-your-notifications) endpoint and pass the query parameter `all=false`. + * Lists all the emojis available to use on GitHub. */ - markAsRead: { - (params?: RequestParameters & ActivityMarkAsReadParams): Promise< + get: { + (params?: RequestParameters & EmptyParams): Promise< AnyResponse >; + endpoint: EndpointInterface; + }; + }; + gists: { + checkIsStarred: { + ( + params?: RequestParameters & GistsCheckIsStarredParams + ): Promise; + endpoint: EndpointInterface; }; /** - * Marks all notifications in a repository as "read" removes them from the [default view on GitHub](https://github.com/notifications). If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List your notifications in a repository](https://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository) endpoint and pass the query parameter `all=false`. + * Allows you to add a new gist with one or more files. + * + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. */ - markNotificationsAsReadForRepo: { + create: { + (params?: RequestParameters & GistsCreateParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + + createComment: { ( - params?: RequestParameters & - ActivityMarkNotificationsAsReadForRepoParams - ): Promise; + params?: RequestParameters & GistsCreateCommentParams + ): Promise>; endpoint: EndpointInterface; }; - markThreadAsRead: { - (params?: RequestParameters & ActivityMarkThreadAsReadParams): Promise< + delete: { + (params?: RequestParameters & GistsDeleteParams): Promise< AnyResponse >; endpoint: EndpointInterface; }; + + deleteComment: { + ( + params?: RequestParameters & GistsDeleteCommentParams + ): Promise; + + endpoint: EndpointInterface; + }; /** - * If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://developer.github.com/v3/activity/watching/#delete-a-repository-subscription) completely. + * **Note**: This was previously `/gists/:gist_id/fork`. */ - setRepoSubscription: { - (params?: RequestParameters & ActivitySetRepoSubscriptionParams): Promise< - OctokitResponse + fork: { + (params?: RequestParameters & GistsForkParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + + get: { + (params?: RequestParameters & GistsGetParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + + getComment: { + ( + params?: RequestParameters & GistsGetCommentParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + getRevision: { + ( + params?: RequestParameters & GistsGetRevisionParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + list: { + (params?: RequestParameters & GistsListParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + + listComments: { + ( + params?: RequestParameters & GistsListCommentsParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + listCommits: { + ( + params?: RequestParameters & GistsListCommitsParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + listForks: { + (params?: RequestParameters & GistsListForksParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * This lets you subscribe or unsubscribe from a conversation. + * List all public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://developer.github.com/v3/#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. */ - setThreadSubscription: { + listPublic: { ( - params?: RequestParameters & ActivitySetThreadSubscriptionParams - ): Promise>; + params?: RequestParameters & GistsListPublicParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + listPublicForUser: { + ( + params?: RequestParameters & GistsListPublicForUserParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * List the authenticated user's starred gists: + */ + listStarred: { + ( + params?: RequestParameters & GistsListStarredParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Requires for the user to be authenticated. - * * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." */ - starRepo: { - (params?: RequestParameters & ActivityStarRepoParams): Promise< + star: { + (params?: RequestParameters & GistsStarParams): Promise< + AnyResponse + >; + + endpoint: EndpointInterface; + }; + + unstar: { + (params?: RequestParameters & GistsUnstarParams): Promise< AnyResponse >; endpoint: EndpointInterface; }; /** - * Requires for the user to be authenticated. + * Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. + */ + update: { + (params?: RequestParameters & GistsUpdateParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + + updateComment: { + ( + params?: RequestParameters & GistsUpdateCommentParams + ): Promise>; + + endpoint: EndpointInterface; + }; + }; + git: { + createBlob: { + (params?: RequestParameters & GitCreateBlobParams): Promise< + OctokitResponse + >; + + endpoint: EndpointInterface; + }; + /** + * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * + * In this example, the payload of the signature would be: + * + * + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | */ - unstarRepo: { - (params?: RequestParameters & ActivityUnstarRepoParams): Promise< - AnyResponse - >; + createCommit: { + ( + params?: RequestParameters & GitCreateCommitParams + ): Promise>; endpoint: EndpointInterface; }; - }; - apps: { /** - * Add a single repository to an installation. The authenticated user must have admin access to the repository. - * - * You must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. + * Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. */ - addRepoToInstallation: { - (params?: RequestParameters & AppsAddRepoToInstallationParams): Promise< - AnyResponse + createRef: { + (params?: RequestParameters & GitCreateRefParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://developer.github.com/v3/git/refs/#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://developer.github.com/v3/git/refs/#create-a-reference) the tag reference - this call would be unnecessary. * - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | */ - checkAccountIsAssociatedWithAny: { - ( - params?: RequestParameters & AppsCheckAccountIsAssociatedWithAnyParams - ): Promise>; + createTag: { + (params?: RequestParameters & GitCreateTagParams): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. * - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://developer.github.com/v3/git/commits/#create-a-commit)" and "[Update a reference](https://developer.github.com/v3/git/refs/#update-a-reference)." */ - checkAccountIsAssociatedWithAnyStubbed: { - ( - params?: RequestParameters & - AppsCheckAccountIsAssociatedWithAnyStubbedParams - ): Promise< - OctokitResponse + createTree: { + (params?: RequestParameters & GitCreateTreeParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * ``` + * DELETE /repos/octocat/Hello-World/git/refs/heads/feature-a + * ``` * - * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. - * @deprecated apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization + * ``` + * DELETE /repos/octocat/Hello-World/git/refs/tags/v1.0 + * ``` */ - checkAuthorization: { - (params?: RequestParameters & AppsCheckAuthorizationParams): Promise< - OctokitResponse + deleteRef: { + (params?: RequestParameters & GitDeleteRefParams): Promise< + AnyResponse >; endpoint: EndpointInterface; }; /** - * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. */ - checkToken: { - (params?: RequestParameters & AppsCheckTokenParams): Promise< - OctokitResponse + getBlob: { + (params?: RequestParameters & GitGetBlobParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` of the content reference from the [`content_reference` event](https://developer.github.com/v3/activity/events/types/#contentreferenceevent) to create an attachment. + * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). * - * The app must create a content attachment within six hours of the content reference URL being posted. See "[Using content attachments](https://developer.github.com/apps/using-content-attachments/)" for details about content attachments. + * **Signature verification object** * - * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: * - * This example creates a content attachment for the domain `https://errors.ai/`. + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | */ - createContentAttachment: { - (params?: RequestParameters & AppsCreateContentAttachmentParams): Promise< - OctokitResponse + getCommit: { + (params?: RequestParameters & GitGetCommitParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`. + * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. + * + * **Note:** You need to explicitly [request a pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". + * + * To get the reference for a branch named `skunkworkz/featureA`, the endpoint route is: */ - createFromManifest: { - (params?: RequestParameters & AppsCreateFromManifestParams): Promise< - OctokitResponse + getRef: { + (params?: RequestParameters & GitGetRefParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. + * **Signature verification object** * - * By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * These are the possible values for `reason` in the `verification` object: * - * This example grants the token "Read and write" permission to `issues` and "Read" permission to `contents`, and restricts the token's access to the repository with an `id` of 1296269. + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | */ - createInstallationToken: { - (params?: RequestParameters & AppsCreateInstallationTokenParams): Promise< - OctokitResponse + getTag: { + (params?: RequestParameters & GitGetTagParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. - * - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + * If `truncated` is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, you can clone the repository and iterate over the Git data locally. */ - deleteAuthorization: { - (params?: RequestParameters & AppsDeleteAuthorizationParams): Promise< + getTree: { + (params?: RequestParameters & GitGetTreeParams): Promise< AnyResponse >; endpoint: EndpointInterface; }; /** - * Uninstalls a GitHub App on a user, organization, or business account. + * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. + * + * **Note:** You need to explicitly [request a pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". + * + * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. */ - deleteInstallation: { - (params?: RequestParameters & AppsDeleteInstallationParams): Promise< - AnyResponse - >; + listMatchingRefs: { + ( + params?: RequestParameters & GitListMatchingRefsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + * Returns an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. If there are no references to list, a `404` is returned. */ - deleteToken: { - (params?: RequestParameters & AppsDeleteTokenParams): Promise< + listRefs: { + (params?: RequestParameters & GitListRefsParams): Promise< AnyResponse >; endpoint: EndpointInterface; }; - /** - * Enables an authenticated GitHub App to find the organization's installation information. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - * @deprecated apps.findOrgInstallation() has been renamed to apps.getOrgInstallation() (2019-04-10) - */ - findOrgInstallation: { - (params?: RequestParameters & AppsFindOrgInstallationParams): Promise< - OctokitResponse + + updateRef: { + (params?: RequestParameters & GitUpdateRefParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; + }; + gitignore: { /** - * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. + * The API also allows fetching the source of a single template. * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - * @deprecated apps.findRepoInstallation() has been renamed to apps.getRepoInstallation() (2019-04-10) + * Use the raw [media type](https://developer.github.com/v3/media/) to get the raw contents. */ - findRepoInstallation: { - (params?: RequestParameters & AppsFindRepoInstallationParams): Promise< - OctokitResponse - >; + getTemplate: { + ( + params?: RequestParameters & GitignoreGetTemplateParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Enables an authenticated GitHub App to find the user’s installation information. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - * @deprecated apps.findUserInstallation() has been renamed to apps.getUserInstallation() (2019-04-10) + * List all templates available to pass as an option when [creating a repository](https://developer.github.com/v3/repos/#create). */ - findUserInstallation: { - (params?: RequestParameters & AppsFindUserInstallationParams): Promise< - OctokitResponse + listTemplates: { + (params?: RequestParameters & EmptyParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; + }; + interactions: { /** - * Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations](https://developer.github.com/v3/apps/#list-installations)" endpoint. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions. */ - getAuthenticated: { - (params?: RequestParameters & EmptyParams): Promise< - OctokitResponse + addOrUpdateRestrictionsForOrg: { + ( + params?: RequestParameters & + InteractionsAddOrUpdateRestrictionsForOrgParams + ): Promise< + OctokitResponse< + InteractionsAddOrUpdateRestrictionsForOrgResponse + > >; endpoint: EndpointInterface; }; /** - * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). - * - * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions. */ - getBySlug: { - (params?: RequestParameters & AppsGetBySlugParams): Promise< - OctokitResponse + addOrUpdateRestrictionsForRepo: { + ( + params?: RequestParameters & + InteractionsAddOrUpdateRestrictionsForRepoParams + ): Promise< + OctokitResponse< + InteractionsAddOrUpdateRestrictionsForRepoResponse + > >; endpoint: EndpointInterface; }; /** - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response. */ - getInstallation: { - (params?: RequestParameters & AppsGetInstallationParams): Promise< - OctokitResponse + getRestrictionsForOrg: { + ( + params?: RequestParameters & + InteractionsGetRestrictionsForOrgParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Enables an authenticated GitHub App to find the organization's installation information. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ - getOrgInstallation: { - (params?: RequestParameters & AppsGetOrgInstallationParams): Promise< - OctokitResponse + getRestrictionsForRepo: { + ( + params?: RequestParameters & + InteractionsGetRestrictionsForRepoParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - getRepoInstallation: { - (params?: RequestParameters & AppsGetRepoInstallationParams): Promise< - OctokitResponse - >; + removeRestrictionsForOrg: { + ( + params?: RequestParameters & + InteractionsRemoveRestrictionsForOrgParams + ): Promise; endpoint: EndpointInterface; }; /** - * Enables an authenticated GitHub App to find the user’s installation information. - * - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. */ - getUserInstallation: { - (params?: RequestParameters & AppsGetUserInstallationParams): Promise< - OctokitResponse - >; + removeRestrictionsForRepo: { + ( + params?: RequestParameters & + InteractionsRemoveRestrictionsForRepoParams + ): Promise; endpoint: EndpointInterface; }; + }; + issues: { /** - * Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. + * Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. * - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. + * This example adds two assignees to the existing `octocat` assignee. */ - listAccountsUserOrOrgOnPlan: { + addAssignees: { + ( + params?: RequestParameters & + IssuesAddAssigneesParamsDeprecatedNumber + ): Promise>; ( - params?: RequestParameters & AppsListAccountsUserOrOrgOnPlanParams - ): Promise>; + params?: RequestParameters & IssuesAddAssigneesParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * Returns any accounts associated with a plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. - */ - listAccountsUserOrOrgOnPlanStubbed: { + + addLabels: { ( params?: RequestParameters & - AppsListAccountsUserOrOrgOnPlanStubbedParams - ): Promise< - OctokitResponse - >; + IssuesAddLabelsParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & IssuesAddLabelsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * Checks if a user has permission to be assigned to an issue in this repository. * - * You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. * - * The access the user has to each repository is included in the hash under the `permissions` key. + * Otherwise a `404` status code is returned. */ - listInstallationReposForAuthenticatedUser: { + checkAssignee: { ( - params?: RequestParameters & - AppsListInstallationReposForAuthenticatedUserParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & IssuesCheckAssigneeParams + ): Promise; endpoint: EndpointInterface; }; /** - * You must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. * - * The permissions the installation has are included under the `permissions` key. + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. */ - listInstallations: { - (params?: RequestParameters & AppsListInstallationsParams): Promise< - OctokitResponse + create: { + ( + params?: RequestParameters & + IssuesCreateParamsDeprecatedAssignee + ): Promise>; + (params?: RequestParameters & IssuesCreateParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. - * - * You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. - * - * You can find the permissions for the installation under the `permissions` key. + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. */ - listInstallationsForAuthenticatedUser: { + createComment: { ( params?: RequestParameters & - AppsListInstallationsForAuthenticatedUserParams - ): Promise< - OctokitResponse - >; + IssuesCreateCommentParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & IssuesCreateCommentParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). - */ - listMarketplacePurchasesForAuthenticatedUser: { + + createLabel: { + ( + params?: RequestParameters & IssuesCreateLabelParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + createMilestone: { + ( + params?: RequestParameters & IssuesCreateMilestoneParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + deleteComment: { + ( + params?: RequestParameters & IssuesDeleteCommentParams + ): Promise; + + endpoint: EndpointInterface; + }; + + deleteLabel: { + ( + params?: RequestParameters & IssuesDeleteLabelParams + ): Promise; + + endpoint: EndpointInterface; + }; + + deleteMilestone: { ( params?: RequestParameters & - AppsListMarketplacePurchasesForAuthenticatedUserParams - ): Promise< - OctokitResponse< - AppsListMarketplacePurchasesForAuthenticatedUserResponse - > - >; + IssuesDeleteMilestoneParamsDeprecatedNumber + ): Promise; + ( + params?: RequestParameters & IssuesDeleteMilestoneParams + ): Promise; endpoint: EndpointInterface; }; /** - * Returns only active subscriptions. You must use a [user-to-server OAuth access token](https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/). + * The API returns a [`301 Moved Permanently` status](https://developer.github.com/v3/#http-redirects) if the issue was [transferred](https://help.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe to the [`issues`](https://developer.github.com/v3/activity/events/types/#issuesevent) webhook. + * + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. */ - listMarketplacePurchasesForAuthenticatedUserStubbed: { + get: { ( params?: RequestParameters & - AppsListMarketplacePurchasesForAuthenticatedUserStubbedParams - ): Promise< - OctokitResponse< - AppsListMarketplacePurchasesForAuthenticatedUserStubbedResponse - > + IssuesGetParamsDeprecatedNumber + ): Promise>; + (params?: RequestParameters & IssuesGetParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - /** - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. - */ - listPlans: { - (params?: RequestParameters & AppsListPlansParams): Promise< - OctokitResponse - >; + + getComment: { + ( + params?: RequestParameters & IssuesGetCommentParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * GitHub Apps must use a [JWT](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://developer.github.com/v3/auth/#basic-authentication) with their client ID and client secret to access this endpoint. - */ - listPlansStubbed: { - (params?: RequestParameters & AppsListPlansStubbedParams): Promise< - OctokitResponse + + getEvent: { + (params?: RequestParameters & IssuesGetEventParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - /** - * List repositories that an installation can access. - * - * You must use an [installation access token](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - listRepos: { - (params?: RequestParameters & AppsListReposParams): Promise< - OctokitResponse + + getLabel: { + (params?: RequestParameters & IssuesGetLabelParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - /** - * Remove a single repository from an installation. The authenticated user must have admin access to the repository. - * - * You must use a personal access token (which you can create via the [command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization)) or [Basic Authentication](https://developer.github.com/v3/auth/#basic-authentication) to access this endpoint. - */ - removeRepoFromInstallation: { + + getMilestone: { ( - params?: RequestParameters & AppsRemoveRepoFromInstallationParams - ): Promise; + params?: RequestParameters & + IssuesGetMilestoneParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & IssuesGetMilestoneParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. * - * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. - * @deprecated apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. */ - resetAuthorization: { - (params?: RequestParameters & AppsResetAuthorizationParams): Promise< - OctokitResponse + list: { + (params?: RequestParameters & IssuesListParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + * Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ - resetToken: { - (params?: RequestParameters & AppsResetTokenParams): Promise< - OctokitResponse - >; + listAssignees: { + ( + params?: RequestParameters & IssuesListAssigneesParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. - * @deprecated apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application + * Issue Comments are ordered by ascending ID. */ - revokeAuthorizationForApplication: { + listComments: { ( - params?: RequestParameters & AppsRevokeAuthorizationForApplicationParams - ): Promise; + params?: RequestParameters & + IssuesListCommentsParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & IssuesListCommentsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted. - * - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). - * @deprecated apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application + * By default, Issue Comments are ordered by ascending ID. */ - revokeGrantForApplication: { + listCommentsForRepo: { ( - params?: RequestParameters & AppsRevokeGrantForApplicationParams - ): Promise; + params?: RequestParameters & + IssuesListCommentsForRepoParams + ): Promise>; endpoint: EndpointInterface; }; - }; - checks: { - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Creates a new check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to create check runs. - */ - create: { - (params?: RequestParameters & ChecksCreateParams): Promise< - OctokitResponse - >; + + listEvents: { + ( + params?: RequestParameters & + IssuesListEventsParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & IssuesListEventsParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + listEventsForRepo: { + ( + params?: RequestParameters & IssuesListEventsForRepoParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + listEventsForTimeline: { + ( + params?: RequestParameters & + IssuesListEventsForTimelineParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & + IssuesListEventsForTimelineParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. * - * By default, check suites are automatically created when you create a [check run](https://developer.github.com/v3/checks/runs/). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Set preferences for check suites on a repository](https://developer.github.com/v3/checks/suites/#set-preferences-for-check-suites-on-a-repository)". Your GitHub App must have the `checks:write` permission to create check suites. + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. */ - createSuite: { - (params?: RequestParameters & ChecksCreateSuiteParams): Promise< - OctokitResponse + listForAuthenticatedUser: { + ( + params?: RequestParameters & + IssuesListForAuthenticatedUserParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. * - * Gets a single check run using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. */ - get: { - (params?: RequestParameters & ChecksGetParams): Promise< - OctokitResponse - >; + listForOrg: { + ( + params?: RequestParameters & IssuesListForOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. * - * Gets a single check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. */ - getSuite: { - (params?: RequestParameters & ChecksGetSuiteParams): Promise< - OctokitResponse - >; + listForRepo: { + ( + params?: RequestParameters & IssuesListForRepoParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * Lists annotations for a check run using the annotation `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get annotations for a check run. OAuth Apps and authenticated users must have the `repo` scope to get annotations for a check run in a private repository. - */ - listAnnotations: { - (params?: RequestParameters & ChecksListAnnotationsParams): Promise< - OctokitResponse + + listLabelsForMilestone: { + ( + params?: RequestParameters & + IssuesListLabelsForMilestoneParamsDeprecatedNumber + ): Promise< + OctokitResponse + >; + ( + params?: RequestParameters & + IssuesListLabelsForMilestoneParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - listForRef: { - (params?: RequestParameters & ChecksListForRefParams): Promise< - OctokitResponse - >; + + listLabelsForRepo: { + ( + params?: RequestParameters & IssuesListLabelsForRepoParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + listLabelsOnIssue: { + ( + params?: RequestParameters & + IssuesListLabelsOnIssueParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & IssuesListLabelsOnIssueParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + listMilestonesForRepo: { + ( + params?: RequestParameters & + IssuesListMilestonesForRepoParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * Users with push access can lock an issue or pull request's conversation. * - * Lists check runs for a check suite using its `id`. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." */ - listForSuite: { - (params?: RequestParameters & ChecksListForSuiteParams): Promise< - OctokitResponse + lock: { + ( + params?: RequestParameters & + IssuesLockParamsDeprecatedNumber + ): Promise; + (params?: RequestParameters & IssuesLockParams): Promise< + AnyResponse >; endpoint: EndpointInterface; }; /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. + * Removes one or more assignees from an issue. * - * Lists check suites for a commit `ref`. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to list check suites. OAuth Apps and authenticated users must have the `repo` scope to get check suites in a private repository. + * This example removes two of three assignees, leaving the `octocat` assignee. */ - listSuitesForRef: { - (params?: RequestParameters & ChecksListSuitesForRefParams): Promise< - OctokitResponse - >; + removeAssignees: { + ( + params?: RequestParameters & + IssuesRemoveAssigneesParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & IssuesRemoveAssigneesParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://developer.github.com/v3/activity/events/types/#checksuiteevent) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + * Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. */ - rerequestSuite: { - (params?: RequestParameters & ChecksRerequestSuiteParams): Promise< - AnyResponse - >; + removeLabel: { + ( + params?: RequestParameters & + IssuesRemoveLabelParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & IssuesRemoveLabelParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + removeLabels: { + ( + params?: RequestParameters & + IssuesRemoveLabelsParamsDeprecatedNumber + ): Promise; + ( + params?: RequestParameters & IssuesRemoveLabelsParams + ): Promise; + + endpoint: EndpointInterface; + }; + + replaceLabels: { + ( + params?: RequestParameters & + IssuesReplaceLabelsParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & IssuesReplaceLabelsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Changes the default automatic flow when creating check suites. By default, the CheckSuiteEvent is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://developer.github.com/v3/checks/suites/#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. + * Users with push access can unlock an issue's conversation. */ - setSuitesPreferences: { - (params?: RequestParameters & ChecksSetSuitesPreferencesParams): Promise< - OctokitResponse + unlock: { + ( + params?: RequestParameters & + IssuesUnlockParamsDeprecatedNumber + ): Promise; + (params?: RequestParameters & IssuesUnlockParams): Promise< + AnyResponse >; endpoint: EndpointInterface; }; /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + * Issue owners and users with push access can edit an issue. */ update: { - (params?: RequestParameters & ChecksUpdateParams): Promise< - OctokitResponse + ( + params?: RequestParameters & + IssuesUpdateParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & + IssuesUpdateParamsDeprecatedAssignee + ): Promise>; + (params?: RequestParameters & IssuesUpdateParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - }; - codesOfConduct: { - getConductCode: { + + updateComment: { ( - params?: RequestParameters & CodesOfConductGetConductCodeParams - ): Promise>; + params?: RequestParameters & IssuesUpdateCommentParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * This method returns the contents of the repository's code of conduct file, if one is detected. - */ - getForRepo: { - (params?: RequestParameters & CodesOfConductGetForRepoParams): Promise< - OctokitResponse - >; + + updateLabel: { + ( + params?: RequestParameters & IssuesUpdateLabelParams + ): Promise>; endpoint: EndpointInterface; }; - listConductCodes: { - (params?: RequestParameters & EmptyParams): Promise< - OctokitResponse - >; + updateMilestone: { + ( + params?: RequestParameters & + IssuesUpdateMilestoneParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & IssuesUpdateMilestoneParams + ): Promise>; endpoint: EndpointInterface; }; }; - emojis: { - /** - * Lists all the emojis available to use on GitHub. - */ + licenses: { get: { - (params?: RequestParameters & EmptyParams): Promise; - - endpoint: EndpointInterface; - }; - }; - gists: { - checkIsStarred: { - (params?: RequestParameters & GistsCheckIsStarredParams): Promise< - AnyResponse + (params?: RequestParameters & LicensesGetParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Allows you to add a new gist with one or more files. + * This method returns the contents of the repository's license file, if one is detected. * - * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + * Similar to [the repository contents API](https://developer.github.com/v3/repos/contents/#get-contents), this method also supports [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw license content or rendered license HTML. */ - create: { - (params?: RequestParameters & GistsCreateParams): Promise< - OctokitResponse - >; + getForRepo: { + ( + params?: RequestParameters & LicensesGetForRepoParams + ): Promise>; endpoint: EndpointInterface; }; - - createComment: { - (params?: RequestParameters & GistsCreateCommentParams): Promise< - OctokitResponse + /** + * @deprecated licenses.list() has been renamed to licenses.listCommonlyUsed() (2019-03-05) + */ + list: { + (params?: RequestParameters & EmptyParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - delete: { - (params?: RequestParameters & GistsDeleteParams): Promise; + listCommonlyUsed: { + (params?: RequestParameters & EmptyParams): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; - - deleteComment: { - (params?: RequestParameters & GistsDeleteCommentParams): Promise< + }; + markdown: { + render: { + (params?: RequestParameters & MarkdownRenderParams): Promise< AnyResponse >; endpoint: EndpointInterface; }; /** - * **Note**: This was previously `/gists/:gist_id/fork`. + * You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ - fork: { - (params?: RequestParameters & GistsForkParams): Promise< - OctokitResponse - >; + renderRaw: { + ( + params?: RequestParameters & MarkdownRenderRawParams + ): Promise; endpoint: EndpointInterface; }; - + }; + meta: { + /** + * This endpoint provides a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://help.github.com/articles/about-github-s-ip-addresses/)." + */ get: { - (params?: RequestParameters & GistsGetParams): Promise< - OctokitResponse + (params?: RequestParameters & EmptyParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - getComment: { - (params?: RequestParameters & GistsGetCommentParams): Promise< - OctokitResponse - >; + }; + migrations: { + /** + * Stop an import for a repository. + */ + cancelImport: { + ( + params?: RequestParameters & MigrationsCancelImportParams + ): Promise; endpoint: EndpointInterface; }; - - getRevision: { - (params?: RequestParameters & GistsGetRevisionParams): Promise< - OctokitResponse - >; + /** + * Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://developer.github.com/v3/migrations/users/#list-user-migrations) and [Get the status of a user migration](https://developer.github.com/v3/migrations/users/#get-the-status-of-a-user-migration) endpoints, will continue to be available even after an archive is deleted. + */ + deleteArchiveForAuthenticatedUser: { + ( + params?: RequestParameters & + MigrationsDeleteArchiveForAuthenticatedUserParams + ): Promise; endpoint: EndpointInterface; }; - - list: { - (params?: RequestParameters & GistsListParams): Promise< - OctokitResponse - >; + /** + * Deletes a previous migration archive. Migration archives are automatically deleted after seven days. + */ + deleteArchiveForOrg: { + ( + params?: RequestParameters & + MigrationsDeleteArchiveForOrgParams + ): Promise; endpoint: EndpointInterface; }; - - listComments: { - (params?: RequestParameters & GistsListCommentsParams): Promise< - OctokitResponse - >; + /** + * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: + * + * * attachments + * * bases + * * commit\_comments + * * issue\_comments + * * issue\_events + * * issues + * * milestones + * * organizations + * * projects + * * protected\_branches + * * pull\_request\_reviews + * * pull\_requests + * * releases + * * repositories + * * review\_comments + * * schema + * * users + * + * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. + */ + getArchiveForAuthenticatedUser: { + ( + params?: RequestParameters & + MigrationsGetArchiveForAuthenticatedUserParams + ): Promise; endpoint: EndpointInterface; }; - - listCommits: { - (params?: RequestParameters & GistsListCommitsParams): Promise< - OctokitResponse - >; + /** + * Fetches the URL to a migration archive. + */ + getArchiveForOrg: { + ( + params?: RequestParameters & + MigrationsGetArchiveForOrgParams + ): Promise; endpoint: EndpointInterface; }; - - listForks: { - (params?: RequestParameters & GistsListForksParams): Promise< - OctokitResponse - >; + /** + * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. + * + * This API method and the "Map a commit author" method allow you to provide correct Git author information. + */ + getCommitAuthors: { + ( + params?: RequestParameters & + MigrationsGetCommitAuthorsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List all public gists sorted by most recently updated to least recently updated. + * View the progress of an import. * - * Note: With [pagination](https://developer.github.com/v3/#pagination), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page. + * **Import status** + * + * This section includes details about the possible values of the `status` field of the Import Progress response. + * + * An import that does not have errors will progress through these steps: + * + * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. + * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). + * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. + * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". + * * `complete` - the import is complete, and the repository is ready on GitHub. + * + * If there are problems, you will see one of these in the `status` field: + * + * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. + * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com) for more information. + * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. + * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://developer.github.com/v3/migrations/source_imports/#cancel-an-import) and [retry](https://developer.github.com/v3/migrations/source_imports/#start-an-import) with the correct URL. + * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. + * + * **The project_choices field** + * + * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. + * + * **Git LFS related fields** + * + * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * + * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. + * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. + * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. + * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. */ - listPublic: { - (params?: RequestParameters & GistsListPublicParams): Promise< - OctokitResponse - >; + getImportProgress: { + ( + params?: RequestParameters & + MigrationsGetImportProgressParams + ): Promise>; endpoint: EndpointInterface; }; - - listPublicForUser: { - (params?: RequestParameters & GistsListPublicForUserParams): Promise< - OctokitResponse - >; + /** + * List files larger than 100MB found during the import + */ + getLargeFiles: { + ( + params?: RequestParameters & MigrationsGetLargeFilesParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List the authenticated user's starred gists: + * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: + * + * * `pending` - the migration hasn't started yet. + * * `exporting` - the migration is in progress. + * * `exported` - the migration finished successfully. + * * `failed` - the migration failed. + * + * Once the migration has been `exported` you can [download the migration archive](https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive). */ - listStarred: { - (params?: RequestParameters & GistsListStarredParams): Promise< - OctokitResponse + getStatusForAuthenticatedUser: { + ( + params?: RequestParameters & + MigrationsGetStatusForAuthenticatedUserParams + ): Promise< + OctokitResponse< + MigrationsGetStatusForAuthenticatedUserResponse + > >; endpoint: EndpointInterface; }; /** - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * Fetches the status of a migration. + * + * The `state` of a migration can be one of the following values: + * + * * `pending`, which means the migration hasn't started yet. + * * `exporting`, which means the migration is in progress. + * * `exported`, which means the migration finished successfully. + * * `failed`, which means the migration failed. */ - star: { - (params?: RequestParameters & GistsStarParams): Promise; + getStatusForOrg: { + ( + params?: RequestParameters & + MigrationsGetStatusForOrgParams + ): Promise>; endpoint: EndpointInterface; }; - - unstar: { - (params?: RequestParameters & GistsUnstarParams): Promise; + /** + * Lists all migrations a user has started. + */ + listForAuthenticatedUser: { + ( + params?: RequestParameters & + MigrationsListForAuthenticatedUserParams + ): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. + * Lists the most recent migrations. */ - update: { - (params?: RequestParameters & GistsUpdateParams): Promise< - OctokitResponse - >; + listForOrg: { + ( + params?: RequestParameters & MigrationsListForOrgParams + ): Promise>; endpoint: EndpointInterface; }; + /** + * List all the repositories for this organization migration. + */ + listReposForOrg: { + ( + params?: RequestParameters & + MigrationsListReposForOrgParams + ): Promise>; - updateComment: { - (params?: RequestParameters & GistsUpdateCommentParams): Promise< - OctokitResponse - >; + endpoint: EndpointInterface; + }; + /** + * Lists all the repositories for this user migration. + */ + listReposForUser: { + ( + params?: RequestParameters & + MigrationsListReposForUserParams + ): Promise>; endpoint: EndpointInterface; }; - }; - git: { - createBlob: { - (params?: RequestParameters & GitCreateBlobParams): Promise< - OctokitResponse - >; + /** + * Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + */ + mapCommitAuthor: { + ( + params?: RequestParameters & + MigrationsMapCommitAuthorParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Creates a new Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - * - * In this example, the payload of the signature would be: - * - * - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + * You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://help.github.com/articles/versioning-large-files/). */ - createCommit: { - (params?: RequestParameters & GitCreateCommitParams): Promise< - OctokitResponse - >; + setLfsPreference: { + ( + params?: RequestParameters & + MigrationsSetLfsPreferenceParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Creates a reference for your repository. You are unable to create new references for empty repositories, even if the commit SHA-1 hash used exists. Empty repositories are repositories without branches. + * Initiates the generation of a user migration archive. */ - createRef: { - (params?: RequestParameters & GitCreateRefParams): Promise< - OctokitResponse + startForAuthenticatedUser: { + ( + params?: RequestParameters & + MigrationsStartForAuthenticatedUserParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://developer.github.com/v3/git/refs/#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://developer.github.com/v3/git/refs/#create-a-reference) the tag reference - this call would be unnecessary. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + * Initiates the generation of a migration archive. */ - createTag: { - (params?: RequestParameters & GitCreateTagParams): Promise< - OctokitResponse - >; + startForOrg: { + ( + params?: RequestParameters & MigrationsStartForOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * The tree creation API accepts nested entries. If you specify both a tree and a nested path modifying that tree, this endpoint will overwrite the contents of the tree with the new path contents, and create a new tree structure. - * - * If you use this endpoint to add, delete, or modify the file contents in a tree, you will need to commit the tree and then update a branch to point to the commit. For more information see "[Create a commit](https://developer.github.com/v3/git/commits/#create-a-commit)" and "[Update a reference](https://developer.github.com/v3/git/refs/#update-a-reference)." + * Start a source import to a GitHub repository using GitHub Importer. */ - createTree: { - (params?: RequestParameters & GitCreateTreeParams): Promise< - OctokitResponse - >; + startImport: { + ( + params?: RequestParameters & MigrationsStartImportParams + ): Promise>; endpoint: EndpointInterface; }; /** - * ``` - * DELETE /repos/octocat/Hello-World/git/refs/heads/feature-a - * ``` - * - * ``` - * DELETE /repos/octocat/Hello-World/git/refs/tags/v1.0 - * ``` + * Unlocks a repository. You can lock repositories when you [start a user migration](https://developer.github.com/v3/migrations/users/#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://developer.github.com/v3/repos/#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ - deleteRef: { - (params?: RequestParameters & GitDeleteRefParams): Promise; + unlockRepoForAuthenticatedUser: { + ( + params?: RequestParameters & + MigrationsUnlockRepoForAuthenticatedUserParams + ): Promise; endpoint: EndpointInterface; }; /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. + * Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://developer.github.com/v3/repos/#delete-a-repository) when the migration is complete and you no longer need the source data. */ - getBlob: { - (params?: RequestParameters & GitGetBlobParams): Promise< - OctokitResponse - >; + unlockRepoForOrg: { + ( + params?: RequestParameters & + MigrationsUnlockRepoForOrgParams + ): Promise; endpoint: EndpointInterface; }; /** - * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - * - * **Signature verification object** + * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API request. If no parameters are provided, the import will be restarted. * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. You can select the project to import by providing one of the objects in the `project_choices` array in the update request. * - * These are the possible values for `reason` in the `verification` object: + * The following example demonstrates the workflow for updating an import with "project1" as the project choice. Given a `project_choices` array like such: * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + * To restart an import, no parameters are provided in the update request. */ - getCommit: { - (params?: RequestParameters & GitGetCommitParams): Promise< - OctokitResponse - >; + updateImport: { + ( + params?: RequestParameters & MigrationsUpdateImportParams + ): Promise>; endpoint: EndpointInterface; }; + }; + oauthAuthorizations: { /** - * Returns a single reference from your Git database. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't match an existing ref, a `404` is returned. - * - * **Note:** You need to explicitly [request a pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). * - * To get the reference for a branch named `skunkworkz/featureA`, the endpoint route is: + * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + * @deprecated oauthAuthorizations.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization */ - getRef: { - (params?: RequestParameters & GitGetRefParams): Promise< - OctokitResponse + checkAuthorization: { + ( + params?: RequestParameters & + OauthAuthorizationsCheckAuthorizationParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * **Signature verification object** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). * - * These are the possible values for `reason` in the `verification` object: + * Creates OAuth tokens using [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. + * + * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be whitelisted. Read more about whitelisting tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + * @deprecated oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization */ - getTag: { - (params?: RequestParameters & GitGetTagParams): Promise< - OctokitResponse + createAuthorization: { + ( + params?: RequestParameters & + OauthAuthorizationsCreateAuthorizationParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * If `truncated` is `true`, the number of items in the `tree` array exceeded our maximum limit. If you need to fetch more items, you can clone the repository and iterate over the Git data locally. + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization */ - getTree: { - (params?: RequestParameters & GitGetTreeParams): Promise; + deleteAuthorization: { + ( + params?: RequestParameters & + OauthAuthorizationsDeleteAuthorizationParams + ): Promise; endpoint: EndpointInterface; }; /** - * Returns an array of references from your Git database that match the supplied name. The `:ref` in the URL must be formatted as `heads/` for branches and `tags/` for tags. If the `:ref` doesn't exist in the repository, but existing refs start with `:ref`, they will be returned as an array. - * - * When you use this endpoint without providing a `:ref`, it will return an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. - * - * **Note:** You need to explicitly [request a pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) to trigger a test merge commit, which checks the mergeability of pull requests. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). * - * If you request matching references for a branch named `feature` but the branch `feature` doesn't exist, the response can still include other matching head refs that start with the word `feature`, such as `featureA` and `featureB`. + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). + * @deprecated oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant */ - listMatchingRefs: { - (params?: RequestParameters & GitListMatchingRefsParams): Promise< - OctokitResponse - >; + deleteGrant: { + ( + params?: RequestParameters & + OauthAuthorizationsDeleteGrantParams + ): Promise; endpoint: EndpointInterface; }; /** - * Returns an array of all the references from your Git database, including notes and stashes if they exist on the server. Anything in the namespace is returned, not just `heads` and `tags`. If there are no references to list, a `404` is returned. + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization */ - listRefs: { - (params?: RequestParameters & GitListRefsParams): Promise; + getAuthorization: { + ( + params?: RequestParameters & + OauthAuthorizationsGetAuthorizationParams + ): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; - - updateRef: { - (params?: RequestParameters & GitUpdateRefParams): Promise< - OctokitResponse - >; + /** + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant + */ + getGrant: { + ( + params?: RequestParameters & + OauthAuthorizationsGetGrantParams + ): Promise>; endpoint: EndpointInterface; }; - }; - gitignore: { /** - * The API also allows fetching the source of a single template. + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). * - * Use the raw [media type](https://developer.github.com/v3/media/) to get the raw contents. + * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app */ - getTemplate: { - (params?: RequestParameters & GitignoreGetTemplateParams): Promise< - OctokitResponse + getOrCreateAuthorizationForApp: { + ( + params?: RequestParameters & + OauthAuthorizationsGetOrCreateAuthorizationForAppParams + ): Promise< + OctokitResponse< + OauthAuthorizationsGetOrCreateAuthorizationForAppResponse + > >; endpoint: EndpointInterface; }; /** - * List all templates available to pass as an option when [creating a repository](https://developer.github.com/v3/repos/#create). + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * @deprecated oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint */ - listTemplates: { - (params?: RequestParameters & EmptyParams): Promise< - OctokitResponse + getOrCreateAuthorizationForAppAndFingerprint: { + ( + params?: RequestParameters & + OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams + ): Promise< + OctokitResponse< + OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintResponse + > >; endpoint: EndpointInterface; }; - }; - interactions: { /** - * Temporarily restricts interactions to certain GitHub users in any public repository in the given organization. You must be an organization owner to set these restrictions. + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * @deprecated oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint */ - addOrUpdateRestrictionsForOrg: { + getOrCreateAuthorizationForAppFingerprint: { ( params?: RequestParameters & - InteractionsAddOrUpdateRestrictionsForOrgParams + OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams ): Promise< - OctokitResponse + OctokitResponse< + OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintResponse + > >; endpoint: EndpointInterface; }; /** - * Temporarily restricts interactions to certain GitHub users within the given repository. You must have owner or admin access to set restrictions. + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * @deprecated oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations */ - addOrUpdateRestrictionsForRepo: { + listAuthorizations: { ( params?: RequestParameters & - InteractionsAddOrUpdateRestrictionsForRepoParams + OauthAuthorizationsListAuthorizationsParams ): Promise< - OctokitResponse + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Shows which group of GitHub users can interact with this organization and when the restriction expires. If there are no restrictions, you will see an empty response. + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. + * @deprecated oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants */ - getRestrictionsForOrg: { + listGrants: { ( - params?: RequestParameters & InteractionsGetRestrictionsForOrgParams - ): Promise>; + params?: RequestParameters & + OauthAuthorizationsListGrantsParams + ): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * Shows which group of GitHub users can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. + * @deprecated oauthAuthorizations.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization */ - getRestrictionsForRepo: { + resetAuthorization: { ( - params?: RequestParameters & InteractionsGetRestrictionsForRepoParams - ): Promise>; + params?: RequestParameters & + OauthAuthorizationsResetAuthorizationParams + ): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. + * @deprecated oauthAuthorizations.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application */ - removeRestrictionsForOrg: { + revokeAuthorizationForApplication: { ( - params?: RequestParameters & InteractionsRemoveRestrictionsForOrgParams + params?: RequestParameters & + OauthAuthorizationsRevokeAuthorizationForApplicationParams ): Promise; endpoint: EndpointInterface; }; /** - * Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. + * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted. + * + * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). + * @deprecated oauthAuthorizations.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application */ - removeRestrictionsForRepo: { + revokeGrantForApplication: { ( - params?: RequestParameters & InteractionsRemoveRestrictionsForRepoParams + params?: RequestParameters & + OauthAuthorizationsRevokeGrantForApplicationParams ): Promise; endpoint: EndpointInterface; }; - }; - issues: { /** - * Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. + * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). * - * This example adds two assignees to the existing `octocat` assignee. + * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * + * You can only send one of these scope keys at a time. + * @deprecated oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization */ - addAssignees: { - ( - params?: RequestParameters & IssuesAddAssigneesParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesAddAssigneesParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - addLabels: { + updateAuthorization: { ( - params?: RequestParameters & IssuesAddLabelsParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesAddLabelsParams): Promise< - OctokitResponse + params?: RequestParameters & + OauthAuthorizationsUpdateAuthorizationParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; + }; + orgs: { /** - * Checks if a user has permission to be assigned to an issue in this repository. + * Only authenticated organization owners can add a member to the organization or update the member's role. * - * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. + * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://developer.github.com/v3/orgs/members/#get-organization-membership) will be `pending` until they accept the invitation. * - * Otherwise a `404` status code is returned. + * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * + * **Rate limits** + * + * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. */ - checkAssignee: { - (params?: RequestParameters & IssuesCheckAssigneeParams): Promise< + addOrUpdateMembership: { + ( + params?: RequestParameters & + OrgsAddOrUpdateMembershipParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + blockUser: { + (params?: RequestParameters & OrgsBlockUserParams): Promise< AnyResponse >; endpoint: EndpointInterface; }; /** - * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://help.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * If the user is blocked: * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * If the user is not blocked: */ - create: { + checkBlockedUser: { ( - params?: RequestParameters & IssuesCreateParamsDeprecatedAssignee - ): Promise>; - (params?: RequestParameters & IssuesCreateParams): Promise< - OctokitResponse - >; + params?: RequestParameters & OrgsCheckBlockedUserParams + ): Promise; endpoint: EndpointInterface; }; /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * Check if a user is, publicly or privately, a member of the organization. */ - createComment: { + checkMembership: { ( - params?: RequestParameters & IssuesCreateCommentParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesCreateCommentParams): Promise< - OctokitResponse - >; + params?: RequestParameters & OrgsCheckMembershipParams + ): Promise; endpoint: EndpointInterface; }; - createLabel: { - (params?: RequestParameters & IssuesCreateLabelParams): Promise< - OctokitResponse - >; + checkPublicMembership: { + ( + params?: RequestParameters & + OrgsCheckPublicMembershipParams + ): Promise; endpoint: EndpointInterface; }; - createMilestone: { - (params?: RequestParameters & IssuesCreateMilestoneParams): Promise< - OctokitResponse - >; + concealMembership: { + ( + params?: RequestParameters & OrgsConcealMembershipParams + ): Promise; endpoint: EndpointInterface; }; - - deleteComment: { - (params?: RequestParameters & IssuesDeleteCommentParams): Promise< - AnyResponse + /** + * When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". + */ + convertMemberToOutsideCollaborator: { + ( + params?: RequestParameters & + OrgsConvertMemberToOutsideCollaboratorParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - deleteLabel: { - (params?: RequestParameters & IssuesDeleteLabelParams): Promise< - AnyResponse + /** + * Here's how you can create a hook that posts payloads in JSON format: + */ + createHook: { + (params?: RequestParameters & OrgsCreateHookParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - deleteMilestone: { + /** + * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createInvitation: { ( - params?: RequestParameters & IssuesDeleteMilestoneParamsDeprecatedNumber - ): Promise; - (params?: RequestParameters & IssuesDeleteMilestoneParams): Promise< + params?: RequestParameters & OrgsCreateInvitationParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + deleteHook: { + (params?: RequestParameters & OrgsDeleteHookParams): Promise< AnyResponse >; endpoint: EndpointInterface; }; /** - * The API returns a [`301 Moved Permanently` status](https://developer.github.com/v3/#http-redirects) if the issue was [transferred](https://help.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe to the [`issues`](https://developer.github.com/v3/activity/events/types/#issuesevent) webhook. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see "[Response with GitHub plan information](https://developer.github.com/v3/orgs/#response-with-github-plan-information)." */ get: { - (params?: RequestParameters & IssuesGetParamsDeprecatedNumber): Promise< - OctokitResponse - >; - (params?: RequestParameters & IssuesGetParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - getComment: { - (params?: RequestParameters & IssuesGetCommentParams): Promise< - OctokitResponse + (params?: RequestParameters & OrgsGetParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - getEvent: { - (params?: RequestParameters & IssuesGetEventParams): Promise< - OctokitResponse + getHook: { + (params?: RequestParameters & OrgsGetHookParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - getLabel: { - (params?: RequestParameters & IssuesGetLabelParams): Promise< - OctokitResponse - >; + /** + * In order to get a user's membership with an organization, the authenticated user must be an organization member. + */ + getMembership: { + ( + params?: RequestParameters & OrgsGetMembershipParams + ): Promise>; endpoint: EndpointInterface; }; - getMilestone: { + getMembershipForAuthenticatedUser: { ( - params?: RequestParameters & IssuesGetMilestoneParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesGetMilestoneParams): Promise< - OctokitResponse + params?: RequestParameters & + OrgsGetMembershipForAuthenticatedUserParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * Lists all organizations, in the order that they were created on GitHub. * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of organizations. */ list: { - (params?: RequestParameters & IssuesListParams): Promise< - OctokitResponse + (params?: RequestParameters & OrgsListParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Lists the [available assignees](https://help.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. + * List the users blocked by an organization. */ - listAssignees: { - (params?: RequestParameters & IssuesListAssigneesParams): Promise< - OctokitResponse - >; + listBlockedUsers: { + ( + params?: RequestParameters & OrgsListBlockedUsersParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Issue Comments are ordered by ascending ID. + * List organizations for the authenticated user. + * + * **OAuth scope requirements** + * + * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. */ - listComments: { + listForAuthenticatedUser: { ( - params?: RequestParameters & IssuesListCommentsParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesListCommentsParams): Promise< - OctokitResponse + params?: RequestParameters & + OrgsListForAuthenticatedUserParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * By default, Issue Comments are ordered by ascending ID. + * List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. + * + * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List your organizations](https://developer.github.com/v3/orgs/#list-your-organizations) API instead. */ - listCommentsForRepo: { - (params?: RequestParameters & IssuesListCommentsForRepoParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - listEvents: { + listForUser: { ( - params?: RequestParameters & IssuesListEventsParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesListEventsParams): Promise< - OctokitResponse - >; + params?: RequestParameters & OrgsListForUserParams + ): Promise>; endpoint: EndpointInterface; }; - listEventsForRepo: { - (params?: RequestParameters & IssuesListEventsForRepoParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - listEventsForTimeline: { - ( - params?: RequestParameters & - IssuesListEventsForTimelineParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesListEventsForTimelineParams): Promise< - OctokitResponse + listHooks: { + (params?: RequestParameters & OrgsListHooksParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. - * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + * Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ - listForAuthenticatedUser: { + listInstallations: { ( - params?: RequestParameters & IssuesListForAuthenticatedUserParams - ): Promise>; + params?: RequestParameters & OrgsListInstallationsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. - * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + * List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - listForOrg: { - (params?: RequestParameters & IssuesListForOrgParams): Promise< - OctokitResponse - >; + listInvitationTeams: { + ( + params?: RequestParameters & OrgsListInvitationTeamsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. - * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + * List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. */ - listForRepo: { - (params?: RequestParameters & IssuesListForRepoParams): Promise< - OctokitResponse - >; + listMembers: { + ( + params?: RequestParameters & OrgsListMembersParams + ): Promise>; endpoint: EndpointInterface; }; - listLabelsForMilestone: { - ( - params?: RequestParameters & - IssuesListLabelsForMilestoneParamsDeprecatedNumber - ): Promise>; + listMemberships: { ( - params?: RequestParameters & IssuesListLabelsForMilestoneParams - ): Promise>; + params?: RequestParameters & OrgsListMembershipsParams + ): Promise>; endpoint: EndpointInterface; }; - - listLabelsForRepo: { - (params?: RequestParameters & IssuesListLabelsForRepoParams): Promise< - OctokitResponse + /** + * List all users who are outside collaborators of an organization. + */ + listOutsideCollaborators: { + ( + params?: RequestParameters & + OrgsListOutsideCollaboratorsParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - listLabelsOnIssue: { + /** + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + */ + listPendingInvitations: { ( params?: RequestParameters & - IssuesListLabelsOnIssueParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesListLabelsOnIssueParams): Promise< - OctokitResponse - >; + OrgsListPendingInvitationsParams + ): Promise>; endpoint: EndpointInterface; }; - - listMilestonesForRepo: { - (params?: RequestParameters & IssuesListMilestonesForRepoParams): Promise< - OctokitResponse - >; + /** + * Members of an organization can choose to have their membership publicized or not. + */ + listPublicMembers: { + ( + params?: RequestParameters & OrgsListPublicMembersParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Users with push access can lock an issue or pull request's conversation. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. */ - lock: { - (params?: RequestParameters & IssuesLockParamsDeprecatedNumber): Promise< + pingHook: { + (params?: RequestParameters & OrgsPingHookParams): Promise< AnyResponse >; - (params?: RequestParameters & IssuesLockParams): Promise; endpoint: EndpointInterface; }; /** - * Removes one or more assignees from an issue. + * The user can publicize their own membership. (A user cannot publicize the membership for another user.) * - * This example removes two of three assignees, leaving the `octocat` assignee. + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." */ - removeAssignees: { + publicizeMembership: { ( - params?: RequestParameters & IssuesRemoveAssigneesParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesRemoveAssigneesParams): Promise< - OctokitResponse - >; + params?: RequestParameters & OrgsPublicizeMembershipParams + ): Promise; endpoint: EndpointInterface; }; /** - * Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a `404 Not Found` status if the label does not exist. + * Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */ - removeLabel: { + removeMember: { ( - params?: RequestParameters & IssuesRemoveLabelParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesRemoveLabelParams): Promise< - OctokitResponse - >; + params?: RequestParameters & OrgsRemoveMemberParams + ): Promise; endpoint: EndpointInterface; }; - - removeLabels: { + /** + * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * + * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + */ + removeMembership: { ( - params?: RequestParameters & IssuesRemoveLabelsParamsDeprecatedNumber + params?: RequestParameters & OrgsRemoveMembershipParams ): Promise; - (params?: RequestParameters & IssuesRemoveLabelsParams): Promise< - AnyResponse - >; endpoint: EndpointInterface; }; - - replaceLabels: { + /** + * Removing a user from this list will remove them from all the organization's repositories. + */ + removeOutsideCollaborator: { ( - params?: RequestParameters & IssuesReplaceLabelsParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesReplaceLabelsParams): Promise< - OctokitResponse + params?: RequestParameters & + OrgsRemoveOutsideCollaboratorParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - /** - * Users with push access can unlock an issue's conversation. - */ - unlock: { + + unblockUser: { ( - params?: RequestParameters & IssuesUnlockParamsDeprecatedNumber + params?: RequestParameters & OrgsUnblockUserParams ): Promise; - (params?: RequestParameters & IssuesUnlockParams): Promise; endpoint: EndpointInterface; }; /** - * Issue owners and users with push access can edit an issue. + * **Parameter Deprecation Notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes). + * + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. */ update: { ( - params?: RequestParameters & IssuesUpdateParamsDeprecatedNumber - ): Promise>; - ( - params?: RequestParameters & IssuesUpdateParamsDeprecatedAssignee - ): Promise>; - (params?: RequestParameters & IssuesUpdateParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - updateComment: { - (params?: RequestParameters & IssuesUpdateCommentParams): Promise< - OctokitResponse + params?: RequestParameters & + OrgsUpdateParamsDeprecatedMembersAllowedRepositoryCreationType + ): Promise>; + (params?: RequestParameters & OrgsUpdateParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - updateLabel: { - (params?: RequestParameters & IssuesUpdateLabelParams): Promise< - OctokitResponse + updateHook: { + (params?: RequestParameters & OrgsUpdateHookParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - updateMilestone: { + updateMembership: { ( - params?: RequestParameters & IssuesUpdateMilestoneParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & IssuesUpdateMilestoneParams): Promise< - OctokitResponse - >; + params?: RequestParameters & OrgsUpdateMembershipParams + ): Promise>; endpoint: EndpointInterface; }; }; - licenses: { - get: { - (params?: RequestParameters & LicensesGetParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; + projects: { /** - * This method returns the contents of the repository's license file, if one is detected. - * - * Similar to [the repository contents API](https://developer.github.com/v3/repos/contents/#get-contents), this method also supports [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw license content or rendered license HTML. + * Adds a collaborator to a an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. */ - getForRepo: { - (params?: RequestParameters & LicensesGetForRepoParams): Promise< - OctokitResponse - >; + addCollaborator: { + ( + params?: RequestParameters & ProjectsAddCollaboratorParams + ): Promise; endpoint: EndpointInterface; }; /** - * @deprecated licenses.list() has been renamed to licenses.listCommonlyUsed() (2019-03-05) + * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * + * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. */ - list: { - (params?: RequestParameters & EmptyParams): Promise< - OctokitResponse - >; + createCard: { + ( + params?: RequestParameters & ProjectsCreateCardParams + ): Promise>; endpoint: EndpointInterface; }; - listCommonlyUsed: { - (params?: RequestParameters & EmptyParams): Promise< - OctokitResponse - >; + createColumn: { + ( + params?: RequestParameters & ProjectsCreateColumnParams + ): Promise>; endpoint: EndpointInterface; }; - }; - markdown: { - render: { - (params?: RequestParameters & MarkdownRenderParams): Promise; + + createForAuthenticatedUser: { + ( + params?: RequestParameters & + ProjectsCreateForAuthenticatedUserParams + ): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. + * Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - renderRaw: { - (params?: RequestParameters & MarkdownRenderRawParams): Promise< - AnyResponse - >; + createForOrg: { + ( + params?: RequestParameters & ProjectsCreateForOrgParams + ): Promise>; endpoint: EndpointInterface; }; - }; - meta: { /** - * This endpoint provides a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://help.github.com/articles/about-github-s-ip-addresses/)." + * Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - get: { - (params?: RequestParameters & EmptyParams): Promise< - OctokitResponse - >; + createForRepo: { + ( + params?: RequestParameters & ProjectsCreateForRepoParams + ): Promise>; endpoint: EndpointInterface; }; - }; - migrations: { /** - * Stop an import for a repository. + * Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ - cancelImport: { - (params?: RequestParameters & MigrationsCancelImportParams): Promise< + delete: { + (params?: RequestParameters & ProjectsDeleteParams): Promise< AnyResponse >; endpoint: EndpointInterface; }; - /** - * Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [Get a list of user migrations](https://developer.github.com/v3/migrations/users/#get-a-list-of-user-migrations) and [Get the status of a user migration](https://developer.github.com/v3/migrations/users/#get-the-status-of-a-user-migration) endpoints, will continue to be available even after an archive is deleted. - */ - deleteArchiveForAuthenticatedUser: { - ( - params?: RequestParameters & - MigrationsDeleteArchiveForAuthenticatedUserParams - ): Promise; - endpoint: EndpointInterface; - }; - /** - * Deletes a previous migration archive. Migration archives are automatically deleted after seven days. - */ - deleteArchiveForOrg: { + deleteCard: { ( - params?: RequestParameters & MigrationsDeleteArchiveForOrgParams + params?: RequestParameters & ProjectsDeleteCardParams ): Promise; endpoint: EndpointInterface; }; - /** - * Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects: - * - * * attachments - * * bases - * * commit\_comments - * * issue\_comments - * * issue\_events - * * issues - * * milestones - * * organizations - * * projects - * * protected\_branches - * * pull\_request\_reviews - * * pull\_requests - * * releases - * * repositories - * * review\_comments - * * schema - * * users - * - * The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data. - */ - getArchiveForAuthenticatedUser: { + + deleteColumn: { ( - params?: RequestParameters & - MigrationsGetArchiveForAuthenticatedUserParams + params?: RequestParameters & ProjectsDeleteColumnParams ): Promise; endpoint: EndpointInterface; }; /** - * Fetches the URL to a migration archive. + * Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - getArchiveForOrg: { - (params?: RequestParameters & MigrationsGetArchiveForOrgParams): Promise< - AnyResponse + get: { + (params?: RequestParameters & ProjectsGetParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - /** - * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - * - * This API method and the "Map a commit author" method allow you to provide correct Git author information. - */ - getCommitAuthors: { - (params?: RequestParameters & MigrationsGetCommitAuthorsParams): Promise< - OctokitResponse - >; + + getCard: { + ( + params?: RequestParameters & ProjectsGetCardParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * View the progress of an import. - * - * **Import status** - * - * This section includes details about the possible values of the `status` field of the Import Progress response. - * - * An import that does not have errors will progress through these steps: - * - * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * * `complete` - the import is complete, and the repository is ready on GitHub. - * - * If there are problems, you will see one of these in the `status` field: - * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://github.com/contact) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://developer.github.com/v3/migrations/source_imports/#cancel-an-import) and [retry](https://developer.github.com/v3/migrations/source_imports/#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update Existing Import](https://developer.github.com/v3/migrations/source_imports/#update-existing-import) section. - * - * **The project_choices field** - * - * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - * - * **Git LFS related fields** - * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. - * - * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - */ - getImportProgress: { - (params?: RequestParameters & MigrationsGetImportProgressParams): Promise< - OctokitResponse - >; + + getColumn: { + ( + params?: RequestParameters & ProjectsGetColumnParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * List files larger than 100MB found during the import - */ - getLargeFiles: { - (params?: RequestParameters & MigrationsGetLargeFilesParams): Promise< - OctokitResponse - >; + + listCards: { + ( + params?: RequestParameters & ProjectsListCardsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values: - * - * * `pending` - the migration hasn't started yet. - * * `exporting` - the migration is in progress. - * * `exported` - the migration finished successfully. - * * `failed` - the migration failed. - * - * Once the migration has been `exported` you can [download the migration archive](https://developer.github.com/v3/migrations/users/#download-a-user-migration-archive). + * Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. */ - getStatusForAuthenticatedUser: { + listCollaborators: { ( params?: RequestParameters & - MigrationsGetStatusForAuthenticatedUserParams - ): Promise< - OctokitResponse - >; + ProjectsListCollaboratorsParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * Fetches the status of a migration. - * - * The `state` of a migration can be one of the following values: - * - * * `pending`, which means the migration hasn't started yet. - * * `exporting`, which means the migration is in progress. - * * `exported`, which means the migration finished successfully. - * * `failed`, which means the migration failed. - */ - getStatusForOrg: { - (params?: RequestParameters & MigrationsGetStatusForOrgParams): Promise< - OctokitResponse - >; - endpoint: EndpointInterface; - }; - /** - * Lists all migrations a user has started. - */ - listForAuthenticatedUser: { + listColumns: { ( - params?: RequestParameters & MigrationsListForAuthenticatedUserParams - ): Promise>; + params?: RequestParameters & ProjectsListColumnsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Lists the most recent migrations. + * Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + * + * s */ listForOrg: { - (params?: RequestParameters & MigrationsListForOrgParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & ProjectsListForOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. + * Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - mapCommitAuthor: { - (params?: RequestParameters & MigrationsMapCommitAuthorParams): Promise< - OctokitResponse - >; + listForRepo: { + ( + params?: RequestParameters & ProjectsListForRepoParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://help.github.com/articles/versioning-large-files/). - */ - setLfsPreference: { - (params?: RequestParameters & MigrationsSetLfsPreferenceParams): Promise< - OctokitResponse - >; - endpoint: EndpointInterface; - }; - /** - * Initiates the generation of a user migration archive. - */ - startForAuthenticatedUser: { + listForUser: { ( - params?: RequestParameters & MigrationsStartForAuthenticatedUserParams - ): Promise>; + params?: RequestParameters & ProjectsListForUserParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * Initiates the generation of a migration archive. - */ - startForOrg: { - (params?: RequestParameters & MigrationsStartForOrgParams): Promise< - OctokitResponse - >; + + moveCard: { + ( + params?: RequestParameters & ProjectsMoveCardParams + ): Promise; endpoint: EndpointInterface; }; - /** - * Start a source import to a GitHub repository using GitHub Importer. - */ - startImport: { - (params?: RequestParameters & MigrationsStartImportParams): Promise< - OctokitResponse - >; + + moveColumn: { + ( + params?: RequestParameters & ProjectsMoveColumnParams + ): Promise; endpoint: EndpointInterface; }; /** - * Unlocks a repository. You can lock repositories when you [start a user migration](https://developer.github.com/v3/migrations/users/#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://developer.github.com/v3/repos/#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. + * Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ - unlockRepoForAuthenticatedUser: { + removeCollaborator: { ( params?: RequestParameters & - MigrationsUnlockRepoForAuthenticatedUserParams + ProjectsRemoveCollaboratorParams ): Promise; endpoint: EndpointInterface; }; /** - * Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://developer.github.com/v3/repos/#delete-a-repository) when the migration is complete and you no longer need the source data. + * Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. */ - unlockRepoForOrg: { - (params?: RequestParameters & MigrationsUnlockRepoForOrgParams): Promise< - AnyResponse + reviewUserPermissionLevel: { + ( + params?: RequestParameters & + ProjectsReviewUserPermissionLevelParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API request. If no parameters are provided, the import will be restarted. - * - * Some servers (e.g. TFS servers) can have several projects at a single URL. In those cases the import progress will have the status `detection_found_multiple` and the Import Progress response will include a `project_choices` array. You can select the project to import by providing one of the objects in the `project_choices` array in the update request. - * - * The following example demonstrates the workflow for updating an import with "project1" as the project choice. Given a `project_choices` array like such: - * - * To restart an import, no parameters are provided in the update request. + * Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - updateImport: { - (params?: RequestParameters & MigrationsUpdateImportParams): Promise< - OctokitResponse + update: { + (params?: RequestParameters & ProjectsUpdateParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - }; - oauthAuthorizations: { - /** - * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. - * @deprecated apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization - */ - checkAuthorization: { + + updateCard: { ( - params?: RequestParameters & OauthAuthorizationsCheckAuthorizationParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & ProjectsUpdateCardParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * Creates OAuth tokens using [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." - * - * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. - * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://help.github.com/articles/creating-an-access-token-for-command-line-use). - * - * Organizations that enforce SAML SSO require personal access tokens to be whitelisted. Read more about whitelisting tokens in [the GitHub Help documentation](https://help.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). - * @deprecated oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization - */ - createAuthorization: { + + updateColumn: { ( - params?: RequestParameters & - OauthAuthorizationsCreateAuthorizationParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & ProjectsUpdateColumnParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * @deprecated oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization - */ - deleteAuthorization: { + }; + pulls: { + checkIfMerged: { ( params?: RequestParameters & - OauthAuthorizationsDeleteAuthorizationParams + PullsCheckIfMergedParamsDeprecatedNumber ): Promise; - - endpoint: EndpointInterface; - }; - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). - * @deprecated oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant - */ - deleteGrant: { ( - params?: RequestParameters & OauthAuthorizationsDeleteGrantParams + params?: RequestParameters & PullsCheckIfMergedParams ): Promise; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * @deprecated oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * + * You can create a new pull request. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. */ - getAuthorization: { - ( - params?: RequestParameters & OauthAuthorizationsGetAuthorizationParams - ): Promise>; + create: { + (params?: RequestParameters & PullsCreateParams): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * @deprecated oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Comments](https://developer.github.com/v3/issues/comments/#create-a-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * + * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see [Multi-line comment summary](https://developer.github.com/v3/pulls/comments/#multi-line-comment-summary-3). + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. */ - getGrant: { - (params?: RequestParameters & OauthAuthorizationsGetGrantParams): Promise< - OctokitResponse - >; + createComment: { + ( + params?: RequestParameters & + PullsCreateCommentParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & + PullsCreateCommentParamsDeprecatedInReplyTo + ): Promise>; + ( + params?: RequestParameters & PullsCreateCommentParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. * - * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Comments](https://developer.github.com/v3/issues/comments/#create-a-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. * - * Creates a new authorization for the specified OAuth application, only if an authorization for that application doesn't already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see [Multi-line comment summary](https://developer.github.com/v3/pulls/comments/#multi-line-comment-summary-3). * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. * - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * @deprecated oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * @deprecated pulls.createCommentReply() has been renamed to pulls.createComment() (2019-09-09) */ - getOrCreateAuthorizationForApp: { + createCommentReply: { ( params?: RequestParameters & - OauthAuthorizationsGetOrCreateAuthorizationForAppParams - ): Promise< - OctokitResponse< - OauthAuthorizationsGetOrCreateAuthorizationForAppResponse - > - >; + PullsCreateCommentReplyParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & + PullsCreateCommentReplyParamsDeprecatedInReplyTo + ): Promise>; + ( + params?: RequestParameters & PullsCreateCommentReplyParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + createFromIssue: { + ( + params?: RequestParameters & PullsCreateFromIssueParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. * - * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) endpoint. * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." - * @deprecated oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint + * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. */ - getOrCreateAuthorizationForAppAndFingerprint: { + createReview: { ( params?: RequestParameters & - OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintParams - ): Promise< - OctokitResponse< - OauthAuthorizationsGetOrCreateAuthorizationForAppAndFingerprintResponse - > - >; + PullsCreateReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & PullsCreateReviewParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * **Warning:** Apps must use the [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * This method will create a new authorization for the specified OAuth application, only if an authorization for that application and fingerprint do not already exist for the user. The URL includes the 20 character client ID for the OAuth app that is requesting the token. `fingerprint` is a unique string to distinguish an authorization from others created for the same client ID and user. It returns the user's existing authorization for the application if one is present. Otherwise, it creates and returns a new one. + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." - * @deprecated oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. */ - getOrCreateAuthorizationForAppFingerprint: { + createReviewCommentReply: { ( params?: RequestParameters & - OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintParams + PullsCreateReviewCommentReplyParams ): Promise< - OctokitResponse< - OauthAuthorizationsGetOrCreateAuthorizationForAppFingerprintResponse - > + OctokitResponse >; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * @deprecated oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. */ - listAuthorizations: { + createReviewRequest: { ( - params?: RequestParameters & OauthAuthorizationsListAuthorizationsParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & + PullsCreateReviewRequestParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & PullsCreateReviewRequestParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. - * @deprecated oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants + * Deletes a review comment. */ - listGrants: { + deleteComment: { ( - params?: RequestParameters & OauthAuthorizationsListGrantsParams - ): Promise>; + params?: RequestParameters & PullsDeleteCommentParams + ): Promise; endpoint: EndpointInterface; }; - /** - * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * OAuth applications can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. - * @deprecated apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization - */ - resetAuthorization: { + + deletePendingReview: { ( - params?: RequestParameters & OauthAuthorizationsResetAuthorizationParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & + PullsDeletePendingReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & PullsDeletePendingReviewParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. - * @deprecated apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application - */ - revokeAuthorizationForApplication: { + + deleteReviewRequest: { ( params?: RequestParameters & - OauthAuthorizationsRevokeAuthorizationForApplicationParams + PullsDeleteReviewRequestParamsDeprecatedNumber + ): Promise; + ( + params?: RequestParameters & PullsDeleteReviewRequestParams ): Promise; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will replace and discontinue OAuth endpoints containing `access_token` in the path parameter. We are introducing new endpoints that allow you to securely manage tokens for OAuth Apps by using `access_token` as an input parameter. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://developer.github.com/v3/auth#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid token as `:access_token` and the grant for the token's owner will be deleted. - * - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the Applications settings page under "Authorized OAuth Apps" on GitHub](https://github.com/settings/applications#authorized). - * @deprecated apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application + * **Note:** To dismiss a pull request review on a [protected branch](https://developer.github.com/v3/repos/branches/), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. */ - revokeGrantForApplication: { + dismissReview: { ( params?: RequestParameters & - OauthAuthorizationsRevokeGrantForApplicationParams - ): Promise; + PullsDismissReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & PullsDismissReviewParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://developer.github.com/v3/oauth_authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://developer.github.com/v3/auth/#working-with-two-factor-authentication)." + * Lists details of a pull request by providing its number. * - * You can only send one of these scope keys at a time. - * @deprecated oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization + * When you get, [create](https://developer.github.com/v3/pulls/#create-a-pull-request), or [edit](https://developer.github.com/v3/pulls/#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". + * + * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://help.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://help.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ - updateAuthorization: { + get: { ( - params?: RequestParameters & - OauthAuthorizationsUpdateAuthorizationParams - ): Promise< - OctokitResponse + params?: RequestParameters & PullsGetParamsDeprecatedNumber + ): Promise>; + (params?: RequestParameters & PullsGetParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - }; - orgs: { /** - * Only authenticated organization owners can add a member to the organization or update the member's role. + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. * - * * If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://developer.github.com/v3/orgs/members/#get-organization-membership) will be `pending` until they accept the invitation. + * Provides details for a review comment. * - * * Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent. + * **Multi-line comment summary** * - * **Rate limits** + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. * - * To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period. - */ - addOrUpdateMembership: { - (params?: RequestParameters & OrgsAddOrUpdateMembershipParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - blockUser: { - (params?: RequestParameters & OrgsBlockUserParams): Promise; - - endpoint: EndpointInterface; - }; - /** - * If the user is blocked: + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. * - * If the user is not blocked: - */ - checkBlockedUser: { - (params?: RequestParameters & OrgsCheckBlockedUserParams): Promise< - AnyResponse - >; - - endpoint: EndpointInterface; - }; - /** - * Check if a user is, publicly or privately, a member of the organization. + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * + * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. */ - checkMembership: { - (params?: RequestParameters & OrgsCheckMembershipParams): Promise< - AnyResponse - >; + getComment: { + ( + params?: RequestParameters & PullsGetCommentParams + ): Promise>; endpoint: EndpointInterface; }; - checkPublicMembership: { - (params?: RequestParameters & OrgsCheckPublicMembershipParams): Promise< - AnyResponse - >; + getCommentsForReview: { + ( + params?: RequestParameters & + PullsGetCommentsForReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & + PullsGetCommentsForReviewParams + ): Promise>; endpoint: EndpointInterface; }; - concealMembership: { - (params?: RequestParameters & OrgsConcealMembershipParams): Promise< - AnyResponse - >; - - endpoint: EndpointInterface; - }; - /** - * When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://help.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". - */ - convertMemberToOutsideCollaborator: { + getReview: { ( params?: RequestParameters & - OrgsConvertMemberToOutsideCollaboratorParams - ): Promise< - OctokitResponse + PullsGetReviewParamsDeprecatedNumber + ): Promise>; + (params?: RequestParameters & PullsGetReviewParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Here's how you can create a hook that posts payloads in JSON format: + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - createHook: { - (params?: RequestParameters & OrgsCreateHookParams): Promise< - OctokitResponse + list: { + (params?: RequestParameters & PullsListParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - */ - createInvitation: { - (params?: RequestParameters & OrgsCreateInvitationParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - deleteHook: { - (params?: RequestParameters & OrgsDeleteHookParams): Promise; - - endpoint: EndpointInterface; - }; - /** - * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * Lists review comments for a pull request. By default, review comments are in ascending order by ID. * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://developer.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see "[Response with GitHub plan information](https://developer.github.com/v3/orgs/#response-with-github-plan-information)." - */ - get: { - (params?: RequestParameters & OrgsGetParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - getHook: { - (params?: RequestParameters & OrgsGetHookParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - /** - * In order to get a user's membership with an organization, the authenticated user must be an organization member. + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * + * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. */ - getMembership: { - (params?: RequestParameters & OrgsGetMembershipParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - getMembershipForAuthenticatedUser: { + listComments: { ( - params?: RequestParameters & OrgsGetMembershipForAuthenticatedUserParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & + PullsListCommentsParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & PullsListCommentsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Lists all organizations, in the order that they were created on GitHub. + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. * - * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of organizations. - */ - list: { - (params?: RequestParameters & OrgsListParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - /** - * List the users blocked by an organization. + * Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * + * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. */ - listBlockedUsers: { - (params?: RequestParameters & OrgsListBlockedUsersParams): Promise< - OctokitResponse - >; + listCommentsForRepo: { + ( + params?: RequestParameters & PullsListCommentsForRepoParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List organizations for the authenticated user. - * - * **OAuth scope requirements** - * - * This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope. OAuth requests with insufficient scope receive a `403 Forbidden` response. + * Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository). */ - listForAuthenticatedUser: { + listCommits: { + ( + params?: RequestParameters & + PullsListCommitsParamsDeprecatedNumber + ): Promise>; ( - params?: RequestParameters & OrgsListForAuthenticatedUserParams - ): Promise>; + params?: RequestParameters & PullsListCommitsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List [public organization memberships](https://help.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. - * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List your organizations](https://developer.github.com/v3/orgs/#list-your-organizations) API instead. + * **Note:** The response includes a maximum of 300 files. */ - listForUser: { - (params?: RequestParameters & OrgsListForUserParams): Promise< - OctokitResponse + listFiles: { + ( + params?: RequestParameters & + PullsListFilesParamsDeprecatedNumber + ): Promise>; + (params?: RequestParameters & PullsListFilesParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - listHooks: { - (params?: RequestParameters & OrgsListHooksParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - /** - * Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. - */ - listInstallations: { - (params?: RequestParameters & OrgsListInstallationsParams): Promise< - OctokitResponse - >; + listReviewRequests: { + ( + params?: RequestParameters & + PullsListReviewRequestsParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & PullsListReviewRequestsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. + * The list of reviews returns in chronological order. */ - listInvitationTeams: { - (params?: RequestParameters & OrgsListInvitationTeamsParams): Promise< - OctokitResponse - >; + listReviews: { + ( + params?: RequestParameters & + PullsListReviewsParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & PullsListReviewsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned. + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. */ - listMembers: { - (params?: RequestParameters & OrgsListMembersParams): Promise< - OctokitResponse + merge: { + ( + params?: RequestParameters & + PullsMergeParamsDeprecatedNumber + ): Promise>; + (params?: RequestParameters & PullsMergeParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - listMemberships: { - (params?: RequestParameters & OrgsListMembershipsParams): Promise< - OctokitResponse - >; + submitReview: { + ( + params?: RequestParameters & + PullsSubmitReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & PullsSubmitReviewParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List all users who are outside collaborators of an organization. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. */ - listOutsideCollaborators: { + update: { ( - params?: RequestParameters & OrgsListOutsideCollaboratorsParams - ): Promise>; + params?: RequestParameters & + PullsUpdateParamsDeprecatedNumber + ): Promise>; + (params?: RequestParameters & PullsUpdateParams): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ - listPendingInvitations: { - (params?: RequestParameters & OrgsListPendingInvitationsParams): Promise< - OctokitResponse - >; + updateBranch: { + ( + params?: RequestParameters & PullsUpdateBranchParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Members of an organization can choose to have their membership publicized or not. + * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * + * Enables you to edit a review comment. + * + * **Multi-line comment summary** + * + * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * + * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * + * If you use the `comfort-fade` preview header, your response will show: + * + * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. + * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * + * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * + * * For multi-line comments, the last line of the comment range for the `position` attribute. + * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. */ - listPublicMembers: { - (params?: RequestParameters & OrgsListPublicMembersParams): Promise< - OctokitResponse - >; + updateComment: { + ( + params?: RequestParameters & PullsUpdateCommentParams + ): Promise>; endpoint: EndpointInterface; }; /** - * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. + * Update the review summary comment with new text. */ - pingHook: { - (params?: RequestParameters & OrgsPingHookParams): Promise; + updateReview: { + ( + params?: RequestParameters & + PullsUpdateReviewParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & PullsUpdateReviewParams + ): Promise>; endpoint: EndpointInterface; }; + }; + rateLimit: { /** - * The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * **Note:** Accessing this endpoint does not count against your REST API rate limit. * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * **Understanding your rate limit status** + * + * The Search API has a [custom rate limit](https://developer.github.com/v3/search/#rate-limit), separate from the rate limit governing the rest of the REST API. The GraphQL API also has a [custom rate limit](https://developer.github.com/v4/guides/resource-limitations/#rate-limit) that is separate from and calculated differently than rate limits in the REST API. + * + * For these reasons, the Rate Limit API response categorizes your rate limit. Under `resources`, you'll see four objects: + * + * * The `core` object provides your rate limit status for all non-search-related resources in the REST API. + * * The `search` object provides your rate limit status for the [Search API](https://developer.github.com/v3/search/). + * * The `graphql` object provides your rate limit status for the [GraphQL API](https://developer.github.com/v4/). + * * The `integration_manifest` object provides your rate limit status for the [GitHub App Manifest code conversion](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration) endpoint. + * + * For more information on the headers and values in the rate limit response, see "[Rate limiting](https://developer.github.com/v3/#rate-limiting)." + * + * The `rate` object (shown at the bottom of the response above) is deprecated. + * + * If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. */ - publicizeMembership: { - (params?: RequestParameters & OrgsPublicizeMembershipParams): Promise< - AnyResponse + get: { + (params?: RequestParameters & EmptyParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; + }; + reactions: { /** - * Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. + * Create a reaction to a [commit comment](https://developer.github.com/v3/repos/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this commit comment. */ - removeMember: { - (params?: RequestParameters & OrgsRemoveMemberParams): Promise< - AnyResponse + createForCommitComment: { + ( + params?: RequestParameters & + ReactionsCreateForCommitCommentParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. - * - * If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases. + * Create a reaction to an [issue](https://developer.github.com/v3/issues/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue. */ - removeMembership: { - (params?: RequestParameters & OrgsRemoveMembershipParams): Promise< - AnyResponse - >; + createForIssue: { + ( + params?: RequestParameters & + ReactionsCreateForIssueParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & ReactionsCreateForIssueParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Removing a user from this list will remove them from all the organization's repositories. + * Create a reaction to an [issue comment](https://developer.github.com/v3/issues/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue comment. */ - removeOutsideCollaborator: { + createForIssueComment: { ( - params?: RequestParameters & OrgsRemoveOutsideCollaboratorParams - ): Promise>; - - endpoint: EndpointInterface; - }; - - unblockUser: { - (params?: RequestParameters & OrgsUnblockUserParams): Promise< - AnyResponse + params?: RequestParameters & + ReactionsCreateForIssueCommentParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * **Note:** The new `members_allowed_repository_creation_type` replaces the functionality of `members_can_create_repositories`. - * - * Setting `members_allowed_repository_creation_type` will override the value of `members_can_create_repositories` in the following ways: - * - * * Setting `members_allowed_repository_creation_type` to `all` or `private` sets `members_can_create_repositories` to `true`. - * * Setting `members_allowed_repository_creation_type` to `none` sets `members_can_create_repositories` to `false`. - * * If you omit `members_allowed_repository_creation_type`, `members_can_create_repositories` is not modified. + * Create a reaction to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this pull request review comment. */ - update: { - (params?: RequestParameters & OrgsUpdateParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - updateHook: { - (params?: RequestParameters & OrgsUpdateHookParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - updateMembership: { - (params?: RequestParameters & OrgsUpdateMembershipParams): Promise< - OctokitResponse + createForPullRequestReviewComment: { + ( + params?: RequestParameters & + ReactionsCreateForPullRequestReviewCommentParams + ): Promise< + OctokitResponse< + ReactionsCreateForPullRequestReviewCommentResponse + > >; endpoint: EndpointInterface; }; - }; - projects: { /** - * Adds a collaborator to a an organization project and sets their permission level. You must be an organization owner or a project `admin` to add a collaborator. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion. + * @deprecated reactions.createForTeamDiscussion() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy */ - addCollaborator: { - (params?: RequestParameters & ProjectsAddCollaboratorParams): Promise< - AnyResponse + createForTeamDiscussion: { + ( + params?: RequestParameters & + ReactionsCreateForTeamDiscussionParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion comment`](https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment) endpoint. * - * Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests)" endpoint. + * Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment. + * @deprecated reactions.createForTeamDiscussionComment() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy */ - createCard: { - (params?: RequestParameters & ProjectsCreateCardParams): Promise< - OctokitResponse + createForTeamDiscussionComment: { + ( + params?: RequestParameters & + ReactionsCreateForTeamDiscussionCommentParams + ): Promise< + OctokitResponse< + ReactionsCreateForTeamDiscussionCommentResponse + > >; endpoint: EndpointInterface; }; - - createColumn: { - (params?: RequestParameters & ProjectsCreateColumnParams): Promise< - OctokitResponse + /** + * Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + createForTeamDiscussionCommentInOrg: { + ( + params?: RequestParameters & + ReactionsCreateForTeamDiscussionCommentInOrgParams + ): Promise< + OctokitResponse< + ReactionsCreateForTeamDiscussionCommentInOrgResponse + > >; endpoint: EndpointInterface; }; - - createForAuthenticatedUser: { + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion comment`](https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment) endpoint. + * + * Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment. + * @deprecated reactions.createForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy + */ + createForTeamDiscussionCommentLegacy: { ( - params?: RequestParameters & ProjectsCreateForAuthenticatedUserParams - ): Promise>; + params?: RequestParameters & + ReactionsCreateForTeamDiscussionCommentLegacyParams + ): Promise< + OctokitResponse< + ReactionsCreateForTeamDiscussionCommentLegacyResponse + > + >; endpoint: EndpointInterface; }; /** - * Creates an organization project board. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + * Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ - createForOrg: { - (params?: RequestParameters & ProjectsCreateForOrgParams): Promise< - OctokitResponse + createForTeamDiscussionInOrg: { + ( + params?: RequestParameters & + ReactionsCreateForTeamDiscussionInOrgParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Creates a repository project board. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create reaction for a team discussion`](https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion. + * @deprecated reactions.createForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy */ - createForRepo: { - (params?: RequestParameters & ProjectsCreateForRepoParams): Promise< - OctokitResponse + createForTeamDiscussionLegacy: { + ( + params?: RequestParameters & + ReactionsCreateForTeamDiscussionLegacyParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Deletes a project board. Returns a `404 Not Found` status if projects are disabled. + * OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://developer.github.com/v3/teams/discussions/) or [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). */ delete: { - (params?: RequestParameters & ProjectsDeleteParams): Promise; + ( + params?: RequestParameters & ReactionsDeleteParams + ): Promise; endpoint: EndpointInterface; }; - - deleteCard: { - (params?: RequestParameters & ProjectsDeleteCardParams): Promise< - AnyResponse + /** + * List the reactions to a [commit comment](https://developer.github.com/v3/repos/comments/). + */ + listForCommitComment: { + ( + params?: RequestParameters & + ReactionsListForCommitCommentParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - deleteColumn: { - (params?: RequestParameters & ProjectsDeleteColumnParams): Promise< - AnyResponse - >; + /** + * List the reactions to an [issue](https://developer.github.com/v3/issues/). + */ + listForIssue: { + ( + params?: RequestParameters & + ReactionsListForIssueParamsDeprecatedNumber + ): Promise>; + ( + params?: RequestParameters & ReactionsListForIssueParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Gets a project by its `id`. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + * List the reactions to an [issue comment](https://developer.github.com/v3/issues/comments/). */ - get: { - (params?: RequestParameters & ProjectsGetParams): Promise< - OctokitResponse + listForIssueComment: { + ( + params?: RequestParameters & + ReactionsListForIssueCommentParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - getCard: { - (params?: RequestParameters & ProjectsGetCardParams): Promise< - OctokitResponse + /** + * List the reactions to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). + */ + listForPullRequestReviewComment: { + ( + params?: RequestParameters & + ReactionsListForPullRequestReviewCommentParams + ): Promise< + OctokitResponse< + ReactionsListForPullRequestReviewCommentResponse + > >; endpoint: EndpointInterface; }; - - getColumn: { - (params?: RequestParameters & ProjectsGetColumnParams): Promise< - OctokitResponse + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated reactions.listForTeamDiscussion() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy + */ + listForTeamDiscussion: { + ( + params?: RequestParameters & + ReactionsListForTeamDiscussionParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - listCards: { - (params?: RequestParameters & ProjectsListCardsParams): Promise< - OctokitResponse + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated reactions.listForTeamDiscussionComment() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + listForTeamDiscussionComment: { + ( + params?: RequestParameters & + ReactionsListForTeamDiscussionCommentParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Lists the collaborators for an organization project. For a project, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. You must be an organization owner or a project `admin` to list collaborators. + * List the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ - listCollaborators: { - (params?: RequestParameters & ProjectsListCollaboratorsParams): Promise< - OctokitResponse + listForTeamDiscussionCommentInOrg: { + ( + params?: RequestParameters & + ReactionsListForTeamDiscussionCommentInOrgParams + ): Promise< + OctokitResponse< + ReactionsListForTeamDiscussionCommentInOrgResponse + > >; endpoint: EndpointInterface; }; - - listColumns: { - (params?: RequestParameters & ProjectsListColumnsParams): Promise< - OctokitResponse + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment) endpoint. + * + * List the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated reactions.listForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy + */ + listForTeamDiscussionCommentLegacy: { + ( + params?: RequestParameters & + ReactionsListForTeamDiscussionCommentLegacyParams + ): Promise< + OctokitResponse< + ReactionsListForTeamDiscussionCommentLegacyResponse + > >; endpoint: EndpointInterface; }; /** - * Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + * List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * s + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ - listForOrg: { - (params?: RequestParameters & ProjectsListForOrgParams): Promise< - OctokitResponse + listForTeamDiscussionInOrg: { + ( + params?: RequestParameters & + ReactionsListForTeamDiscussionInOrgParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated reactions.listForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy */ - listForRepo: { - (params?: RequestParameters & ProjectsListForRepoParams): Promise< - OctokitResponse + listForTeamDiscussionLegacy: { + ( + params?: RequestParameters & + ReactionsListForTeamDiscussionLegacyParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - listForUser: { - (params?: RequestParameters & ProjectsListForUserParams): Promise< - OctokitResponse - >; + }; + repos: { + acceptInvitation: { + ( + params?: RequestParameters & ReposAcceptInvitationParams + ): Promise; endpoint: EndpointInterface; }; - - moveCard: { - (params?: RequestParameters & ProjectsMoveCardParams): Promise< - AnyResponse - >; + /** + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * + * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://developer.github.com/v3/repos/invitations/). + * + * **Rate limits** + * + * To prevent abuse, you are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. + */ + addCollaborator: { + ( + params?: RequestParameters & ReposAddCollaboratorParams + ): Promise>; endpoint: EndpointInterface; }; + /** + * Here's how you can create a read-only deploy key: + */ + addDeployKey: { + ( + params?: RequestParameters & ReposAddDeployKeyParams + ): Promise>; - moveColumn: { - (params?: RequestParameters & ProjectsMoveColumnParams): Promise< - AnyResponse + endpoint: EndpointInterface; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + */ + addProtectedBranchAdminEnforcement: { + ( + params?: RequestParameters & + ReposAddProtectedBranchAdminEnforcementParams + ): Promise< + OctokitResponse< + ReposAddProtectedBranchAdminEnforcementResponse + > >; endpoint: EndpointInterface; }; /** - * Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ - removeCollaborator: { - (params?: RequestParameters & ProjectsRemoveCollaboratorParams): Promise< - AnyResponse + addProtectedBranchAppRestrictions: { + ( + params?: RequestParameters & + ReposAddProtectedBranchAppRestrictionsParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. */ - reviewUserPermissionLevel: { + addProtectedBranchRequiredSignatures: { ( - params?: RequestParameters & ProjectsReviewUserPermissionLevelParams - ): Promise>; + params?: RequestParameters & + ReposAddProtectedBranchRequiredSignaturesParams + ): Promise< + OctokitResponse< + ReposAddProtectedBranchRequiredSignaturesResponse + > + >; endpoint: EndpointInterface; }; /** - * Updates a project board's information. Returns a `404 Not Found` status if projects are disabled. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - update: { - (params?: RequestParameters & ProjectsUpdateParams): Promise< - OctokitResponse + addProtectedBranchRequiredStatusChecksContexts: { + ( + params?: RequestParameters & + ReposAddProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + OctokitResponse< + ReposAddProtectedBranchRequiredStatusChecksContextsResponse + > >; endpoint: EndpointInterface; }; - - updateCard: { - (params?: RequestParameters & ProjectsUpdateCardParams): Promise< - OctokitResponse + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified teams push access for this branch. You can also give push access to child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + addProtectedBranchTeamRestrictions: { + ( + params?: RequestParameters & + ReposAddProtectedBranchTeamRestrictionsParams + ): Promise< + OctokitResponse< + ReposAddProtectedBranchTeamRestrictionsResponse + > >; endpoint: EndpointInterface; }; - - updateColumn: { - (params?: RequestParameters & ProjectsUpdateColumnParams): Promise< - OctokitResponse + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified people push access for this branch. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + addProtectedBranchUserRestrictions: { + ( + params?: RequestParameters & + ReposAddProtectedBranchUserRestrictionsParams + ): Promise< + OctokitResponse< + ReposAddProtectedBranchUserRestrictionsResponse + > >; endpoint: EndpointInterface; }; - }; - pulls: { - checkIfMerged: { + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + */ + checkCollaborator: { ( - params?: RequestParameters & PullsCheckIfMergedParamsDeprecatedNumber + params?: RequestParameters & ReposCheckCollaboratorParams ): Promise; - (params?: RequestParameters & PullsCheckIfMergedParams): Promise< - AnyResponse - >; endpoint: EndpointInterface; }; /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * Shows whether vulnerability alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. */ - create: { - (params?: RequestParameters & PullsCreateParams): Promise< - OctokitResponse - >; + checkVulnerabilityAlerts: { + ( + params?: RequestParameters & + ReposCheckVulnerabilityAlertsParams + ): Promise; endpoint: EndpointInterface; }; /** - * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. - * - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Comments](https://developer.github.com/v3/issues/comments/#create-a-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see [Multi-line comment summary](https://developer.github.com/v3/pulls/comments/#multi-line-comment-summary-3). + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. * - * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * **Working with large comparisons** * - * **Multi-line comment summary** + * The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository) to enumerate all commits in the range. * - * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long to generate. You can typically resolve this error by using a smaller commit range. * - * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * **Signature verification object** * - * If you use the `comfort-fade` preview header, your response will show: + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: * - * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. - * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * These are the possible values for `reason` in the `verification` object: * - * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + compareCommits: { + ( + params?: RequestParameters & ReposCompareCommitsParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Create a comment for a commit using its `:commit_sha`. * - * * For multi-line comments, the last line of the comment range for the `position` attribute. - * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. */ - createComment: { + createCommitComment: { ( - params?: RequestParameters & PullsCreateCommentParamsDeprecatedNumber - ): Promise>; + params?: RequestParameters & + ReposCreateCommitCommentParamsDeprecatedSha + ): Promise>; ( - params?: RequestParameters & PullsCreateCommentParamsDeprecatedInReplyTo - ): Promise>; - (params?: RequestParameters & PullsCreateCommentParams): Promise< - OctokitResponse - >; + params?: RequestParameters & + ReposCreateCommitCommentParamsDeprecatedLine + ): Promise>; + ( + params?: RequestParameters & ReposCreateCommitCommentParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. + * Deployments offer a few configurable parameters with sane defaults. * - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Comments](https://developer.github.com/v3/issues/comments/#create-a-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them before we merge a pull request. * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. For more information, see [Multi-line comment summary](https://developer.github.com/v3/pulls/comments/#multi-line-comment-summary-3). + * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter makes it easier to track which environments have requested deployments. The default environment is `production`. * - * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will return a failure response. * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * By default, [commit statuses](https://developer.github.com/v3/repos/statuses) for every submitted context must be in a `success` state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do not require any contexts or create any commit statuses, the deployment will always succeed. * - * **Multi-line comment summary** + * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text field that will be passed on when a deployment event is dispatched. * - * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. + * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an application with debugging enabled. * - * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref: * - * If you use the `comfort-fade` preview header, your response will show: + * A simple example putting the user and room into the payload to notify back to chat networks. * - * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. - * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * A more advanced example specifying required commit statuses and bypassing auto-merging. * - * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating a deployment. This auto-merge happens when: * - * * For multi-line comments, the last line of the comment range for the `position` attribute. - * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. - * @deprecated pulls.createCommentReply() has been renamed to pulls.createComment() (2019-09-09) + * * Auto-merge option is enabled in the repository + * * Topic branch does not include the latest changes on the base branch, which is `master`in the response example + * * There are no merge conflicts + * + * If there are no new commits in the base branch, a new request to create a deployment should give a successful response. + * + * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * + * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. */ - createCommentReply: { - ( - params?: RequestParameters & - PullsCreateCommentReplyParamsDeprecatedNumber - ): Promise>; + createDeployment: { ( - params?: RequestParameters & - PullsCreateCommentReplyParamsDeprecatedInReplyTo - ): Promise>; - (params?: RequestParameters & PullsCreateCommentReplyParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposCreateDeploymentParams + ): Promise>; endpoint: EndpointInterface; }; - - createFromIssue: { - (params?: RequestParameters & PullsCreateFromIssueParams): Promise< - OctokitResponse - >; + /** + * Users with `push` access can create deployment statuses for a given deployment. + * + * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. + */ + createDeploymentStatus: { + ( + params?: RequestParameters & + ReposCreateDeploymentStatusParams + ): Promise>; endpoint: EndpointInterface; }; /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://developer.github.com/v3/activity/events/types/#repositorydispatchevent)." * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://developer.github.com/v3/pulls/#get-a-single-pull-request) endpoint. + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. For a test example, see the [input example](https://developer.github.com/v3/repos/#example-4). * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * To give you write access to the repository, you must use a personal access token with the `repo` scope. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. */ - createReview: { + createDispatchEvent: { ( - params?: RequestParameters & PullsCreateReviewParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsCreateReviewParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposCreateDispatchEventParams + ): Promise; endpoint: EndpointInterface; }; /** - * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * Creates a new file or updates an existing file in a repository. + * @deprecated repos.createFile() has been renamed to repos.createOrUpdateFile() (2019-06-07) */ - createReviewCommentReply: { + createFile: { ( - params?: RequestParameters & PullsCreateReviewCommentReplyParams - ): Promise>; + params?: RequestParameters & ReposCreateFileParams + ): Promise>; endpoint: EndpointInterface; }; /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository + * * `repo` scope to create a private repository */ - createReviewRequest: { + createForAuthenticatedUser: { ( params?: RequestParameters & - PullsCreateReviewRequestParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsCreateReviewRequestParams): Promise< - OctokitResponse + ReposCreateForAuthenticatedUserParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Deletes a review comment. + * Create a fork for the authenticated user. + * + * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://github.com/contact) or [GitHub Premium Support](https://premium.githubsupport.com). */ - deleteComment: { - (params?: RequestParameters & PullsDeleteCommentParams): Promise< - AnyResponse - >; + createFork: { + ( + params?: RequestParameters & ReposCreateForkParams + ): Promise>; endpoint: EndpointInterface; }; - - deletePendingReview: { + /** + * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can share the same `config` as long as those webhooks do not have any `events` that overlap. + * + * Here's how you can create a hook that posts payloads in JSON format: + */ + createHook: { ( - params?: RequestParameters & - PullsDeletePendingReviewParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsDeletePendingReviewParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposCreateHookParams + ): Promise>; endpoint: EndpointInterface; }; - - deleteReviewRequest: { + /** + * Creates a new repository for the authenticated user. + * + * **OAuth scope requirements** + * + * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository + * * `repo` scope to create a private repository + */ + createInOrg: { ( - params?: RequestParameters & - PullsDeleteReviewRequestParamsDeprecatedNumber - ): Promise; - (params?: RequestParameters & PullsDeleteReviewRequestParams): Promise< - AnyResponse - >; + params?: RequestParameters & ReposCreateInOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Note:** To dismiss a pull request review on a [protected branch](https://developer.github.com/v3/repos/branches/), you must be a repository administrator or be included in the list of people or teams who can dismiss pull request reviews. + * Creates a new file or updates an existing file in a repository. */ - dismissReview: { + createOrUpdateFile: { ( - params?: RequestParameters & PullsDismissReviewParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsDismissReviewParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposCreateOrUpdateFileParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + */ + createRelease: { + ( + params?: RequestParameters & ReposCreateReleaseParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://developer.github.com/v3/pulls/#create-a-pull-request), or [edit](https://developer.github.com/v3/pulls/#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://developer.github.com/v3/git/#checking-mergeability-of-pull-requests)". - * - * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. - * - * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: - * - * * If merged as a [merge commit](https://help.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. - * * If merged via a [squash](https://help.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. - * * If [rebased](https://help.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * Users with push access in a repository can create commit statuses for a given SHA. * - * Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. */ - get: { - (params?: RequestParameters & PullsGetParamsDeprecatedNumber): Promise< - OctokitResponse - >; - (params?: RequestParameters & PullsGetParams): Promise< - OctokitResponse - >; + createStatus: { + ( + params?: RequestParameters & ReposCreateStatusParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. - * - * Provides details for a review comment. - * - * **Multi-line comment summary** - * - * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. - * - * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. - * - * If you use the `comfort-fade` preview header, your response will show: + * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [`GET /repos/:owner/:repo`](https://developer.github.com/v3/repos/#get) endpoint and check that the `is_template` key is `true`. * - * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. - * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * **OAuth scope requirements** * - * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * - * * For multi-line comments, the last line of the comment range for the `position` attribute. - * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * * `public_repo` scope or `repo` scope to create a public repository + * * `repo` scope to create a private repository * - * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. + * \` */ - getComment: { - (params?: RequestParameters & PullsGetCommentParams): Promise< - OctokitResponse - >; + createUsingTemplate: { + ( + params?: RequestParameters & ReposCreateUsingTemplateParams + ): Promise>; endpoint: EndpointInterface; }; - getCommentsForReview: { + declineInvitation: { ( - params?: RequestParameters & - PullsGetCommentsForReviewParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsGetCommentsForReviewParams): Promise< - OctokitResponse + params?: RequestParameters & ReposDeclineInvitationParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + * + * If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: + */ + delete: { + (params?: RequestParameters & ReposDeleteParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - getReview: { + deleteCommitComment: { ( - params?: RequestParameters & PullsGetReviewParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsGetReviewParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposDeleteCommitCommentParams + ): Promise; endpoint: EndpointInterface; }; - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - list: { - (params?: RequestParameters & PullsListParams): Promise< - OctokitResponse - >; + + deleteDownload: { + ( + params?: RequestParameters & ReposDeleteDownloadParams + ): Promise; endpoint: EndpointInterface; }; /** - * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. - * - * Lists review comments for a pull request. By default, review comments are in ascending order by ID. - * - * **Multi-line comment summary** - * - * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. - * - * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. - * - * If you use the `comfort-fade` preview header, your response will show: - * - * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. - * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. + * Deletes a file in a repository. * - * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: + * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. * - * * For multi-line comments, the last line of the comment range for the `position` attribute. - * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. * - * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. + * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. */ - listComments: { + deleteFile: { ( - params?: RequestParameters & PullsListCommentsParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsListCommentsParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposDeleteFileParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. - * - * Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. - * - * **Multi-line comment summary** - * - * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. - * - * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. - * - * If you use the `comfort-fade` preview header, your response will show: - * - * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. - * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. - * - * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: - * - * * For multi-line comments, the last line of the comment range for the `position` attribute. - * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. - * - * The `reactions` key will have the following payload where `url` can be used to construct the API location for [listing and creating](https://developer.github.com/v3/reactions) reactions. - */ - listCommentsForRepo: { - (params?: RequestParameters & PullsListCommentsForRepoParams): Promise< - OctokitResponse - >; + + deleteHook: { + ( + params?: RequestParameters & ReposDeleteHookParams + ): Promise; + + endpoint: EndpointInterface; + }; + + deleteInvitation: { + ( + params?: RequestParameters & ReposDeleteInvitationParams + ): Promise; endpoint: EndpointInterface; }; /** - * Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository). + * Users with push access to the repository can delete a release. */ - listCommits: { + deleteRelease: { ( - params?: RequestParameters & PullsListCommitsParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsListCommitsParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposDeleteReleaseParams + ): Promise; + + endpoint: EndpointInterface; + }; + + deleteReleaseAsset: { + ( + params?: RequestParameters & ReposDeleteReleaseAssetParams + ): Promise; endpoint: EndpointInterface; }; /** - * **Note:** The response includes a maximum of 300 files. + * Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. */ - listFiles: { + disableAutomatedSecurityFixes: { ( - params?: RequestParameters & PullsListFilesParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsListFilesParams): Promise< - OctokitResponse - >; + params?: RequestParameters & + ReposDisableAutomatedSecurityFixesParams + ): Promise; endpoint: EndpointInterface; }; - listReviewRequests: { + disablePagesSite: { ( - params?: RequestParameters & - PullsListReviewRequestsParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsListReviewRequestsParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposDisablePagesSiteParams + ): Promise; endpoint: EndpointInterface; }; /** - * The list of reviews returns in chronological order. + * Disables vulnerability alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. */ - listReviews: { + disableVulnerabilityAlerts: { ( - params?: RequestParameters & PullsListReviewsParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsListReviewsParams): Promise< - OctokitResponse - >; + params?: RequestParameters & + ReposDisableVulnerabilityAlertsParams + ): Promise; endpoint: EndpointInterface; }; /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. */ - merge: { - (params?: RequestParameters & PullsMergeParamsDeprecatedNumber): Promise< - OctokitResponse - >; - (params?: RequestParameters & PullsMergeParams): Promise< - OctokitResponse - >; + enableAutomatedSecurityFixes: { + ( + params?: RequestParameters & + ReposEnableAutomatedSecurityFixesParams + ): Promise; endpoint: EndpointInterface; }; - submitReview: { + enablePagesSite: { ( - params?: RequestParameters & PullsSubmitReviewParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsSubmitReviewParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposEnablePagesSiteParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Pro, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. + * Enables vulnerability alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. */ - update: { - (params?: RequestParameters & PullsUpdateParamsDeprecatedNumber): Promise< - OctokitResponse - >; - (params?: RequestParameters & PullsUpdateParams): Promise< - OctokitResponse - >; + enableVulnerabilityAlerts: { + ( + params?: RequestParameters & + ReposEnableVulnerabilityAlertsParams + ): Promise; endpoint: EndpointInterface; }; /** - * Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. + * The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ - updateBranch: { - (params?: RequestParameters & PullsUpdateBranchParams): Promise< - OctokitResponse + get: { + (params?: RequestParameters & ReposGetParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * **Note:** Multi-line comments on pull requests are currently in public beta and subject to change. - * - * Enables you to edit a review comment. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * **Multi-line comment summary** - * - * **Note:** New parameters and response fields are available for developers to preview. During the preview period, these response fields may change without advance notice. Please see the [blog post](https://developer.github.com/changes/2019-10-03-multi-line-comments) for full details. - * - * Use the `comfort-fade` preview header and the `line` parameter to show multi-line comment-supported fields in the response. - * - * If you use the `comfort-fade` preview header, your response will show: - * - * * For multi-line comments, values for `start_line`, `original_start_line`, `start_side`, `line`, `original_line`, and `side`. - * * For single-line comments, values for `line`, `original_line`, and `side` and a `null` value for `start_line`, `original_start_line`, and `start_side`. - * - * If you don't use the `comfort-fade` preview header, multi-line and single-line comments will appear the same way in the response with a single `position` attribute. Your response will show: - * - * * For multi-line comments, the last line of the comment range for the `position` attribute. - * * For single-line comments, the diff-positioned way of referencing comments for the `position` attribute. For more information, see `position` in the [input parameters](https://developer.github.com/v3/pulls/comments/#parameters-2) table. + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. */ - updateComment: { - (params?: RequestParameters & PullsUpdateCommentParams): Promise< - OctokitResponse + getAppsWithAccessToProtectedBranch: { + ( + params?: RequestParameters & + ReposGetAppsWithAccessToProtectedBranchParams + ): Promise< + OctokitResponse< + ReposGetAppsWithAccessToProtectedBranchResponse + > >; endpoint: EndpointInterface; }; /** - * Update the review summary comment with new text. + * Gets a redirect URL to download an archive for a repository. The `:archive_format` can be either `tarball` or `zipball`. The `:ref` must be a valid Git reference. If you omit `:ref`, the repository’s default branch (usually `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use the `Location` header to make a second `GET` request. + * + * _Note_: For private repositories, these links are temporary and expire after five minutes. + * + * To follow redirects with curl, use the `-L` switch: */ - updateReview: { + getArchiveLink: { ( - params?: RequestParameters & PullsUpdateReviewParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & PullsUpdateReviewParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposGetArchiveLinkParams + ): Promise; endpoint: EndpointInterface; }; - }; - rateLimit: { - /** - * **Note:** Accessing this endpoint does not count against your REST API rate limit. - * - * **Understanding your rate limit status** - * - * The Search API has a [custom rate limit](https://developer.github.com/v3/search/#rate-limit), separate from the rate limit governing the rest of the REST API. The GraphQL API also has a [custom rate limit](https://developer.github.com/v4/guides/resource-limitations/#rate-limit) that is separate from and calculated differently than rate limits in the REST API. - * - * For these reasons, the Rate Limit API response categorizes your rate limit. Under `resources`, you'll see four objects: - * - * * The `core` object provides your rate limit status for all non-search-related resources in the REST API. - * * The `search` object provides your rate limit status for the [Search API](https://developer.github.com/v3/search/). - * * The `graphql` object provides your rate limit status for the [GraphQL API](https://developer.github.com/v4/). - * * The `integration_manifest` object provides your rate limit status for the [GitHub App Manifest code conversion](https://developer.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration) endpoint. - * - * For more information on the headers and values in the rate limit response, see "[Rate limiting](https://developer.github.com/v3/#rate-limiting)." - * - * The `rate` object (shown at the bottom of the response above) is deprecated. - * - * If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object. - */ - get: { - (params?: RequestParameters & EmptyParams): Promise< - OctokitResponse + + getBranch: { + (params?: RequestParameters & ReposGetBranchParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - }; - reactions: { /** - * Create a reaction to a [commit comment](https://developer.github.com/v3/repos/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this commit comment. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - createForCommitComment: { + getBranchProtection: { ( - params?: RequestParameters & ReactionsCreateForCommitCommentParams - ): Promise>; + params?: RequestParameters & ReposGetBranchProtectionParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Create a reaction to an [issue](https://developer.github.com/v3/issues/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue. + * Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - createForIssue: { - ( - params?: RequestParameters & - ReactionsCreateForIssueParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & ReactionsCreateForIssueParams): Promise< - OctokitResponse + getClones: { + (params?: RequestParameters & ReposGetClonesParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Create a reaction to an [issue comment](https://developer.github.com/v3/issues/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this issue comment. + * Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - createForIssueComment: { + getCodeFrequencyStats: { ( - params?: RequestParameters & ReactionsCreateForIssueCommentParams - ): Promise>; + params?: RequestParameters & + ReposGetCodeFrequencyStatsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Create a reaction to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). A response with a `Status: 200 OK` means that you already added the reaction type to this pull request review comment. + * Possible values for the `permission` key: `admin`, `write`, `read`, `none`. */ - createForPullRequestReviewComment: { + getCollaboratorPermissionLevel: { ( params?: RequestParameters & - ReactionsCreateForPullRequestReviewCommentParams + ReposGetCollaboratorPermissionLevelParams ): Promise< - OctokitResponse + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Create a reaction to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion. + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * The most recent status for each context is returned, up to 100. This field [paginates](https://developer.github.com/v3/#pagination) if there are over 100 contexts. + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` */ - createForTeamDiscussion: { + getCombinedStatusForRef: { ( - params?: RequestParameters & ReactionsCreateForTeamDiscussionParams - ): Promise>; + params?: RequestParameters & + ReposGetCombinedStatusForRefParams + ): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * Create a reaction to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with a `Status: 200 OK` means that you already added the reaction type to this team discussion comment. + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * You can pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. + * + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | */ - createForTeamDiscussionComment: { + getCommit: { ( params?: RequestParameters & - ReactionsCreateForTeamDiscussionCommentParams - ): Promise< - OctokitResponse + ReposGetCommitParamsDeprecatedSha + ): Promise>; + ( + params?: RequestParameters & + ReposGetCommitParamsDeprecatedCommitSha + ): Promise>; + (params?: RequestParameters & ReposGetCommitParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://developer.github.com/v3/teams/discussions/) or [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). + * Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ - delete: { - (params?: RequestParameters & ReactionsDeleteParams): Promise< - AnyResponse - >; + getCommitActivityStats: { + ( + params?: RequestParameters & + ReposGetCommitActivityStatsParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * List the reactions to a [commit comment](https://developer.github.com/v3/repos/comments/). - */ - listForCommitComment: { + + getCommitComment: { ( - params?: RequestParameters & ReactionsListForCommitCommentParams - ): Promise>; + params?: RequestParameters & ReposGetCommitCommentParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List the reactions to an [issue](https://developer.github.com/v3/issues/). + * **Note:** To access this endpoint, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header: + * ``` + * application/vnd.github.VERSION.sha + * ``` + * Returns the SHA-1 of the commit reference. You must have `read` access for the repository to get the SHA-1 of a commit reference. You can use this endpoint to check if a remote reference's SHA-1 is the same as your local reference's SHA-1 by providing the local SHA-1 reference as the ETag. + * @deprecated "Get the SHA-1 of a commit reference" will be removed. Use "Get a single commit" instead with media type format set to "sha" instead. */ - listForIssue: { + getCommitRefSha: { ( - params?: RequestParameters & ReactionsListForIssueParamsDeprecatedNumber - ): Promise>; - (params?: RequestParameters & ReactionsListForIssueParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposGetCommitRefShaParams + ): Promise; endpoint: EndpointInterface; }; /** - * List the reactions to an [issue comment](https://developer.github.com/v3/issues/comments/). + * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit `:path`, you will receive the contents of all files in the repository. + * + * Files and symlinks support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML (when supported). All content types support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) to ensure the content is returned in a consistent object format. + * + * **Note**: + * + * * To get a repository's contents recursively, you can [recursively get the tree](https://developer.github.com/v3/git/trees/). + * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees API](https://developer.github.com/v3/git/trees/#get-a-tree). + * * This API supports files up to 1 megabyte in size. + * + * The response will be an array of objects, one object for each item in the directory. + * + * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). In the next major version of the API, the type will be returned as "submodule". + * + * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the API responds with the content of the file (in the [format shown above](https://developer.github.com/v3/repos/contents/#response-if-content-is-a-file)). + * + * Otherwise, the API responds with an object describing the symlink itself: + * + * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. + * + * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values. */ - listForIssueComment: { + getContents: { ( - params?: RequestParameters & ReactionsListForIssueCommentParams - ): Promise>; + params?: RequestParameters & ReposGetContentsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List the reactions to a [pull request review comment](https://developer.github.com/v3/pulls/comments/). + * * `total` - The Total number of commits authored by the contributor. + * + * Weekly Hash (`weeks` array): + * + * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). + * * `a` - Number of additions + * * `d` - Number of deletions + * * `c` - Number of commits */ - listForPullRequestReviewComment: { + getContributorsStats: { ( params?: RequestParameters & - ReactionsListForPullRequestReviewCommentParams - ): Promise< - OctokitResponse - >; + ReposGetContributorsStatsParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * List the reactions to a [team discussion](https://developer.github.com/v3/teams/discussions/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - listForTeamDiscussion: { + + getDeployKey: { + ( + params?: RequestParameters & ReposGetDeployKeyParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + getDeployment: { ( - params?: RequestParameters & ReactionsListForTeamDiscussionParams - ): Promise>; + params?: RequestParameters & ReposGetDeploymentParams + ): Promise>; endpoint: EndpointInterface; }; /** - * List the reactions to a [team discussion comment](https://developer.github.com/v3/teams/discussion_comments/). OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * Users with pull access can view a deployment status for a deployment: */ - listForTeamDiscussionComment: { + getDeploymentStatus: { ( - params?: RequestParameters & ReactionsListForTeamDiscussionCommentParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposGetDeploymentStatusParams + ): Promise>; endpoint: EndpointInterface; }; - }; - repos: { - acceptInvitation: { - (params?: RequestParameters & ReposAcceptInvitationParams): Promise< - AnyResponse - >; + + getDownload: { + ( + params?: RequestParameters & ReposGetDownloadParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - * - * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://developer.github.com/v3/repos/invitations/). - * - * **Rate limits** - * - * To prevent abuse, you are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. - */ - addCollaborator: { - (params?: RequestParameters & ReposAddCollaboratorParams): Promise< - OctokitResponse + + getHook: { + (params?: RequestParameters & ReposGetHookParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - /** - * Here's how you can create a read-only deploy key: - */ - addDeployKey: { - (params?: RequestParameters & ReposAddDeployKeyParams): Promise< - OctokitResponse - >; + + getLatestPagesBuild: { + ( + params?: RequestParameters & ReposGetLatestPagesBuildParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * View the latest published full release for the repository. * - * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. */ - addProtectedBranchAdminEnforcement: { + getLatestRelease: { ( - params?: RequestParameters & - ReposAddProtectedBranchAdminEnforcementParams - ): Promise< - OctokitResponse + params?: RequestParameters & ReposGetLatestReleaseParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + getPages: { + (params?: RequestParameters & ReposGetPagesParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - addProtectedBranchAppRestrictions: { + + getPagesBuild: { ( - params?: RequestParameters & - ReposAddProtectedBranchAppRestrictionsParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposGetPagesBuildParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + * The array order is oldest week (index 0) to most recent week. */ - addProtectedBranchRequiredSignatures: { + getParticipationStats: { ( params?: RequestParameters & - ReposAddProtectedBranchRequiredSignaturesParams - ): Promise< - OctokitResponse - >; + ReposGetParticipationStatsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - addProtectedBranchRequiredStatusChecksContexts: { + getProtectedBranchAdminEnforcement: { ( params?: RequestParameters & - ReposAddProtectedBranchRequiredStatusChecksContextsParams + ReposGetProtectedBranchAdminEnforcementParams ): Promise< OctokitResponse< - ReposAddProtectedBranchRequiredStatusChecksContextsResponse + ReposGetProtectedBranchAdminEnforcementResponse > >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Grants the specified teams push access for this branch. If you pass the `hellcat-preview` media type, you can also give push access to child teams. - * - * | Type | Description | - * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - addProtectedBranchTeamRestrictions: { + getProtectedBranchPullRequestReviewEnforcement: { ( params?: RequestParameters & - ReposAddProtectedBranchTeamRestrictionsParams + ReposGetProtectedBranchPullRequestReviewEnforcementParams ): Promise< - OctokitResponse + OctokitResponse< + ReposGetProtectedBranchPullRequestReviewEnforcementResponse + > >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * Grants the specified people push access for this branch. + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://help.github.com/articles/signing-commits-with-gpg) in GitHub Help. * - * | Type | Description | - * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + * **Note**: You must enable branch protection to require signed commits. */ - addProtectedBranchUserRestrictions: { + getProtectedBranchRequiredSignatures: { ( params?: RequestParameters & - ReposAddProtectedBranchUserRestrictionsParams + ReposGetProtectedBranchRequiredSignaturesParams ): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * If you pass the `hellcat-preview` media type, team members will include the members of child teams. - */ - checkCollaborator: { - (params?: RequestParameters & ReposCheckCollaboratorParams): Promise< - AnyResponse + OctokitResponse< + ReposGetProtectedBranchRequiredSignaturesResponse + > >; endpoint: EndpointInterface; }; /** - * Shows whether vulnerability alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - checkVulnerabilityAlerts: { + getProtectedBranchRequiredStatusChecks: { ( - params?: RequestParameters & ReposCheckVulnerabilityAlertsParams - ): Promise; - - endpoint: EndpointInterface; - }; - /** - * Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `:branch`. - * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - * - * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. - * - * **Working with large comparisons** - * - * The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [Commit List API](https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository) to enumerate all commits in the range. - * - * For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long to generate. You can typically resolve this error by using a smaller commit range. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - compareCommits: { - (params?: RequestParameters & ReposCompareCommitsParams): Promise< - OctokitResponse + params?: RequestParameters & + ReposGetProtectedBranchRequiredStatusChecksParams + ): Promise< + OctokitResponse< + ReposGetProtectedBranchRequiredStatusChecksResponse + > >; endpoint: EndpointInterface; }; /** - * Create a comment for a commit using its `:commit_sha`. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * Lists who has access to this protected branch. {{#note}} + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. */ - createCommitComment: { - ( - params?: RequestParameters & ReposCreateCommitCommentParamsDeprecatedSha - ): Promise>; + getProtectedBranchRestrictions: { ( params?: RequestParameters & - ReposCreateCommitCommentParamsDeprecatedLine - ): Promise>; - (params?: RequestParameters & ReposCreateCommitCommentParams): Promise< - OctokitResponse + ReposGetProtectedBranchRestrictionsParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Deployments offer a few configurable parameters with sane defaults. - * - * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them before we merge a pull request. - * - * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter makes it easier to track which environments have requested deployments. The default environment is `production`. - * - * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will return a failure response. - * - * By default, [commit statuses](https://developer.github.com/v3/repos/statuses) for every submitted context must be in a `success` state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do not require any contexts or create any commit statuses, the deployment will always succeed. - * - * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text field that will be passed on when a deployment event is dispatched. - * - * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an application with debugging enabled. - * - * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref: - * - * A simple example putting the user and room into the payload to notify back to chat networks. - * - * A more advanced example specifying required commit statuses and bypassing auto-merging. - * - * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating a deployment. This auto-merge happens when: - * - * * Auto-merge option is enabled in the repository - * * Topic branch does not include the latest changes on the base branch, which is `master`in the response example - * * There are no merge conflicts - * - * If there are no new commits in the base branch, a new request to create a deployment should give a successful response. - * - * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + * Each array contains the day number, hour number, and number of commits: * - * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. - */ - createDeployment: { - (params?: RequestParameters & ReposCreateDeploymentParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - /** - * Users with `push` access can create deployment statuses for a given deployment. + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits * - * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. + * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. */ - createDeploymentStatus: { - (params?: RequestParameters & ReposCreateDeploymentStatusParams): Promise< - OctokitResponse - >; + getPunchCardStats: { + ( + params?: RequestParameters & ReposGetPunchCardStatsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://developer.github.com/v3/activity/events/types/#repositorydispatchevent)." - * - * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. For a test example, see the [input example](https://developer.github.com/v3/repos/#example-4). - * - * To give you write access to the repository, you must use a personal access token with the `repo` scope. For more information, see "[Creating a personal access token for the command line](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * Gets the preferred README for a repository. * - * This input example shows how you can use the `client_payload` as a test to debug your workflow. + * READMEs support [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML. */ - createDispatchEvent: { - (params?: RequestParameters & ReposCreateDispatchEventParams): Promise< - AnyResponse + getReadme: { + (params?: RequestParameters & ReposGetReadmeParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Creates a new file or updates an existing file in a repository. - * @deprecated repos.createFile() has been renamed to repos.createOrUpdateFile() (2019-06-07) + * **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/v3/#hypermedia). */ - createFile: { - (params?: RequestParameters & ReposCreateFileParams): Promise< - OctokitResponse - >; + getRelease: { + ( + params?: RequestParameters & ReposGetReleaseParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Creates a new repository for the authenticated user. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository - * * `repo` scope to create a private repository + * To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://developer.github.com/v3/media/#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ - createForAuthenticatedUser: { + getReleaseAsset: { ( - params?: RequestParameters & ReposCreateForAuthenticatedUserParams - ): Promise>; + params?: RequestParameters & ReposGetReleaseAssetParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Create a fork for the authenticated user. - * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://github.com/contact). + * Get a published release with the specified tag. */ - createFork: { - (params?: RequestParameters & ReposCreateForkParams): Promise< - OctokitResponse - >; + getReleaseByTag: { + ( + params?: RequestParameters & ReposGetReleaseByTagParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can share the same `config` as long as those webhooks do not have any `events` that overlap. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * Here's how you can create a hook that posts payloads in JSON format: + * Lists the teams who have push access to this branch. The list includes child teams. */ - createHook: { - (params?: RequestParameters & ReposCreateHookParams): Promise< - OctokitResponse + getTeamsWithAccessToProtectedBranch: { + ( + params?: RequestParameters & + ReposGetTeamsWithAccessToProtectedBranchParams + ): Promise< + OctokitResponse< + ReposGetTeamsWithAccessToProtectedBranchResponse + > >; endpoint: EndpointInterface; }; /** - * Creates a new repository for the authenticated user. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository - * * `repo` scope to create a private repository + * Get the top 10 popular contents over the last 14 days. */ - createInOrg: { - (params?: RequestParameters & ReposCreateInOrgParams): Promise< - OctokitResponse - >; + getTopPaths: { + ( + params?: RequestParameters & ReposGetTopPathsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Creates a new file or updates an existing file in a repository. + * Get the top 10 referrers over the last 14 days. */ - createOrUpdateFile: { - (params?: RequestParameters & ReposCreateOrUpdateFileParams): Promise< - OctokitResponse - >; + getTopReferrers: { + ( + params?: RequestParameters & ReposGetTopReferrersParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Users with push access to the repository can create a release. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * Lists the people who have push access to this branch. */ - createRelease: { - (params?: RequestParameters & ReposCreateReleaseParams): Promise< - OctokitResponse + getUsersWithAccessToProtectedBranch: { + ( + params?: RequestParameters & + ReposGetUsersWithAccessToProtectedBranchParams + ): Promise< + OctokitResponse< + ReposGetUsersWithAccessToProtectedBranchResponse + > >; endpoint: EndpointInterface; }; /** - * Users with push access in a repository can create commit statuses for a given SHA. - * - * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. + * Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - createStatus: { - (params?: RequestParameters & ReposCreateStatusParams): Promise< - OctokitResponse + getViews: { + (params?: RequestParameters & ReposGetViewsParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [`GET /repos/:owner/:repo`](https://developer.github.com/v3/repos/#get) endpoint and check that the `is_template` key is `true`. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository - * * `repo` scope to create a private repository + * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. * - * \` + * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. */ - createUsingTemplate: { - (params?: RequestParameters & ReposCreateUsingTemplateParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - declineInvitation: { - (params?: RequestParameters & ReposDeclineInvitationParams): Promise< + list: { + (params?: RequestParameters & ReposListParams): Promise< AnyResponse >; endpoint: EndpointInterface; }; /** - * Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * @deprecated repos.listAppsWithAccessToProtectedBranch() has been renamed to repos.getAppsWithAccessToProtectedBranch() (2019-09-13) */ - delete: { - (params?: RequestParameters & ReposDeleteParams): Promise< - OctokitResponse + listAppsWithAccessToProtectedBranch: { + ( + params?: RequestParameters & + ReposListAppsWithAccessToProtectedBranchParams + ): Promise< + OctokitResponse< + ReposListAppsWithAccessToProtectedBranchResponse + > >; endpoint: EndpointInterface; }; - deleteCommitComment: { - (params?: RequestParameters & ReposDeleteCommitCommentParams): Promise< - AnyResponse - >; + listAssetsForRelease: { + ( + params?: RequestParameters & + ReposListAssetsForReleaseParams + ): Promise>; endpoint: EndpointInterface; }; - deleteDownload: { - (params?: RequestParameters & ReposDeleteDownloadParams): Promise< - AnyResponse - >; + listBranches: { + ( + params?: RequestParameters & ReposListBranchesParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Deletes a file in a repository. - * - * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. - * - * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. */ - deleteFile: { - (params?: RequestParameters & ReposDeleteFileParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - deleteHook: { - (params?: RequestParameters & ReposDeleteHookParams): Promise< - AnyResponse - >; - - endpoint: EndpointInterface; - }; - - deleteInvitation: { - (params?: RequestParameters & ReposDeleteInvitationParams): Promise< - AnyResponse + listBranchesForHeadCommit: { + ( + params?: RequestParameters & + ReposListBranchesForHeadCommitParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Users with push access to the repository can delete a release. + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. */ - deleteRelease: { - (params?: RequestParameters & ReposDeleteReleaseParams): Promise< - AnyResponse - >; - - endpoint: EndpointInterface; - }; - - deleteReleaseAsset: { - (params?: RequestParameters & ReposDeleteReleaseAssetParams): Promise< - AnyResponse - >; + listCollaborators: { + ( + params?: RequestParameters & ReposListCollaboratorsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. + * Use the `:commit_sha` to specify the commit that will have its comments listed. */ - disableAutomatedSecurityFixes: { + listCommentsForCommit: { ( - params?: RequestParameters & ReposDisableAutomatedSecurityFixesParams - ): Promise; + params?: RequestParameters & + ReposListCommentsForCommitParamsDeprecatedRef + ): Promise>; + ( + params?: RequestParameters & + ReposListCommentsForCommitParams + ): Promise>; endpoint: EndpointInterface; }; - - disablePagesSite: { - (params?: RequestParameters & ReposDisablePagesSiteParams): Promise< - AnyResponse - >; + /** + * Commit Comments use [these custom media types](https://developer.github.com/v3/repos/comments/#custom-media-types). You can read more about the use of media types in the API [here](https://developer.github.com/v3/media/). + * + * Comments are ordered by ascending ID. + */ + listCommitComments: { + ( + params?: RequestParameters & ReposListCommitCommentsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Disables vulnerability alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | */ - disableVulnerabilityAlerts: { + listCommits: { ( - params?: RequestParameters & ReposDisableVulnerabilityAlertsParams - ): Promise; + params?: RequestParameters & ReposListCommitsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://help.github.com/en/articles/configuring-automated-security-fixes)" in the GitHub Help documentation. + * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. + * + * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. */ - enableAutomatedSecurityFixes: { + listContributors: { ( - params?: RequestParameters & ReposEnableAutomatedSecurityFixesParams - ): Promise; + params?: RequestParameters & ReposListContributorsParams + ): Promise>; endpoint: EndpointInterface; }; - enablePagesSite: { - (params?: RequestParameters & ReposEnablePagesSiteParams): Promise< - OctokitResponse - >; + listDeployKeys: { + ( + params?: RequestParameters & ReposListDeployKeysParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Enables vulnerability alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)" in the GitHub Help documentation. + * Users with pull access can view deployment statuses for a deployment: */ - enableVulnerabilityAlerts: { + listDeploymentStatuses: { ( - params?: RequestParameters & ReposEnableVulnerabilityAlertsParams - ): Promise; + params?: RequestParameters & + ReposListDeploymentStatusesParams + ): Promise>; endpoint: EndpointInterface; }; /** - * The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. + * Simple filtering of deployments is available via query parameters: */ - get: { - (params?: RequestParameters & ReposGetParams): Promise< - OctokitResponse - >; + listDeployments: { + ( + params?: RequestParameters & ReposListDeploymentsParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + listDownloads: { + ( + params?: RequestParameters & ReposListDownloadsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * Lists repositories for the specified organization. */ - getAppsWithAccessToProtectedBranch: { + listForOrg: { ( - params?: RequestParameters & - ReposGetAppsWithAccessToProtectedBranchParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposListForOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Gets a redirect URL to download an archive for a repository. The `:archive_format` can be either `tarball` or `zipball`. The `:ref` must be a valid Git reference. If you omit `:ref`, the repository’s default branch (usually `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use the `Location` header to make a second `GET` request. - * - * _Note_: For private repositories, these links are temporary and expire after five minutes. - * - * To follow redirects with curl, use the `-L` switch: + * Lists public repositories for the specified user. */ - getArchiveLink: { - (params?: RequestParameters & ReposGetArchiveLinkParams): Promise< - AnyResponse - >; + listForUser: { + ( + params?: RequestParameters & ReposListForUserParams + ): Promise; endpoint: EndpointInterface; }; - getBranch: { - (params?: RequestParameters & ReposGetBranchParams): Promise< - OctokitResponse + listForks: { + (params?: RequestParameters & ReposListForksParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - */ - getBranchProtection: { - (params?: RequestParameters & ReposGetBranchProtectionParams): Promise< - OctokitResponse - >; - endpoint: EndpointInterface; - }; - /** - * Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. - */ - getClones: { - (params?: RequestParameters & ReposGetClonesParams): Promise< - OctokitResponse + listHooks: { + (params?: RequestParameters & ReposListHooksParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Returns a weekly aggregate of the number of additions and deletions pushed to a repository. + * When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ - getCodeFrequencyStats: { - (params?: RequestParameters & ReposGetCodeFrequencyStatsParams): Promise< - OctokitResponse - >; + listInvitations: { + ( + params?: RequestParameters & ReposListInvitationsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Possible values for the `permission` key: `admin`, `write`, `read`, `none`. + * When authenticating as a user, this endpoint will list all currently open repository invitations for that user. */ - getCollaboratorPermissionLevel: { + listInvitationsForAuthenticatedUser: { ( - params?: RequestParameters & ReposGetCollaboratorPermissionLevelParams - ): Promise>; + params?: RequestParameters & + ReposListInvitationsForAuthenticatedUserParams + ): Promise< + OctokitResponse< + ReposListInvitationsForAuthenticatedUserResponse + > + >; endpoint: EndpointInterface; }; /** - * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. - * - * The most recent status for each context is returned, up to 100. This field [paginates](https://developer.github.com/v3/#pagination) if there are over 100 contexts. - * - * Additionally, a combined `state` is returned. The `state` is one of: - * - * * **failure** if any of the contexts report as `error` or `failure` - * * **pending** if there are no statuses or a context is `pending` - * * **success** if the latest status for all contexts is `success` + * Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ - getCombinedStatusForRef: { + listLanguages: { ( - params?: RequestParameters & ReposGetCombinedStatusForRefParams - ): Promise>; + params?: RequestParameters & ReposListLanguagesParams + ): Promise>; endpoint: EndpointInterface; }; - /** - * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - * - * You can pass the appropriate [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. - * - * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://developer.github.com/v3/media/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - getCommit: { - (params?: RequestParameters & ReposGetCommitParamsDeprecatedSha): Promise< - OctokitResponse - >; - ( - params?: RequestParameters & ReposGetCommitParamsDeprecatedCommitSha - ): Promise>; - (params?: RequestParameters & ReposGetCommitParams): Promise< - OctokitResponse - >; + + listPagesBuilds: { + ( + params?: RequestParameters & ReposListPagesBuildsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - getCommitActivityStats: { - (params?: RequestParameters & ReposGetCommitActivityStatsParams): Promise< - OctokitResponse + listProtectedBranchRequiredStatusChecksContexts: { + ( + params?: RequestParameters & + ReposListProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + OctokitResponse< + ReposListProtectedBranchRequiredStatusChecksContextsResponse + > >; endpoint: EndpointInterface; }; - - getCommitComment: { - (params?: RequestParameters & ReposGetCommitCommentParams): Promise< - OctokitResponse + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + * @deprecated repos.listProtectedBranchTeamRestrictions() has been renamed to repos.getTeamsWithAccessToProtectedBranch() (2019-09-09) + */ + listProtectedBranchTeamRestrictions: { + ( + params?: RequestParameters & + ReposListProtectedBranchTeamRestrictionsParams + ): Promise< + OctokitResponse< + ReposListProtectedBranchTeamRestrictionsResponse + > >; endpoint: EndpointInterface; }; /** - * **Note:** To access this endpoint, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header: - * ``` - * application/vnd.github.VERSION.sha - * ``` - * Returns the SHA-1 of the commit reference. You must have `read` access for the repository to get the SHA-1 of a commit reference. You can use this endpoint to check if a remote reference's SHA-1 is the same as your local reference's SHA-1 by providing the local SHA-1 reference as the ETag. - * @deprecated "Get the SHA-1 of a commit reference" will be removed. Use "Get a single commit" instead with media type format set to "sha" instead. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + * @deprecated repos.listProtectedBranchUserRestrictions() has been renamed to repos.getUsersWithAccessToProtectedBranch() (2019-09-09) */ - getCommitRefSha: { - (params?: RequestParameters & ReposGetCommitRefShaParams): Promise< - AnyResponse + listProtectedBranchUserRestrictions: { + ( + params?: RequestParameters & + ReposListProtectedBranchUserRestrictionsParams + ): Promise< + OctokitResponse< + ReposListProtectedBranchUserRestrictionsResponse + > >; endpoint: EndpointInterface; }; /** - * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit `:path`, you will receive the contents of all files in the repository. - * - * Files and symlinks support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML (when supported). All content types support [a custom media type](https://developer.github.com/v3/repos/contents/#custom-media-types) to ensure the content is returned in a consistent object format. - * - * **Note**: - * - * * To get a repository's contents recursively, you can [recursively get the tree](https://developer.github.com/v3/git/trees/). - * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees API](https://developer.github.com/v3/git/trees/#get-a-tree). - * * This API supports files up to 1 megabyte in size. - * - * The response will be an array of objects, one object for each item in the directory. - * - * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). In the next major version of the API, the type will be returned as "submodule". - * - * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the API responds with the content of the file (in the [format shown above](https://developer.github.com/v3/repos/contents/#response-if-content-is-a-file)). - * - * Otherwise, the API responds with an object describing the symlink itself: - * - * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit. + * Lists all public repositories in the order that they were created. * - * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of repositories. */ - getContents: { - (params?: RequestParameters & ReposGetContentsParams): Promise< - OctokitResponse + listPublic: { + ( + params?: RequestParameters & ReposListPublicParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Lists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoint. + */ + listPullRequestsAssociatedWithCommit: { + ( + params?: RequestParameters & + ReposListPullRequestsAssociatedWithCommitParams + ): Promise< + OctokitResponse< + ReposListPullRequestsAssociatedWithCommitResponse + > >; endpoint: EndpointInterface; }; /** - * * `total` - The Total number of commits authored by the contributor. + * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://developer.github.com/v3/repos/#list-tags). * - * Weekly Hash (`weeks` array): + * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + */ + listReleases: { + ( + params?: RequestParameters & ReposListReleasesParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. * - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. */ - getContributorsStats: { - (params?: RequestParameters & ReposGetContributorsStatsParams): Promise< - OctokitResponse - >; + listStatusesForRef: { + ( + params?: RequestParameters & ReposListStatusesForRefParams + ): Promise>; endpoint: EndpointInterface; }; - getDeployKey: { - (params?: RequestParameters & ReposGetDeployKeyParams): Promise< - OctokitResponse + listTags: { + (params?: RequestParameters & ReposListTagsParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - getDeployment: { - (params?: RequestParameters & ReposGetDeploymentParams): Promise< - OctokitResponse + listTeams: { + (params?: RequestParameters & ReposListTeamsParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Users with pull access can view a deployment status for a deployment: + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the teams who have push access to this branch. The list includes child teams. + * @deprecated repos.listTeamsWithAccessToProtectedBranch() has been renamed to repos.getTeamsWithAccessToProtectedBranch() (2019-09-13) */ - getDeploymentStatus: { - (params?: RequestParameters & ReposGetDeploymentStatusParams): Promise< - OctokitResponse + listTeamsWithAccessToProtectedBranch: { + ( + params?: RequestParameters & + ReposListTeamsWithAccessToProtectedBranchParams + ): Promise< + OctokitResponse< + ReposListTeamsWithAccessToProtectedBranchResponse + > >; endpoint: EndpointInterface; }; - getDownload: { - (params?: RequestParameters & ReposGetDownloadParams): Promise< - OctokitResponse - >; + listTopics: { + ( + params?: RequestParameters & ReposListTopicsParams + ): Promise>; endpoint: EndpointInterface; }; - - getHook: { - (params?: RequestParameters & ReposGetHookParams): Promise< - OctokitResponse + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the people who have push access to this branch. + * @deprecated repos.listUsersWithAccessToProtectedBranch() has been renamed to repos.getUsersWithAccessToProtectedBranch() (2019-09-13) + */ + listUsersWithAccessToProtectedBranch: { + ( + params?: RequestParameters & + ReposListUsersWithAccessToProtectedBranchParams + ): Promise< + OctokitResponse< + ReposListUsersWithAccessToProtectedBranchResponse + > >; endpoint: EndpointInterface; }; - getLatestPagesBuild: { - (params?: RequestParameters & ReposGetLatestPagesBuildParams): Promise< - OctokitResponse + merge: { + (params?: RequestParameters & ReposMergeParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * View the latest published full release for the repository. - * - * The latest release is the most recent non-prerelease, non-draft release, sorted by the `created_at` attribute. The `created_at` attribute is the date of the commit used for the release, and not the date when the release was drafted or published. + * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. */ - getLatestRelease: { - (params?: RequestParameters & ReposGetLatestReleaseParams): Promise< - OctokitResponse + pingHook: { + (params?: RequestParameters & ReposPingHookParams): Promise< + AnyResponse >; endpoint: EndpointInterface; }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + removeBranchProtection: { + ( + params?: RequestParameters & + ReposRemoveBranchProtectionParams + ): Promise; - getPages: { - (params?: RequestParameters & ReposGetPagesParams): Promise< - OctokitResponse - >; + endpoint: EndpointInterface; + }; + + removeCollaborator: { + ( + params?: RequestParameters & ReposRemoveCollaboratorParams + ): Promise; endpoint: EndpointInterface; }; - getPagesBuild: { - (params?: RequestParameters & ReposGetPagesBuildParams): Promise< - OctokitResponse - >; + removeDeployKey: { + ( + params?: RequestParameters & ReposRemoveDeployKeyParams + ): Promise; endpoint: EndpointInterface; }; /** - * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * The array order is oldest week (index 0) to most recent week. + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. */ - getParticipationStats: { - (params?: RequestParameters & ReposGetParticipationStatsParams): Promise< - OctokitResponse - >; + removeProtectedBranchAdminEnforcement: { + ( + params?: RequestParameters & + ReposRemoveProtectedBranchAdminEnforcementParams + ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ - getProtectedBranchAdminEnforcement: { + removeProtectedBranchAppRestrictions: { ( params?: RequestParameters & - ReposGetProtectedBranchAdminEnforcementParams + ReposRemoveProtectedBranchAppRestrictionsParams ): Promise< - OctokitResponse + OctokitResponse< + ReposRemoveProtectedBranchAppRestrictionsResponse + > >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - getProtectedBranchPullRequestReviewEnforcement: { + removeProtectedBranchPullRequestReviewEnforcement: { ( params?: RequestParameters & - ReposGetProtectedBranchPullRequestReviewEnforcementParams - ): Promise< - OctokitResponse< - ReposGetProtectedBranchPullRequestReviewEnforcementResponse - > - >; + ReposRemoveProtectedBranchPullRequestReviewEnforcementParams + ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://help.github.com/articles/signing-commits-with-gpg) in GitHub Help. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * **Note**: You must enable branch protection to require signed commits. + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. */ - getProtectedBranchRequiredSignatures: { + removeProtectedBranchRequiredSignatures: { ( params?: RequestParameters & - ReposGetProtectedBranchRequiredSignaturesParams - ): Promise< - OctokitResponse - >; + ReposRemoveProtectedBranchRequiredSignaturesParams + ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - getProtectedBranchRequiredStatusChecks: { + removeProtectedBranchRequiredStatusChecks: { ( params?: RequestParameters & - ReposGetProtectedBranchRequiredStatusChecksParams + ReposRemoveProtectedBranchRequiredStatusChecksParams + ): Promise; + + endpoint: EndpointInterface; + }; + /** + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + removeProtectedBranchRequiredStatusChecksContexts: { + ( + params?: RequestParameters & + ReposRemoveProtectedBranchRequiredStatusChecksContextsParams ): Promise< - OctokitResponse + OctokitResponse< + ReposRemoveProtectedBranchRequiredStatusChecksContextsResponse + > >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Lists who has access to this protected branch. {{#note}} + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + * Disables the ability to restrict who can push to this branch. */ - getProtectedBranchRestrictions: { + removeProtectedBranchRestrictions: { ( - params?: RequestParameters & ReposGetProtectedBranchRestrictionsParams - ): Promise>; + params?: RequestParameters & + ReposRemoveProtectedBranchRestrictionsParams + ): Promise; endpoint: EndpointInterface; }; /** - * Each array contains the day number, hour number, and number of commits: + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * * `0-6`: Sunday - Saturday - * * `0-23`: Hour of day - * * Number of commits + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. * - * For example, `[2, 14, 25]` indicates that there were 25 total commits, during the 2:00pm hour on Tuesdays. All times are based on the time zone of individual commits. + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ - getPunchCardStats: { - (params?: RequestParameters & ReposGetPunchCardStatsParams): Promise< - OctokitResponse + removeProtectedBranchTeamRestrictions: { + ( + params?: RequestParameters & + ReposRemoveProtectedBranchTeamRestrictionsParams + ): Promise< + OctokitResponse< + ReposRemoveProtectedBranchTeamRestrictionsResponse + > >; endpoint: EndpointInterface; }; /** - * Gets the preferred README for a repository. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * READMEs support [custom media types](https://developer.github.com/v3/repos/contents/#custom-media-types) for retrieving the raw content or rendered HTML. + * Removes the ability of a user to push to this branch. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ - getReadme: { - (params?: RequestParameters & ReposGetReadmeParams): Promise< - OctokitResponse + removeProtectedBranchUserRestrictions: { + ( + params?: RequestParameters & + ReposRemoveProtectedBranchUserRestrictionsParams + ): Promise< + OctokitResponse< + ReposRemoveProtectedBranchUserRestrictionsResponse + > >; endpoint: EndpointInterface; }; /** - * **Note:** This returns an `upload_url` key corresponding to the endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/v3/#hypermedia). + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ - getRelease: { - (params?: RequestParameters & ReposGetReleaseParams): Promise< - OctokitResponse + replaceProtectedBranchAppRestrictions: { + ( + params?: RequestParameters & + ReposReplaceProtectedBranchAppRestrictionsParams + ): Promise< + OctokitResponse< + ReposReplaceProtectedBranchAppRestrictionsResponse + > >; endpoint: EndpointInterface; }; /** - * To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://developer.github.com/v3/media/#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - getReleaseAsset: { - (params?: RequestParameters & ReposGetReleaseAssetParams): Promise< - OctokitResponse + replaceProtectedBranchRequiredStatusChecksContexts: { + ( + params?: RequestParameters & + ReposReplaceProtectedBranchRequiredStatusChecksContextsParams + ): Promise< + OctokitResponse< + ReposReplaceProtectedBranchRequiredStatusChecksContextsResponse + > >; endpoint: EndpointInterface; }; /** - * Get a published release with the specified tag. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. + * + * | Type | Description | + * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ - getReleaseByTag: { - (params?: RequestParameters & ReposGetReleaseByTagParams): Promise< - OctokitResponse + replaceProtectedBranchTeamRestrictions: { + ( + params?: RequestParameters & + ReposReplaceProtectedBranchTeamRestrictionsParams + ): Promise< + OctokitResponse< + ReposReplaceProtectedBranchTeamRestrictionsResponse + > >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. * - * Lists the teams who have push access to this branch. If you pass the `hellcat-preview` media type, the list includes child teams. + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | */ - getTeamsWithAccessToProtectedBranch: { + replaceProtectedBranchUserRestrictions: { ( params?: RequestParameters & - ReposGetTeamsWithAccessToProtectedBranchParams + ReposReplaceProtectedBranchUserRestrictionsParams ): Promise< - OctokitResponse + OctokitResponse< + ReposReplaceProtectedBranchUserRestrictionsResponse + > >; endpoint: EndpointInterface; }; + + replaceTopics: { + ( + params?: RequestParameters & ReposReplaceTopicsParams + ): Promise>; + + endpoint: EndpointInterface; + }; /** - * Get the top 10 popular contents over the last 14 days. + * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * + * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. */ - getTopPaths: { - (params?: RequestParameters & ReposGetTopPathsParams): Promise< - OctokitResponse - >; + requestPageBuild: { + ( + params?: RequestParameters & ReposRequestPageBuildParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Get the top 10 referrers over the last 14 days. + * This endpoint will return all community profile metrics, including an overall health score, repository description, the presence of documentation, detected code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, README, and CONTRIBUTING files. */ - getTopReferrers: { - (params?: RequestParameters & ReposGetTopReferrersParams): Promise< - OctokitResponse + retrieveCommunityProfileMetrics: { + ( + params?: RequestParameters & + ReposRetrieveCommunityProfileMetricsParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. * - * Lists the people who have push access to this branch. + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` */ - getUsersWithAccessToProtectedBranch: { + testPushHook: { ( - params?: RequestParameters & - ReposGetUsersWithAccessToProtectedBranchParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposTestPushHookParams + ): Promise; endpoint: EndpointInterface; }; /** - * Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. + * A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://help.github.com/articles/about-repository-transfers/). */ - getViews: { - (params?: RequestParameters & ReposGetViewsParams): Promise< - OctokitResponse + transfer: { + (params?: RequestParameters & ReposTransferParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. - * - * The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership. + * **Note**: To edit a repository's topics, use the [`topics` endpoint](https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository). */ - list: { - (params?: RequestParameters & ReposListParams): Promise; + update: { + (params?: RequestParameters & ReposUpdateParams): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * @deprecated repos.listAppsWithAccessToProtectedBranch() has been renamed to repos.getAppsWithAccessToProtectedBranch() (2019-09-13) + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users, apps, and teams in total is limited to 100 items. */ - listAppsWithAccessToProtectedBranch: { + updateBranchProtection: { ( params?: RequestParameters & - ReposListAppsWithAccessToProtectedBranchParams - ): Promise< - OctokitResponse - >; + ReposUpdateBranchProtectionParams + ): Promise>; endpoint: EndpointInterface; }; - listAssetsForRelease: { - (params?: RequestParameters & ReposListAssetsForReleaseParams): Promise< - OctokitResponse - >; + updateCommitComment: { + ( + params?: RequestParameters & ReposUpdateCommitCommentParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * Creates a new file or updates an existing file in a repository. + * @deprecated repos.updateFile() has been renamed to repos.createOrUpdateFile() (2019-06-07) + */ + updateFile: { + ( + params?: RequestParameters & ReposUpdateFileParams + ): Promise>; endpoint: EndpointInterface; }; - listBranches: { - (params?: RequestParameters & ReposListBranchesParams): Promise< - OctokitResponse - >; + updateHook: { + ( + params?: RequestParameters & ReposUpdateHookParams + ): Promise>; + + endpoint: EndpointInterface; + }; + + updateInformationAboutPagesSite: { + ( + params?: RequestParameters & + ReposUpdateInformationAboutPagesSiteParams + ): Promise; + + endpoint: EndpointInterface; + }; + + updateInvitation: { + ( + params?: RequestParameters & ReposUpdateInvitationParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. */ - listBranchesForHeadCommit: { + updateProtectedBranchPullRequestReviewEnforcement: { ( - params?: RequestParameters & ReposListBranchesForHeadCommitParams - ): Promise>; + params?: RequestParameters & + ReposUpdateProtectedBranchPullRequestReviewEnforcementParams + ): Promise< + OctokitResponse< + ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse + > + >; endpoint: EndpointInterface; }; /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. */ - listCollaborators: { - (params?: RequestParameters & ReposListCollaboratorsParams): Promise< - OctokitResponse + updateProtectedBranchRequiredStatusChecks: { + ( + params?: RequestParameters & + ReposUpdateProtectedBranchRequiredStatusChecksParams + ): Promise< + OctokitResponse< + ReposUpdateProtectedBranchRequiredStatusChecksResponse + > >; endpoint: EndpointInterface; }; /** - * Use the `:commit_sha` to specify the commit that will have its comments listed. + * Users with push access to the repository can edit a release. */ - listCommentsForCommit: { + updateRelease: { ( - params?: RequestParameters & - ReposListCommentsForCommitParamsDeprecatedRef - ): Promise>; - (params?: RequestParameters & ReposListCommentsForCommitParams): Promise< - OctokitResponse - >; + params?: RequestParameters & ReposUpdateReleaseParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Commit Comments use [these custom media types](https://developer.github.com/v3/repos/comments/#custom-media-types). You can read more about the use of media types in the API [here](https://developer.github.com/v3/media/). + * Users with push access to the repository can edit a release asset. + */ + updateReleaseAsset: { + ( + params?: RequestParameters & ReposUpdateReleaseAssetParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * This endpoint makes use of [a Hypermedia relation](https://developer.github.com/v3/#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in the response of the [Create a release endpoint](https://developer.github.com/v3/repos/releases/#create-a-release) to upload a release asset. * - * Comments are ordered by ascending ID. + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. + * + * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: + * + * `application/zip` + * + * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset. */ - listCommitComments: { - (params?: RequestParameters & ReposListCommitCommentsParams): Promise< - OctokitResponse - >; + uploadReleaseAsset: { + ( + params?: RequestParameters & ReposUploadReleaseAssetParams + ): Promise>; endpoint: EndpointInterface; }; + }; + search: { /** - * **Signature verification object** + * Find file contents via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). * - * These are the possible values for `reason` in the `verification` object: + * **Note:** You must [authenticate](https://developer.github.com/v3/#authentication) to search for code across all public repositories. * - * | Value | Description | - * | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + * **Considerations for code search** + * + * Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * + * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * * Only files smaller than 384 KB are searchable. + * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * + * Suppose you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery). Your query would look something like this: + * + * Here, we're searching for the keyword `addClass` within a file's contents. We're making sure that we're only looking in files where the language is JavaScript. And we're scoping the search to the `repo:jquery/jquery` repository. */ - listCommits: { - (params?: RequestParameters & ReposListCommitsParams): Promise< - OctokitResponse + code: { + (params?: RequestParameters & SearchCodeParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. + * Find commits via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * **Considerations for commit search** * - * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. + * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * + * Suppose you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: */ - listContributors: { - (params?: RequestParameters & ReposListContributorsParams): Promise< - OctokitResponse + commits: { + (params?: RequestParameters & SearchCommitsParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - listDeployKeys: { - (params?: RequestParameters & ReposListDeployKeysParams): Promise< - OctokitResponse - >; + /** + * This API call is added for compatibility reasons only. There's no guarantee that full email searches will always be available. The `@` character in the address must be left unencoded. Searches only against public email addresses (as configured on the user's GitHub profile). + * @deprecated search.emailLegacy() is deprecated, see https://developer.github.com/v3/search/legacy/#email-search + */ + emailLegacy: { + ( + params?: RequestParameters & SearchEmailLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Users with pull access can view deployment statuses for a deployment: + * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. + * @deprecated search.issues() has been renamed to search.issuesAndPullRequests() (2018-12-27) */ - listDeploymentStatuses: { - (params?: RequestParameters & ReposListDeploymentStatusesParams): Promise< - OctokitResponse + issues: { + (params?: RequestParameters & SearchIssuesParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Simple filtering of deployments is available via query parameters: + * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * + * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. */ - listDeployments: { - (params?: RequestParameters & ReposListDeploymentsParams): Promise< - OctokitResponse - >; + issuesAndPullRequests: { + ( + params?: RequestParameters & + SearchIssuesAndPullRequestsParams + ): Promise>; endpoint: EndpointInterface; }; - - listDownloads: { - (params?: RequestParameters & ReposListDownloadsParams): Promise< - OctokitResponse - >; + /** + * Find issues by state and keyword. + * @deprecated search.issuesLegacy() is deprecated, see https://developer.github.com/v3/search/legacy/#search-issues + */ + issuesLegacy: { + ( + params?: RequestParameters & SearchIssuesLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Lists repositories for the specified organization. + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Suppose you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * + * The labels that best match for the query appear first in the search results. */ - listForOrg: { - (params?: RequestParameters & ReposListForOrgParams): Promise< - OctokitResponse + labels: { + (params?: RequestParameters & SearchLabelsParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Lists public repositories for the specified user. + * Find repositories via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Suppose you want to search for popular Tetris repositories written in Assembly. Your query might look like this. + * + * You can search for multiple topics by adding more `topic:` instances, and including the `mercy-preview` header. For example: + * + * In this request, we're searching for repositories with the word `tetris` in the name, the description, or the README. We're limiting the results to only find repositories where the primary language is Assembly. We're sorting by stars in descending order, so that the most popular repositories appear first in the search results. */ - listForUser: { - (params?: RequestParameters & ReposListForUserParams): Promise< - AnyResponse + repos: { + (params?: RequestParameters & SearchReposParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - listForks: { - (params?: RequestParameters & ReposListForksParams): Promise< - OctokitResponse - >; + /** + * Find repositories by keyword. Note, this legacy method does not follow the v3 pagination pattern. This method returns up to 100 results per page and pages can be fetched using the `start_page` parameter. + * @deprecated search.reposLegacy() is deprecated, see https://developer.github.com/v3/search/legacy/#search-repositories + */ + reposLegacy: { + ( + params?: RequestParameters & SearchReposLegacyParams + ): Promise>; endpoint: EndpointInterface; }; - - listHooks: { - (params?: RequestParameters & ReposListHooksParams): Promise< - OctokitResponse + /** + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * + * Suppose you want to search for topics related to Ruby that are featured on [https://github.com/topics](https://github.com/topics). Your query might look like this: + * + * In this request, we're searching for topics with the keyword `ruby`, and we're limiting the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + * + * **Note:** A search for featured Ruby topics only has 6 total results, so a [Link header](https://developer.github.com/v3/#link-header) indicating pagination is not included in the response. + */ + topics: { + (params?: RequestParameters & SearchTopicsParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. + * Find users via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * + * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). + * + * Imagine you're looking for a list of popular users. You might try out this query: + * + * Here, we're looking at users with the name Tom. We're only interested in those with more than 42 repositories, and only if they have over 1,000 followers. */ - listInvitations: { - (params?: RequestParameters & ReposListInvitationsParams): Promise< - OctokitResponse + users: { + (params?: RequestParameters & SearchUsersParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * When authenticating as a user, this endpoint will list all currently open repository invitations for that user. + * Find users by keyword. + * @deprecated search.usersLegacy() is deprecated, see https://developer.github.com/v3/search/legacy/#search-users */ - listInvitationsForAuthenticatedUser: { + usersLegacy: { ( - params?: RequestParameters & - ReposListInvitationsForAuthenticatedUserParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & SearchUsersLegacyParams + ): Promise>; endpoint: EndpointInterface; }; + }; + teams: { /** - * Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add team membership](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) endpoint instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * @deprecated teams.addMember() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member-legacy */ - listLanguages: { - (params?: RequestParameters & ReposListLanguagesParams): Promise< - OctokitResponse + addMember: { + (params?: RequestParameters & TeamsAddMemberParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - listPagesBuilds: { - (params?: RequestParameters & ReposListPagesBuildsParams): Promise< - OctokitResponse - >; + /** + * The "Add team member" endpoint (described below) is deprecated. + * + * We recommend using the [Add team membership](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) endpoint instead. It allows you to invite new organization members to your teams. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * @deprecated teams.addMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member-legacy + */ + addMemberLegacy: { + ( + params?: RequestParameters & TeamsAddMemberLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team membership`](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + * @deprecated teams.addOrUpdateMembership() is deprecated, see https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy */ - listProtectedBranchRequiredStatusChecksContexts: { + addOrUpdateMembership: { ( params?: RequestParameters & - ReposListProtectedBranchRequiredStatusChecksContextsParams - ): Promise< - OctokitResponse< - ReposListProtectedBranchRequiredStatusChecksContextsResponse - > - >; + TeamsAddOrUpdateMembershipParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * Lists the teams who have push access to this branch. If you pass the `hellcat-preview` media type, the list includes child teams. - * @deprecated repos.listProtectedBranchTeamRestrictions() has been renamed to repos.getTeamsWithAccessToProtectedBranch() (2019-09-09) + * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/:org_id/team/:team_id/memberships/:username`. */ - listProtectedBranchTeamRestrictions: { + addOrUpdateMembershipInOrg: { ( params?: RequestParameters & - ReposListProtectedBranchTeamRestrictionsParams + TeamsAddOrUpdateMembershipInOrgParams ): Promise< - OctokitResponse + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team membership`](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) endpoint. * - * Lists the people who have push access to this branch. - * @deprecated repos.listProtectedBranchUserRestrictions() has been renamed to repos.getUsersWithAccessToProtectedBranch() (2019-09-09) + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + * @deprecated teams.addOrUpdateMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy */ - listProtectedBranchUserRestrictions: { + addOrUpdateMembershipLegacy: { ( params?: RequestParameters & - ReposListProtectedBranchUserRestrictionsParams + TeamsAddOrUpdateMembershipLegacyParams ): Promise< - OctokitResponse + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Lists all public repositories in the order that they were created. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team project`](https://developer.github.com/v3/teams/#add-or-update-team-project) endpoint. * - * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/v3/#link-header) to get the URL for the next page of repositories. + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * @deprecated teams.addOrUpdateProject() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-project-legacy */ - listPublic: { - (params?: RequestParameters & ReposListPublicParams): Promise< - OctokitResponse - >; + addOrUpdateProject: { + ( + params?: RequestParameters & TeamsAddOrUpdateProjectParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Lists all pull requests containing the provided commit SHA, which can be from any point in the commit history. The results will include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://developer.github.com/v3/pulls/#list-pull-requests) endpoint. + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/:org_id/team/:team_id/projects/:project_id`. */ - listPullRequestsAssociatedWithCommit: { + addOrUpdateProjectInOrg: { ( params?: RequestParameters & - ReposListPullRequestsAssociatedWithCommitParams + TeamsAddOrUpdateProjectInOrgParams ): Promise< - OctokitResponse + OctokitResponse >; endpoint: EndpointInterface; }; /** - * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://developer.github.com/v3/repos/#list-tags). + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team project`](https://developer.github.com/v3/teams/#add-or-update-team-project) endpoint. * - * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * @deprecated teams.addOrUpdateProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-project-legacy */ - listReleases: { - (params?: RequestParameters & ReposListReleasesParams): Promise< - OctokitResponse + addOrUpdateProjectLegacy: { + ( + params?: RequestParameters & + TeamsAddOrUpdateProjectLegacyParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team repository`](https://developer.github.com/v3/teams/#add-or-update-team-repository) endpoint. * - * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * @deprecated teams.addOrUpdateRepo() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy */ - listStatusesForRef: { - (params?: RequestParameters & ReposListStatusesForRefParams): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - listTags: { - (params?: RequestParameters & ReposListTagsParams): Promise< - OctokitResponse - >; + addOrUpdateRepo: { + ( + params?: RequestParameters & TeamsAddOrUpdateRepoParams + ): Promise; endpoint: EndpointInterface; }; - - listTeams: { - (params?: RequestParameters & ReposListTeamsParams): Promise< - OctokitResponse - >; + /** + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/:org_id/team/:team_id/repos/:owner/:repo`. + */ + addOrUpdateRepoInOrg: { + ( + params?: RequestParameters & + TeamsAddOrUpdateRepoInOrgParams + ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Add or update team repository`](https://developer.github.com/v3/teams/#add-or-update-team-repository) endpoint. * - * Lists the teams who have push access to this branch. If you pass the `hellcat-preview` media type, the list includes child teams. - * @deprecated repos.listTeamsWithAccessToProtectedBranch() has been renamed to repos.getTeamsWithAccessToProtectedBranch() (2019-09-13) + * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * @deprecated teams.addOrUpdateRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy */ - listTeamsWithAccessToProtectedBranch: { + addOrUpdateRepoLegacy: { ( params?: RequestParameters & - ReposListTeamsWithAccessToProtectedBranchParams - ): Promise< - OctokitResponse - >; + TeamsAddOrUpdateRepoLegacyParams + ): Promise; endpoint: EndpointInterface; }; - - listTopics: { - (params?: RequestParameters & ReposListTopicsParams): Promise< - OctokitResponse - >; + /** + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Check if a team manages a repository`](https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository) endpoint. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + * @deprecated teams.checkManagesRepo() is deprecated, see https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy + */ + checkManagesRepo: { + ( + params?: RequestParameters & TeamsCheckManagesRepoParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Checks whether a team has `admin`, `push`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked. * - * Lists the people who have push access to this branch. - * @deprecated repos.listUsersWithAccessToProtectedBranch() has been renamed to repos.getUsersWithAccessToProtectedBranch() (2019-09-13) + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/repos/:owner/:repo`. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: */ - listUsersWithAccessToProtectedBranch: { + checkManagesRepoInOrg: { ( params?: RequestParameters & - ReposListUsersWithAccessToProtectedBranchParams - ): Promise< - OctokitResponse - >; - - endpoint: EndpointInterface; - }; - - merge: { - (params?: RequestParameters & ReposMergeParams): Promise< - OctokitResponse - >; + TeamsCheckManagesRepoInOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * This will trigger a [ping event](https://developer.github.com/webhooks/#ping-event) to be sent to the hook. + * **Note**: Repositories inherited through a parent team will also be checked. + * + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Check if a team manages a repository`](https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository) endpoint. + * + * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + * @deprecated teams.checkManagesRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy */ - pingHook: { - (params?: RequestParameters & ReposPingHookParams): Promise; + checkManagesRepoLegacy: { + ( + params?: RequestParameters & + TeamsCheckManagesRepoLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * To create a team, the authenticated user must be a member or owner of `:org`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)" in the GitHub Help documentation. */ - removeBranchProtection: { - (params?: RequestParameters & ReposRemoveBranchProtectionParams): Promise< - AnyResponse + create: { + ( + params?: RequestParameters & + TeamsCreateParamsDeprecatedPermission + ): Promise>; + (params?: RequestParameters & TeamsCreateParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - removeCollaborator: { - (params?: RequestParameters & ReposRemoveCollaboratorParams): Promise< - AnyResponse - >; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://developer.github.com/v3/teams/discussions/#create-a-discussion) endpoint. + * + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * @deprecated teams.createDiscussion() is deprecated, see https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy + */ + createDiscussion: { + ( + params?: RequestParameters & TeamsCreateDiscussionParams + ): Promise>; endpoint: EndpointInterface; }; - - removeDeployKey: { - (params?: RequestParameters & ReposRemoveDeployKeyParams): Promise< - AnyResponse + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a comment`](https://developer.github.com/v3/teams/discussion_comments/#create-a-comment) endpoint. + * + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * @deprecated teams.createDiscussionComment() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy + */ + createDiscussionComment: { + ( + params?: RequestParameters & + TeamsCreateDiscussionCommentParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments`. */ - removeProtectedBranchAdminEnforcement: { + createDiscussionCommentInOrg: { ( params?: RequestParameters & - ReposRemoveProtectedBranchAdminEnforcementParams - ): Promise; + TeamsCreateDiscussionCommentInOrgParams + ): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a comment`](https://developer.github.com/v3/teams/discussion_comments/#create-a-comment) endpoint. * - * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * @deprecated teams.createDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy */ - removeProtectedBranchAppRestrictions: { + createDiscussionCommentLegacy: { ( params?: RequestParameters & - ReposRemoveProtectedBranchAppRestrictionsParams + TeamsCreateDiscussionCommentLegacyParams ): Promise< - OctokitResponse + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions`. */ - removeProtectedBranchPullRequestReviewEnforcement: { + createDiscussionInOrg: { ( params?: RequestParameters & - ReposRemoveProtectedBranchPullRequestReviewEnforcementParams - ): Promise; + TeamsCreateDiscussionInOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://developer.github.com/v3/teams/discussions/#create-a-discussion) endpoint. * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * @deprecated teams.createDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy */ - removeProtectedBranchRequiredSignatures: { + createDiscussionLegacy: { ( params?: RequestParameters & - ReposRemoveProtectedBranchRequiredSignaturesParams - ): Promise; + TeamsCreateDiscussionLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete team`](https://developer.github.com/v3/teams/#delete-team) endpoint. + * + * To delete a team, the authenticated user must be an organization owner or team maintainer. + * + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * @deprecated teams.delete() is deprecated, see https://developer.github.com/v3/teams/#delete-team-legacy */ - removeProtectedBranchRequiredStatusChecks: { - ( - params?: RequestParameters & - ReposRemoveProtectedBranchRequiredStatusChecksParams - ): Promise; + delete: { + (params?: RequestParameters & TeamsDeleteParams): Promise< + AnyResponse + >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://developer.github.com/v3/teams/discussions/#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.deleteDiscussion() is deprecated, see https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy */ - removeProtectedBranchRequiredStatusChecksContexts: { + deleteDiscussion: { ( - params?: RequestParameters & - ReposRemoveProtectedBranchRequiredStatusChecksContextsParams - ): Promise< - OctokitResponse< - ReposRemoveProtectedBranchRequiredStatusChecksContextsResponse - > - >; + params?: RequestParameters & TeamsDeleteDiscussionParams + ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a comment`](https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment) endpoint. * - * Disables the ability to restrict who can push to this branch. + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.deleteDiscussionComment() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy */ - removeProtectedBranchRestrictions: { + deleteDiscussionComment: { ( params?: RequestParameters & - ReposRemoveProtectedBranchRestrictionsParams + TeamsDeleteDiscussionCommentParams ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Removes the ability of a team to push to this branch. If you pass the `hellcat-preview` media type, you can include child teams. + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * | Type | Description | - * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number`. */ - removeProtectedBranchTeamRestrictions: { + deleteDiscussionCommentInOrg: { ( params?: RequestParameters & - ReposRemoveProtectedBranchTeamRestrictionsParams - ): Promise< - OctokitResponse - >; + TeamsDeleteDiscussionCommentInOrgParams + ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Removes the ability of a user to push to this branch. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a comment`](https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment) endpoint. * - * | Type | Description | - * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.deleteDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy */ - removeProtectedBranchUserRestrictions: { + deleteDiscussionCommentLegacy: { ( params?: RequestParameters & - ReposRemoveProtectedBranchUserRestrictionsParams - ): Promise< - OctokitResponse - >; + TeamsDeleteDiscussionCommentLegacyParams + ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/discussions/:discussion_number`. */ - replaceProtectedBranchAppRestrictions: { + deleteDiscussionInOrg: { ( params?: RequestParameters & - ReposReplaceProtectedBranchAppRestrictionsParams - ): Promise< - OctokitResponse - >; + TeamsDeleteDiscussionInOrgParams + ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete a discussion`](https://developer.github.com/v3/teams/discussions/#delete-a-discussion) endpoint. + * + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.deleteDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy */ - replaceProtectedBranchRequiredStatusChecksContexts: { + deleteDiscussionLegacy: { ( params?: RequestParameters & - ReposReplaceProtectedBranchRequiredStatusChecksContextsParams - ): Promise< - OctokitResponse< - ReposReplaceProtectedBranchRequiredStatusChecksContextsResponse - > - >; + TeamsDeleteDiscussionLegacyParams + ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * To delete a team, the authenticated user must be an organization owner or team maintainer. * - * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. If you pass the `hellcat-preview` media type, you can include child teams. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id`. * - * | Type | Description | - * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. */ - replaceProtectedBranchTeamRestrictions: { + deleteInOrg: { ( - params?: RequestParameters & - ReposReplaceProtectedBranchTeamRestrictionsParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & TeamsDeleteInOrgParams + ): Promise; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Delete team`](https://developer.github.com/v3/teams/#delete-team) endpoint. * - * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * To delete a team, the authenticated user must be an organization owner or team maintainer. * - * | Type | Description | - * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + * If you are an organization owner, deleting a parent team will delete all of its child teams as well. + * @deprecated teams.deleteLegacy() is deprecated, see https://developer.github.com/v3/teams/#delete-team-legacy */ - replaceProtectedBranchUserRestrictions: { + deleteLegacy: { ( - params?: RequestParameters & - ReposReplaceProtectedBranchUserRestrictionsParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & TeamsDeleteLegacyParams + ): Promise; endpoint: EndpointInterface; }; - - replaceTopics: { - (params?: RequestParameters & ReposReplaceTopicsParams): Promise< - OctokitResponse + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [`Get team by name`](https://developer.github.com/v3/teams/#get-team-by-name) endpoint. + * @deprecated teams.get() is deprecated, see https://developer.github.com/v3/teams/#get-team-legacy + */ + get: { + (params?: RequestParameters & TeamsGetParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * You can request that your site be built from the latest revision on the default branch. This has the same effect as pushing a commit to your default branch, but does not require an additional commit. Manually triggering page builds can be helpful when diagnosing build warnings and failures. + * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. * - * Build requests are limited to one concurrent build per repository and one concurrent build per requester. If you request a build while another is still in progress, the second request will be queued until the first completes. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id`. */ - requestPageBuild: { - (params?: RequestParameters & ReposRequestPageBuildParams): Promise< - OctokitResponse + getByName: { + (params?: RequestParameters & TeamsGetByNameParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * This endpoint will return all community profile metrics, including an overall health score, repository description, the presence of documentation, detected code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, README, and CONTRIBUTING files. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get a single discussion`](https://developer.github.com/v3/teams/discussions/#get-a-single-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.getDiscussion() is deprecated, see https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy */ - retrieveCommunityProfileMetrics: { + getDiscussion: { ( - params?: RequestParameters & ReposRetrieveCommunityProfileMetricsParams - ): Promise>; + params?: RequestParameters & TeamsGetDiscussionParams + ): Promise>; endpoint: EndpointInterface; }; /** - * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get a single comment`](https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment) endpoint. * - * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.getDiscussionComment() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy */ - testPushHook: { - (params?: RequestParameters & ReposTestPushHookParams): Promise< - AnyResponse - >; + getDiscussionComment: { + ( + params?: RequestParameters & + TeamsGetDiscussionCommentParams + ): Promise>; endpoint: EndpointInterface; }; /** - * A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://help.github.com/articles/about-repository-transfers/). + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number`. */ - transfer: { - (params?: RequestParameters & ReposTransferParams): Promise< - OctokitResponse + getDiscussionCommentInOrg: { + ( + params?: RequestParameters & + TeamsGetDiscussionCommentInOrgParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * **Note**: To edit a repository's topics, use the [`topics` endpoint](https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository). + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get a single comment`](https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment) endpoint. + * + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.getDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy */ - update: { - (params?: RequestParameters & ReposUpdateParams): Promise< - OctokitResponse + getDiscussionCommentLegacy: { + ( + params?: RequestParameters & + TeamsGetDiscussionCommentLegacyParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. - * - * Protecting a branch requires admin or owner permissions to the repository. - * - * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * **Note**: The list of users, apps, and teams in total is limited to 100 items. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number`. */ - updateBranchProtection: { - (params?: RequestParameters & ReposUpdateBranchProtectionParams): Promise< - OctokitResponse - >; + getDiscussionInOrg: { + ( + params?: RequestParameters & TeamsGetDiscussionInOrgParams + ): Promise>; endpoint: EndpointInterface; }; - - updateCommitComment: { - (params?: RequestParameters & ReposUpdateCommitCommentParams): Promise< - OctokitResponse - >; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get a single discussion`](https://developer.github.com/v3/teams/discussions/#get-a-single-discussion) endpoint. + * + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.getDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy + */ + getDiscussionLegacy: { + ( + params?: RequestParameters & TeamsGetDiscussionLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Creates a new file or updates an existing file in a repository. - * @deprecated repos.updateFile() has been renamed to repos.createOrUpdateFile() (2019-06-07) + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [`Get team by name`](https://developer.github.com/v3/teams/#get-team-by-name) endpoint. + * @deprecated teams.getLegacy() is deprecated, see https://developer.github.com/v3/teams/#get-team-legacy */ - updateFile: { - (params?: RequestParameters & ReposUpdateFileParams): Promise< - OctokitResponse + getLegacy: { + (params?: RequestParameters & TeamsGetLegacyParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - - updateHook: { - (params?: RequestParameters & ReposUpdateHookParams): Promise< - OctokitResponse + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership](https://developer.github.com/v3/teams/members/#get-team-membership) endpoint instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + * @deprecated teams.getMember() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member-legacy + */ + getMember: { + (params?: RequestParameters & TeamsGetMemberParams): Promise< + AnyResponse >; endpoint: EndpointInterface; }; - - updateInformationAboutPagesSite: { + /** + * The "Get team member" endpoint (described below) is deprecated. + * + * We recommend using the [Get team membership](https://developer.github.com/v3/teams/members/#get-team-membership) endpoint instead. It allows you to get both active and pending memberships. + * + * To list members in a team, the team must be visible to the authenticated user. + * @deprecated teams.getMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member-legacy + */ + getMemberLegacy: { ( - params?: RequestParameters & ReposUpdateInformationAboutPagesSiteParams + params?: RequestParameters & TeamsGetMemberLegacyParams ): Promise; endpoint: EndpointInterface; }; - - updateInvitation: { - (params?: RequestParameters & ReposUpdateInvitationParams): Promise< - OctokitResponse - >; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get team membership`](https://developer.github.com/v3/teams/members/#get-team-membership) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team). + * @deprecated teams.getMembership() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-membership-legacy + */ + getMembership: { + ( + params?: RequestParameters & TeamsGetMembershipParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * Team members will include the members of child teams. * - * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * To get a user's membership with a team, the team must be visible to the authenticated user. * - * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/memberships/:username`. + * + * **Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team). */ - updateProtectedBranchPullRequestReviewEnforcement: { + getMembershipInOrg: { ( - params?: RequestParameters & - ReposUpdateProtectedBranchPullRequestReviewEnforcementParams - ): Promise< - OctokitResponse< - ReposUpdateProtectedBranchPullRequestReviewEnforcementResponse - > - >; + params?: RequestParameters & TeamsGetMembershipInOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Protected branches are available in public repositories with GitHub Free, and in public and private repositories with GitHub Pro, GitHub Team, and GitHub Enterprise Cloud. For more information, see [GitHub's billing plans](https://help.github.com/articles/github-s-billing-plans) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Get team membership`](https://developer.github.com/v3/teams/members/#get-team-membership) endpoint. * - * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team). + * @deprecated teams.getMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-membership-legacy */ - updateProtectedBranchRequiredStatusChecks: { + getMembershipLegacy: { ( - params?: RequestParameters & - ReposUpdateProtectedBranchRequiredStatusChecksParams - ): Promise< - OctokitResponse - >; + params?: RequestParameters & TeamsGetMembershipLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Users with push access to the repository can edit a release. + * Lists all teams in an organization that are visible to the authenticated user. */ - updateRelease: { - (params?: RequestParameters & ReposUpdateReleaseParams): Promise< - OctokitResponse + list: { + (params?: RequestParameters & TeamsListParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Users with push access to the repository can edit a release asset. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://developer.github.com/v3/teams/#list-child-teams) endpoint. + * + * + * @deprecated teams.listChild() is deprecated, see https://developer.github.com/v3/teams/#list-child-teams-legacy */ - updateReleaseAsset: { - (params?: RequestParameters & ReposUpdateReleaseAssetParams): Promise< - OctokitResponse + listChild: { + (params?: RequestParameters & TeamsListChildParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * This endpoint makes use of [a Hypermedia relation](https://developer.github.com/v3/#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in the response of the [Create a release endpoint](https://developer.github.com/v3/repos/releases/#create-a-release) to upload a release asset. - * - * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: - * - * `application/zip` + * Lists the child teams of the team requested by `:team_slug`. * - * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, you'll still need to pass your authentication to be able to upload an asset. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/teams`. */ - uploadReleaseAsset: { - (params?: RequestParameters & ReposUploadReleaseAssetParams): Promise< - OctokitResponse - >; + listChildInOrg: { + ( + params?: RequestParameters & TeamsListChildInOrgParams + ): Promise>; endpoint: EndpointInterface; }; - }; - search: { /** - * Find file contents via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * **Note:** You must [authenticate](https://developer.github.com/v3/#authentication) to search for code across all public repositories. - * - * **Considerations for code search** - * - * Due to the complexity of searching code, there are a few restrictions on how searches are performed: - * - * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. - * * Only files smaller than 384 KB are searchable. - * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://developer.github.com/v3/teams/#list-child-teams) endpoint. * - * Suppose you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery). Your query would look something like this: * - * Here, we're searching for the keyword `addClass` within a file's contents. We're making sure that we're only looking in files where the language is JavaScript. And we're scoping the search to the `repo:jquery/jquery` repository. + * @deprecated teams.listChildLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-child-teams-legacy */ - code: { - (params?: RequestParameters & SearchCodeParams): Promise< - OctokitResponse - >; + listChildLegacy: { + ( + params?: RequestParameters & TeamsListChildLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Find commits via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for commits, you can get text match metadata for the **message** field when you provide the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * **Considerations for commit search** - * - * Only the _default branch_ is considered. In most cases, this will be the `master` branch. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List comments`](https://developer.github.com/v3/teams/discussion_comments/#list-comments) endpoint. * - * Suppose you want to find commits related to CSS in the [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository. Your query would look something like this: + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.listDiscussionComments() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy */ - commits: { - (params?: RequestParameters & SearchCommitsParams): Promise< - OctokitResponse - >; + listDiscussionComments: { + ( + params?: RequestParameters & + TeamsListDiscussionCommentsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. - * @deprecated search.issues() has been renamed to search.issuesAndPullRequests() (2018-12-27) + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments`. */ - issues: { - (params?: RequestParameters & SearchIssuesParams): Promise< - OctokitResponse + listDiscussionCommentsInOrg: { + ( + params?: RequestParameters & + TeamsListDiscussionCommentsInOrgParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Find issues by state and keyword. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for issues, you can get text match metadata for the issue **title**, issue **body**, and issue **comment body** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * Let's say you want to find the oldest unresolved Python bugs on Windows. Your query might look something like this. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List comments`](https://developer.github.com/v3/teams/discussion_comments/#list-comments) endpoint. * - * In this query, we're searching for the keyword `windows`, within any open issue that's labeled as `bug`. The search runs across repositories whose primary language is Python. We’re sorting by creation date in ascending order, so that the oldest issues appear first in the search results. + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.listDiscussionCommentsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy */ - issuesAndPullRequests: { - (params?: RequestParameters & SearchIssuesAndPullRequestsParams): Promise< - OctokitResponse + listDiscussionCommentsLegacy: { + ( + params?: RequestParameters & + TeamsListDiscussionCommentsLegacyParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for labels, you can get text match metadata for the label **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * Suppose you want to find labels in the `linguist` repository that match `bug`, `defect`, or `enhancement`. Your query might look like this: + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://developer.github.com/v3/teams/discussions/#list-discussions) endpoint. * - * The labels that best match for the query appear first in the search results. + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.listDiscussions() is deprecated, see https://developer.github.com/v3/teams/discussions/#list-discussions-legacy */ - labels: { - (params?: RequestParameters & SearchLabelsParams): Promise< - OctokitResponse - >; + listDiscussions: { + ( + params?: RequestParameters & TeamsListDiscussionsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Find repositories via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for repositories, you can get text match metadata for the **name** and **description** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * Suppose you want to search for popular Tetris repositories written in Assembly. Your query might look like this. - * - * You can search for multiple topics by adding more `topic:` instances, and including the `mercy-preview` header. For example: + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * In this request, we're searching for repositories with the word `tetris` in the name, the description, or the README. We're limiting the results to only find repositories where the primary language is Assembly. We're sorting by stars in descending order, so that the most popular repositories appear first in the search results. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions`. */ - repos: { - (params?: RequestParameters & SearchReposParams): Promise< - OctokitResponse - >; + listDiscussionsInOrg: { + ( + params?: RequestParameters & + TeamsListDiscussionsInOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List discussions`](https://developer.github.com/v3/teams/discussions/#list-discussions) endpoint. * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * See "[Searching topics](https://help.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * Suppose you want to search for topics related to Ruby that are featured on [https://github.com/topics](https://github.com/topics). Your query might look like this: - * - * In this request, we're searching for topics with the keyword `ruby`, and we're limiting the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. - * - * **Note:** A search for featured Ruby topics only has 6 total results, so a [Link header](https://developer.github.com/v3/#link-header) indicating pagination is not included in the response. + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.listDiscussionsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#list-discussions-legacy */ - topics: { - (params?: RequestParameters & SearchTopicsParams): Promise< - OctokitResponse - >; + listDiscussionsLegacy: { + ( + params?: RequestParameters & + TeamsListDiscussionsLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Find users via various criteria. This method returns up to 100 results [per page](https://developer.github.com/v3/#pagination). - * - * When searching for users, you can get text match metadata for the issue **login**, **email**, and **name** fields when you pass the `text-match` media type. For more details about highlighting search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://developer.github.com/v3/search/#text-match-metadata). - * - * Imagine you're looking for a list of popular users. You might try out this query: - * - * Here, we're looking at users with the name Tom. We're only interested in those with more than 42 repositories, and only if they have over 1,000 followers. + * List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://developer.github.com/apps/building-oauth-apps/). */ - users: { - (params?: RequestParameters & SearchUsersParams): Promise< - OctokitResponse + listForAuthenticatedUser: { + ( + params?: RequestParameters & + TeamsListForAuthenticatedUserParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; - }; - teams: { /** - * The "Add team member" API (described below) is deprecated. - * - * We recommend using the [Add team membership API](https://developer.github.com/v3/teams/members/#add-or-update-team-membership) instead. It allows you to invite new organization members to your teams. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be a team maintainer in the team they're changing or be an owner of the organization that the team is associated with. The person being added to the team must be a member of the team's organization. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://developer.github.com/v3/teams/members/#list-team-members) endpoint. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." - * @deprecated teams.addMember() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member + * Team members will include the members of child teams. + * @deprecated teams.listMembers() is deprecated, see https://developer.github.com/v3/teams/members/#list-team-members-legacy */ - addMember: { - (params?: RequestParameters & TeamsAddMemberParams): Promise< - OctokitResponse - >; + listMembers: { + ( + params?: RequestParameters & TeamsListMembersParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. - * - * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a maintainer of the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * Team members will include the members of child teams. * - * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. - * - * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a maintainer of the team. + * To list members in a team, the team must be visible to the authenticated user. */ - addOrUpdateMembership: { - (params?: RequestParameters & TeamsAddOrUpdateMembershipParams): Promise< - OctokitResponse - >; + listMembersInOrg: { + ( + params?: RequestParameters & TeamsListMembersInOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://developer.github.com/v3/teams/members/#list-team-members) endpoint. + * + * Team members will include the members of child teams. + * @deprecated teams.listMembersLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-team-members-legacy */ - addOrUpdateProject: { - (params?: RequestParameters & TeamsAddOrUpdateProjectParams): Promise< - OctokitResponse - >; + listMembersLegacy: { + ( + params?: RequestParameters & TeamsListMembersLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://developer.github.com/v3/teams/members/#list-pending-team-invitations) endpoint. * - * If you pass the `hellcat-preview` media type, you can modify repository permissions of child teams. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://developer.github.com/v3/#http-verbs)." + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * @deprecated teams.listPendingInvitations() is deprecated, see https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy */ - addOrUpdateRepo: { - (params?: RequestParameters & TeamsAddOrUpdateRepoParams): Promise< - AnyResponse - >; + listPendingInvitations: { + ( + params?: RequestParameters & + TeamsListPendingInvitationsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Note**: If you pass the `hellcat-preview` media type, repositories inherited through a parent team will be checked. + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. * - * You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://developer.github.com/v3/media/) via the `Accept` header: + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/invitations`. */ - checkManagesRepo: { - (params?: RequestParameters & TeamsCheckManagesRepoParams): Promise< - OctokitResponse + listPendingInvitationsInOrg: { + ( + params?: RequestParameters & + TeamsListPendingInvitationsInOrgParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * To create a team, the authenticated user must be a member or owner of `:org`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://developer.github.com/v3/teams/members/#list-pending-team-invitations) endpoint. + * + * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * @deprecated teams.listPendingInvitationsLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy */ - create: { + listPendingInvitationsLegacy: { ( - params?: RequestParameters & TeamsCreateParamsDeprecatedPermission - ): Promise>; - (params?: RequestParameters & TeamsCreateParams): Promise< - OctokitResponse + params?: RequestParameters & + TeamsListPendingInvitationsLegacyParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://developer.github.com/v3/teams/#list-team-projects) endpoint. * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * Lists the organization projects for a team. + * @deprecated teams.listProjects() is deprecated, see https://developer.github.com/v3/teams/#list-team-projects-legacy */ - createDiscussion: { - (params?: RequestParameters & TeamsCreateDiscussionParams): Promise< - OctokitResponse - >; + listProjects: { + ( + params?: RequestParameters & TeamsListProjectsParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * Lists the organization projects for a team. * - * This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/projects`. */ - createDiscussionComment: { + listProjectsInOrg: { ( - params?: RequestParameters & TeamsCreateDiscussionCommentParams - ): Promise>; + params?: RequestParameters & TeamsListProjectsInOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * To delete a team, the authenticated user must be a team maintainer or an owner of the org associated with the team. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://developer.github.com/v3/teams/#list-team-projects) endpoint. * - * If you are an organization owner and you pass the `hellcat-preview` media type, deleting a parent team will delete all of its child teams as well. + * Lists the organization projects for a team. + * @deprecated teams.listProjectsLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-projects-legacy */ - delete: { - (params?: RequestParameters & TeamsDeleteParams): Promise; + listProjectsLegacy: { + ( + params?: RequestParameters & TeamsListProjectsLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team repos`](https://developer.github.com/v3/teams/#list-team-repos) endpoint. + * @deprecated teams.listRepos() is deprecated, see https://developer.github.com/v3/teams/#list-team-repos-legacy */ - deleteDiscussion: { - (params?: RequestParameters & TeamsDeleteDiscussionParams): Promise< - AnyResponse + listRepos: { + (params?: RequestParameters & TeamsListReposParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/repos`. */ - deleteDiscussionComment: { + listReposInOrg: { ( - params?: RequestParameters & TeamsDeleteDiscussionCommentParams - ): Promise; + params?: RequestParameters & TeamsListReposInOrgParams + ): Promise>; endpoint: EndpointInterface; }; - - get: { - (params?: RequestParameters & TeamsGetParams): Promise< - OctokitResponse - >; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team repos`](https://developer.github.com/v3/teams/#list-team-repos) endpoint. + * @deprecated teams.listReposLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-repos-legacy + */ + listReposLegacy: { + ( + params?: RequestParameters & TeamsListReposLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership](https://developer.github.com/v3/teams/members/#remove-team-membership) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * @deprecated teams.removeMember() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member-legacy */ - getByName: { - (params?: RequestParameters & TeamsGetByNameParams): Promise< - OctokitResponse - >; + removeMember: { + ( + params?: RequestParameters & TeamsRemoveMemberParams + ): Promise; endpoint: EndpointInterface; }; /** - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership](https://developer.github.com/v3/teams/members/#remove-team-membership) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * @deprecated teams.removeMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member-legacy */ - getDiscussion: { - (params?: RequestParameters & TeamsGetDiscussionParams): Promise< - OctokitResponse - >; + removeMemberLegacy: { + ( + params?: RequestParameters & TeamsRemoveMemberLegacyParams + ): Promise; endpoint: EndpointInterface; }; /** - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team membership`](https://developer.github.com/v3/teams/members/#remove-team-membership) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * @deprecated teams.removeMembership() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-membership-legacy */ - getDiscussionComment: { - (params?: RequestParameters & TeamsGetDiscussionCommentParams): Promise< - OctokitResponse - >; + removeMembership: { + ( + params?: RequestParameters & TeamsRemoveMembershipParams + ): Promise; endpoint: EndpointInterface; }; /** - * The "Get team member" API (described below) is deprecated. + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * We recommend using the [Get team membership API](https://developer.github.com/v3/teams/members/#get-team-membership) instead. It allows you to get both active and pending memberships. + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * To list members in a team, the team must be visible to the authenticated user. - * @deprecated teams.getMember() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/memberships/:username`. */ - getMember: { - (params?: RequestParameters & TeamsGetMemberParams): Promise; + removeMembershipInOrg: { + ( + params?: RequestParameters & + TeamsRemoveMembershipInOrgParams + ): Promise; endpoint: EndpointInterface; }; /** - * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team membership`](https://developer.github.com/v3/teams/members/#remove-team-membership) endpoint. * - * To get a user's membership with a team, the team must be visible to the authenticated user. + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * **Note:** The `role` for organization owners returns as `maintainer`. For more information about `maintainer` roles, see [Create team](https://developer.github.com/v3/teams#create-team). + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * @deprecated teams.removeMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-membership-legacy */ - getMembership: { - (params?: RequestParameters & TeamsGetMembershipParams): Promise< - OctokitResponse - >; + removeMembershipLegacy: { + ( + params?: RequestParameters & + TeamsRemoveMembershipLegacyParams + ): Promise; endpoint: EndpointInterface; }; - - list: { - (params?: RequestParameters & TeamsListParams): Promise< - OctokitResponse - >; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team project`](https://developer.github.com/v3/teams/#remove-team-project) endpoint. + * + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + * @deprecated teams.removeProject() is deprecated, see https://developer.github.com/v3/teams/#remove-team-project-legacy + */ + removeProject: { + ( + params?: RequestParameters & TeamsRemoveProjectParams + ): Promise; endpoint: EndpointInterface; }; /** - * At this time, the `hellcat-preview` media type is required to use this endpoint. + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. This endpoint removes the project from the team, but does not delete the project. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/projects/:project_id`. */ - listChild: { - (params?: RequestParameters & TeamsListChildParams): Promise< - OctokitResponse - >; + removeProjectInOrg: { + ( + params?: RequestParameters & TeamsRemoveProjectInOrgParams + ): Promise; endpoint: EndpointInterface; }; /** - * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team project`](https://developer.github.com/v3/teams/#remove-team-project) endpoint. + * + * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + * @deprecated teams.removeProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-project-legacy */ - listDiscussionComments: { - (params?: RequestParameters & TeamsListDiscussionCommentsParams): Promise< - OctokitResponse - >; + removeProjectLegacy: { + ( + params?: RequestParameters & TeamsRemoveProjectLegacyParams + ): Promise; endpoint: EndpointInterface; }; /** - * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team repository`](https://developer.github.com/v3/teams/#remove-team-repository) endpoint. + * + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + * @deprecated teams.removeRepo() is deprecated, see https://developer.github.com/v3/teams/#remove-team-repository-legacy */ - listDiscussions: { - (params?: RequestParameters & TeamsListDiscussionsParams): Promise< - OctokitResponse - >; + removeRepo: { + ( + params?: RequestParameters & TeamsRemoveRepoParams + ): Promise; endpoint: EndpointInterface; }; /** - * List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://developer.github.com/apps/building-oauth-apps/). + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/:org_id/team/:team_id/repos/:owner/:repo`. */ - listForAuthenticatedUser: { + removeRepoInOrg: { ( - params?: RequestParameters & TeamsListForAuthenticatedUserParams - ): Promise>; + params?: RequestParameters & TeamsRemoveRepoInOrgParams + ): Promise; endpoint: EndpointInterface; }; /** - * If you pass the `hellcat-preview` media type, team members will include the members of child teams. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Remove team repository`](https://developer.github.com/v3/teams/#remove-team-repository) endpoint. + * + * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + * @deprecated teams.removeRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-repository-legacy */ - listMembers: { - (params?: RequestParameters & TeamsListMembersParams): Promise< - OctokitResponse - >; + removeRepoLegacy: { + ( + params?: RequestParameters & TeamsRemoveRepoLegacyParams + ): Promise; endpoint: EndpointInterface; }; /** - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Review a team project`](https://developer.github.com/v3/teams/#review-a-team-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * @deprecated teams.reviewProject() is deprecated, see https://developer.github.com/v3/teams/#review-a-team-project-legacy */ - listPendingInvitations: { - (params?: RequestParameters & TeamsListPendingInvitationsParams): Promise< - OctokitResponse - >; + reviewProject: { + ( + params?: RequestParameters & TeamsReviewProjectParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Lists the organization projects for a team. If you pass the `hellcat-preview` media type, the response will include projects inherited from a parent team. + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/projects/:project_id`. */ - listProjects: { - (params?: RequestParameters & TeamsListProjectsParams): Promise< - OctokitResponse - >; + reviewProjectInOrg: { + ( + params?: RequestParameters & TeamsReviewProjectInOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** - * **Note**: If you pass the `hellcat-preview` media type, the response will include any repositories inherited through a parent team. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Review a team project`](https://developer.github.com/v3/teams/#review-a-team-project) endpoint. + * + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * @deprecated teams.reviewProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#review-a-team-project-legacy */ - listRepos: { - (params?: RequestParameters & TeamsListReposParams): Promise< - OctokitResponse - >; + reviewProjectLegacy: { + ( + params?: RequestParameters & TeamsReviewProjectLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * The "Remove team member" API (described below) is deprecated. - * - * We recommend using the [Remove team membership endpoint](https://developer.github.com/v3/teams/members/#remove-team-membership) instead. It allows you to remove both active and pending memberships. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit team`](https://developer.github.com/v3/teams/#edit-team) endpoint. * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. * - * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * @deprecated teams.removeMember() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + * @deprecated teams.update() is deprecated, see https://developer.github.com/v3/teams/#edit-team-legacy */ - removeMember: { - (params?: RequestParameters & TeamsRemoveMemberParams): Promise< - AnyResponse + update: { + ( + params?: RequestParameters & + TeamsUpdateParamsDeprecatedPermission + ): Promise>; + (params?: RequestParameters & TeamsUpdateParams): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://help.github.com/articles/github-s-products) in the GitHub Help documentation. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit a discussion`](https://developer.github.com/v3/teams/discussions/#edit-a-discussion) endpoint. * - * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://help.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.updateDiscussion() is deprecated, see https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy */ - removeMembership: { - (params?: RequestParameters & TeamsRemoveMembershipParams): Promise< - AnyResponse - >; + updateDiscussion: { + ( + params?: RequestParameters & TeamsUpdateDiscussionParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Removes an organization project from a team. An organization owner or a team maintainer can remove any project from the team. To remove a project from a team as an organization member, the authenticated user must have `read` access to both the team and project, or `admin` access to the team or project. **Note:** This endpoint removes the project from the team, but does not delete it. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit a comment`](https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.updateDiscussionComment() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy */ - removeProject: { - (params?: RequestParameters & TeamsRemoveProjectParams): Promise< - AnyResponse + updateDiscussionComment: { + ( + params?: RequestParameters & + TeamsUpdateDiscussionCommentParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number`. */ - removeRepo: { - (params?: RequestParameters & TeamsRemoveRepoParams): Promise< - AnyResponse + updateDiscussionCommentInOrg: { + ( + params?: RequestParameters & + TeamsUpdateDiscussionCommentInOrgParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. If you pass the `hellcat-preview` media type, the response will include projects inherited from a parent team. + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit a comment`](https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment) endpoint. + * + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.updateDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy */ - reviewProject: { - (params?: RequestParameters & TeamsReviewProjectParams): Promise< - OctokitResponse + updateDiscussionCommentLegacy: { + ( + params?: RequestParameters & + TeamsUpdateDiscussionCommentLegacyParams + ): Promise< + OctokitResponse >; endpoint: EndpointInterface; }; /** - * To edit a team, the authenticated user must either be an owner of the org that the team is associated with, or a maintainer of the team. + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/:org_id/team/:team_id/discussions/:discussion_number`. */ - update: { + updateDiscussionInOrg: { ( - params?: RequestParameters & TeamsUpdateParamsDeprecatedPermission - ): Promise>; - (params?: RequestParameters & TeamsUpdateParams): Promise< - OctokitResponse - >; + params?: RequestParameters & + TeamsUpdateDiscussionInOrgParams + ): Promise>; endpoint: EndpointInterface; }; /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit a discussion`](https://developer.github.com/v3/teams/discussions/#edit-a-discussion) endpoint. + * * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * @deprecated teams.updateDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy */ - updateDiscussion: { - (params?: RequestParameters & TeamsUpdateDiscussionParams): Promise< - OctokitResponse - >; + updateDiscussionLegacy: { + ( + params?: RequestParameters & + TeamsUpdateDiscussionLegacyParams + ): Promise>; endpoint: EndpointInterface; }; /** - * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/:org_id/team/:team_id`. */ - updateDiscussionComment: { + updateInOrg: { ( - params?: RequestParameters & TeamsUpdateDiscussionCommentParams - ): Promise>; + params?: RequestParameters & + TeamsUpdateInOrgParamsDeprecatedPermission + ): Promise>; + ( + params?: RequestParameters & TeamsUpdateInOrgParams + ): Promise>; + + endpoint: EndpointInterface; + }; + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Edit team`](https://developer.github.com/v3/teams/#edit-team) endpoint. + * + * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * + * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + * @deprecated teams.updateLegacy() is deprecated, see https://developer.github.com/v3/teams/#edit-team-legacy + */ + updateLegacy: { + ( + params?: RequestParameters & + TeamsUpdateLegacyParamsDeprecatedPermission + ): Promise>; + ( + params?: RequestParameters & TeamsUpdateLegacyParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35087,7 +40122,9 @@ export type RestEndpointMethods = { }; block: { - (params?: RequestParameters & UsersBlockParams): Promise; + (params?: RequestParameters & UsersBlockParams): Promise< + AnyResponse + >; endpoint: EndpointInterface; }; @@ -35097,25 +40134,26 @@ export type RestEndpointMethods = { * If the user is not blocked: */ checkBlocked: { - (params?: RequestParameters & UsersCheckBlockedParams): Promise< - AnyResponse - >; + ( + params?: RequestParameters & UsersCheckBlockedParams + ): Promise; endpoint: EndpointInterface; }; checkFollowing: { - (params?: RequestParameters & UsersCheckFollowingParams): Promise< - AnyResponse - >; + ( + params?: RequestParameters & UsersCheckFollowingParams + ): Promise; endpoint: EndpointInterface; }; checkFollowingForUser: { - (params?: RequestParameters & UsersCheckFollowingForUserParams): Promise< - AnyResponse - >; + ( + params?: RequestParameters & + UsersCheckFollowingForUserParams + ): Promise; endpoint: EndpointInterface; }; @@ -35123,9 +40161,9 @@ export type RestEndpointMethods = { * Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ createGpgKey: { - (params?: RequestParameters & UsersCreateGpgKeyParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersCreateGpgKeyParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35133,9 +40171,9 @@ export type RestEndpointMethods = { * Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ createPublicKey: { - (params?: RequestParameters & UsersCreatePublicKeyParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersCreatePublicKeyParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35143,9 +40181,9 @@ export type RestEndpointMethods = { * This endpoint is accessible with the `user` scope. */ deleteEmails: { - (params?: RequestParameters & UsersDeleteEmailsParams): Promise< - AnyResponse - >; + ( + params?: RequestParameters & UsersDeleteEmailsParams + ): Promise; endpoint: EndpointInterface; }; @@ -35153,9 +40191,9 @@ export type RestEndpointMethods = { * Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ deleteGpgKey: { - (params?: RequestParameters & UsersDeleteGpgKeyParams): Promise< - AnyResponse - >; + ( + params?: RequestParameters & UsersDeleteGpgKeyParams + ): Promise; endpoint: EndpointInterface; }; @@ -35163,9 +40201,9 @@ export type RestEndpointMethods = { * Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ deletePublicKey: { - (params?: RequestParameters & UsersDeletePublicKeyParams): Promise< - AnyResponse - >; + ( + params?: RequestParameters & UsersDeletePublicKeyParams + ): Promise; endpoint: EndpointInterface; }; @@ -35175,7 +40213,9 @@ export type RestEndpointMethods = { * Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ follow: { - (params?: RequestParameters & UsersFollowParams): Promise; + (params?: RequestParameters & UsersFollowParams): Promise< + AnyResponse + >; endpoint: EndpointInterface; }; @@ -35201,9 +40241,9 @@ export type RestEndpointMethods = { * The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://developer.github.com/v3/users/emails/)". */ getByUsername: { - (params?: RequestParameters & UsersGetByUsernameParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersGetByUsernameParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35213,9 +40253,9 @@ export type RestEndpointMethods = { * The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository via cURL, it would look like this: */ getContextForUser: { - (params?: RequestParameters & UsersGetContextForUserParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersGetContextForUserParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35233,9 +40273,9 @@ export type RestEndpointMethods = { * View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ getPublicKey: { - (params?: RequestParameters & UsersGetPublicKeyParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersGetPublicKeyParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35265,9 +40305,9 @@ export type RestEndpointMethods = { * Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ listEmails: { - (params?: RequestParameters & UsersListEmailsParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersListEmailsParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35284,9 +40324,10 @@ export type RestEndpointMethods = { }; listFollowersForUser: { - (params?: RequestParameters & UsersListFollowersForUserParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & + UsersListFollowersForUserParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35303,9 +40344,10 @@ export type RestEndpointMethods = { }; listFollowingForUser: { - (params?: RequestParameters & UsersListFollowingForUserParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & + UsersListFollowingForUserParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35313,9 +40355,9 @@ export type RestEndpointMethods = { * Lists the current user's GPG keys. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ listGpgKeys: { - (params?: RequestParameters & UsersListGpgKeysParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersListGpgKeysParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35323,9 +40365,9 @@ export type RestEndpointMethods = { * Lists the GPG keys for a user. This information is accessible by anyone. */ listGpgKeysForUser: { - (params?: RequestParameters & UsersListGpgKeysForUserParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersListGpgKeysForUserParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35333,9 +40375,9 @@ export type RestEndpointMethods = { * Lists your publicly visible email address, which you can set with the [Toggle primary email visibility](https://developer.github.com/v3/users/emails/#toggle-primary-email-visibility) endpoint. This endpoint is accessible with the `user:email` scope. */ listPublicEmails: { - (params?: RequestParameters & UsersListPublicEmailsParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersListPublicEmailsParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35343,9 +40385,9 @@ export type RestEndpointMethods = { * Lists the public SSH keys for the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ listPublicKeys: { - (params?: RequestParameters & UsersListPublicKeysParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersListPublicKeysParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35353,9 +40395,10 @@ export type RestEndpointMethods = { * Lists the _verified_ public SSH keys for a user. This is accessible by anyone. */ listPublicKeysForUser: { - (params?: RequestParameters & UsersListPublicKeysForUserParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & + UsersListPublicKeysForUserParams + ): Promise>; endpoint: EndpointInterface; }; @@ -35364,14 +40407,19 @@ export type RestEndpointMethods = { */ togglePrimaryEmailVisibility: { ( - params?: RequestParameters & UsersTogglePrimaryEmailVisibilityParams - ): Promise>; + params?: RequestParameters & + UsersTogglePrimaryEmailVisibilityParams + ): Promise< + OctokitResponse + >; endpoint: EndpointInterface; }; unblock: { - (params?: RequestParameters & UsersUnblockParams): Promise; + (params?: RequestParameters & UsersUnblockParams): Promise< + AnyResponse + >; endpoint: EndpointInterface; }; @@ -35379,7 +40427,9 @@ export type RestEndpointMethods = { * Unfollowing a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. */ unfollow: { - (params?: RequestParameters & UsersUnfollowParams): Promise; + (params?: RequestParameters & UsersUnfollowParams): Promise< + AnyResponse + >; endpoint: EndpointInterface; }; @@ -35387,9 +40437,9 @@ export type RestEndpointMethods = { * **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ updateAuthenticated: { - (params?: RequestParameters & UsersUpdateAuthenticatedParams): Promise< - OctokitResponse - >; + ( + params?: RequestParameters & UsersUpdateAuthenticatedParams + ): Promise>; endpoint: EndpointInterface; };