/* eslint-disable no-use-before-define */ /** * Issue interface schema from Github. */ export interface Issue { active_lock_reason?: null | string; assignee: null | PurpleSimpleUser; assignees?: AssigneeElement[] | null; /** * How the author is associated with the repository. */ author_association: AuthorAssociation; /** * Contents of the issue */ body?: null | string; body_html?: string; body_text?: string; closed_at: Date | null; closed_by?: null | FluffySimpleUser; comments: number; comments_url: string; created_at: Date; draft?: boolean; events_url: string; html_url: string; id: number; /** * Labels to associate with this issue; pass one or more label names to replace the set of * labels on this issue; send an empty array to clear all labels from the issue; note that * the labels are silently dropped for users without push access to the repository */ labels: Array; labels_url: string; locked: boolean; milestone: null | Milestone; node_id: string; /** * Number uniquely identifying the issue within its repository */ number: number; performed_via_github_app?: null | GitHubApp; pull_request?: PullRequest; reactions?: ReactionRollup; /** * A repository on GitHub. */ repository?: Repository; repository_url: string; /** * State of the issue; either 'open' or 'closed' */ state: string; /** * The reason for the current state */ state_reason?: StateReason | null; timeline_url?: string; /** * Title of the issue */ title: string; updated_at: Date; /** * URL for the issue */ url: string; user: null | TentacledSimpleUser; [property: string]: unknown; } /** * A GitHub user. */ export interface PurpleSimpleUser { avatar_url: string; email?: null | string; events_url: string; followers_url: string; following_url: string; gists_url: string; gravatar_id: null | string; html_url: string; id: number; login: string; name?: null | string; node_id: string; organizations_url: string; received_events_url: string; repos_url: string; site_admin: boolean; starred_at?: string; starred_url: string; subscriptions_url: string; type: string; url: string; [property: string]: unknown; } /** * A GitHub user. */ export interface AssigneeElement { avatar_url: string; email?: null | string; events_url: string; followers_url: string; following_url: string; gists_url: string; gravatar_id: null | string; html_url: string; id: number; login: string; name?: null | string; node_id: string; organizations_url: string; received_events_url: string; repos_url: string; site_admin: boolean; starred_at?: string; starred_url: string; subscriptions_url: string; type: string; url: string; [property: string]: unknown; } /** * How the author is associated with the repository. */ export enum AuthorAssociation { Collaborator = 'COLLABORATOR', Contributor = 'CONTRIBUTOR', FirstTimeContributor = 'FIRST_TIME_CONTRIBUTOR', FirstTimer = 'FIRST_TIMER', Mannequin = 'MANNEQUIN', Member = 'MEMBER', None = 'NONE', Owner = 'OWNER', } /** * A GitHub user. */ export interface FluffySimpleUser { avatar_url: string; email?: null | string; events_url: string; followers_url: string; following_url: string; gists_url: string; gravatar_id: null | string; html_url: string; id: number; login: string; name?: null | string; node_id: string; organizations_url: string; received_events_url: string; repos_url: string; site_admin: boolean; starred_at?: string; starred_url: string; subscriptions_url: string; type: string; url: string; [property: string]: unknown; } export interface LabelObject { color?: null | string; default?: boolean; description?: null | string; id?: number; name?: string; node_id?: string; url?: string; [property: string]: unknown; } /** * A collection of related issues and pull requests. */ export interface Milestone { closed_at: Date | null; closed_issues: number; created_at: Date; creator: null | MilestoneSimpleUser; description: null | string; due_on: Date | null; html_url: string; id: number; labels_url: string; node_id: string; /** * The number of the milestone. */ number: number; open_issues: number; /** * The state of the milestone. */ state: State; /** * The title of the milestone. */ title: string; updated_at: Date; url: string; [property: string]: unknown; } /** * A GitHub user. */ export interface MilestoneSimpleUser { avatar_url: string; email?: null | string; events_url: string; followers_url: string; following_url: string; gists_url: string; gravatar_id: null | string; html_url: string; id: number; login: string; name?: null | string; node_id: string; organizations_url: string; received_events_url: string; repos_url: string; site_admin: boolean; starred_at?: string; starred_url: string; subscriptions_url: string; type: string; url: string; [property: string]: unknown; } /** * The state of the milestone. */ export enum State { Closed = 'closed', Open = 'open', } /** * GitHub apps are a new way to extend GitHub. They can be installed directly on * organizations and user accounts and granted access to specific repositories. They come * with granular permissions and built-in webhooks. GitHub apps are first class actors * within GitHub. */ export interface GitHubApp { client_id?: string; client_secret?: string; created_at: Date; description: null | string; /** * The list of events for the GitHub app */ events: string[]; external_url: string; html_url: string; /** * Unique identifier of the GitHub app */ id: number; /** * The number of installations associated with the GitHub app */ installations_count?: number; /** * The name of the GitHub app */ name: string; node_id: string; owner: null | GitHubAppSimpleUser; pem?: string; /** * The set of permissions for the GitHub app */ permissions: GitHubAppPermissions; /** * The slug name of the GitHub app */ slug?: string; updated_at: Date; webhook_secret?: null | string; [property: string]: unknown; } /** * A GitHub user. */ export interface GitHubAppSimpleUser { avatar_url: string; email?: null | string; events_url: string; followers_url: string; following_url: string; gists_url: string; gravatar_id: null | string; html_url: string; id: number; login: string; name?: null | string; node_id: string; organizations_url: string; received_events_url: string; repos_url: string; site_admin: boolean; starred_at?: string; starred_url: string; subscriptions_url: string; type: string; url: string; [property: string]: unknown; } /** * The set of permissions for the GitHub app */ export interface GitHubAppPermissions { checks?: string; contents?: string; deployments?: string; issues?: string; metadata?: string; } export interface PullRequest { diff_url: null | string; html_url: null | string; merged_at?: Date | null; patch_url: null | string; url: null | string; [property: string]: unknown; } export interface ReactionRollup { '+1': number; '-1': number; confused: number; eyes: number; heart: number; hooray: number; laugh: number; rocket: number; total_count: number; url: string; [property: string]: unknown; } /** * A repository on GitHub. */ export interface Repository { /** * Whether to allow Auto-merge to be used on pull requests. */ allow_auto_merge?: boolean; /** * Whether to allow forking this repo */ allow_forking?: boolean; /** * Whether to allow merge commits for pull requests. */ allow_merge_commit?: boolean; /** * Whether to allow rebase merges for pull requests. */ allow_rebase_merge?: boolean; /** * Whether to allow squash merges for pull requests. */ allow_squash_merge?: boolean; /** * Whether or not a pull request head branch that is behind its base branch can always be * updated even if it is not required to be up to date before merging. */ allow_update_branch?: boolean; /** * Whether anonymous git access is enabled for this repository */ anonymous_access_enabled?: boolean; archive_url: string; /** * Whether the repository is archived. */ 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: Date | null; /** * The default branch of the repository. */ default_branch: string; /** * Whether to delete head branches when pull requests are merged */ delete_branch_on_merge?: boolean; deployments_url: string; description: null | string; /** * Returns whether or not this repository disabled. */ disabled: boolean; downloads_url: string; events_url: string; fork: boolean; forks: number; forks_count: number; forks_url: string; full_name: string; git_commits_url: string; git_refs_url: string; git_tags_url: string; git_url: string; /** * Whether discussions are enabled. */ has_discussions?: boolean; /** * Whether downloads are enabled. */ has_downloads: boolean; /** * Whether issues are enabled. */ has_issues: boolean; has_pages: boolean; /** * Whether projects are enabled. */ has_projects: boolean; /** * Whether the wiki is enabled. */ has_wiki: boolean; homepage: null | string; hooks_url: string; html_url: string; /** * Unique identifier of the repository */ id: number; /** * Whether this repository acts as a template that can be used to generate new repositories. */ is_template?: boolean; issue_comment_url: string; issue_events_url: string; issues_url: string; keys_url: string; labels_url: string; language: null | string; languages_url: string; license: null | LicenseSimple; master_branch?: string; /** * The default value for a merge commit message. * * - `PR_TITLE` - default to the pull request's title. * - `PR_BODY` - default to the pull request's body. * - `BLANK` - default to a blank commit message. */ merge_commit_message?: MergeCommitMessage; /** * The default value for a merge commit title. * * - `PR_TITLE` - default to the pull request's title. * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull * request #123 from branch-name). */ merge_commit_title?: MergeCommitTitle; merges_url: string; milestones_url: string; mirror_url: null | string; /** * The name of the repository. */ name: string; network_count?: number; node_id: string; notifications_url: string; open_issues: number; open_issues_count: number; organization?: null | RepositorySimpleUser; /** * A GitHub user. */ owner: OwnerObject; permissions?: RepositoryPermissions; /** * Whether the repository is private or public. */ private: boolean; pulls_url: string; pushed_at: Date | null; releases_url: string; /** * The size of the repository. Size is calculated hourly. When a repository is initially * created, the size is 0. */ size: number; /** * The default value for a squash merge commit message: * * - `PR_BODY` - default to the pull request's body. * - `COMMIT_MESSAGES` - default to the branch's commit messages. * - `BLANK` - default to a blank commit message. */ squash_merge_commit_message?: SquashMergeCommitMessage; /** * The default value for a squash merge commit title: * * - `PR_TITLE` - default to the pull request's title. * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull * request's title (when more than one commit). */ squash_merge_commit_title?: SquashMergeCommitTitle; ssh_url: string; stargazers_count: number; stargazers_url: string; starred_at?: 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 | TemplateRepository; topics?: string[]; trees_url: string; updated_at: Date | null; url: string; /** * Whether a squash merge commit can use the pull request title as default. **This property * has been deprecated. Please use `squash_merge_commit_title` instead. */ use_squash_pr_title_as_default?: boolean; /** * The repository visibility: public, private, or internal. */ visibility?: string; watchers: number; watchers_count: number; /** * Whether to require contributors to sign off on web-based commits */ web_commit_signoff_required?: boolean; [property: string]: unknown; } /** * License Simple */ export interface LicenseSimple { html_url?: string; key: string; name: string; node_id: string; spdx_id: null | string; url: null | string; [property: string]: unknown; } /** * The default value for a merge commit message. * * - `PR_TITLE` - default to the pull request's title. * - `PR_BODY` - default to the pull request's body. * - `BLANK` - default to a blank commit message. */ export enum MergeCommitMessage { Blank = 'BLANK', PRBody = 'PR_BODY', PRTitle = 'PR_TITLE', } /** * The default value for a merge commit title. * * - `PR_TITLE` - default to the pull request's title. * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull * request #123 from branch-name). */ export enum MergeCommitTitle { MergeMessage = 'MERGE_MESSAGE', PRTitle = 'PR_TITLE', } /** * A GitHub user. */ export interface RepositorySimpleUser { avatar_url: string; email?: null | string; events_url: string; followers_url: string; following_url: string; gists_url: string; gravatar_id: null | string; html_url: string; id: number; login: string; name?: null | string; node_id: string; organizations_url: string; received_events_url: string; repos_url: string; site_admin: boolean; starred_at?: string; starred_url: string; subscriptions_url: string; type: string; url: string; [property: string]: unknown; } /** * A GitHub user. */ export interface OwnerObject { avatar_url: string; email?: null | string; events_url: string; followers_url: string; following_url: string; gists_url: string; gravatar_id: null | string; html_url: string; id: number; login: string; name?: null | string; node_id: string; organizations_url: string; received_events_url: string; repos_url: string; site_admin: boolean; starred_at?: string; starred_url: string; subscriptions_url: string; type: string; url: string; [property: string]: unknown; } export interface RepositoryPermissions { admin: boolean; maintain?: boolean; pull: boolean; push: boolean; triage?: boolean; [property: string]: unknown; } /** * The default value for a squash merge commit message: * * - `PR_BODY` - default to the pull request's body. * - `COMMIT_MESSAGES` - default to the branch's commit messages. * - `BLANK` - default to a blank commit message. */ export enum SquashMergeCommitMessage { Blank = 'BLANK', CommitMessages = 'COMMIT_MESSAGES', PRBody = 'PR_BODY', } /** * The default value for a squash merge commit title: * * - `PR_TITLE` - default to the pull request's title. * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull * request's title (when more than one commit). */ export enum SquashMergeCommitTitle { CommitOrPRTitle = 'COMMIT_OR_PR_TITLE', PRTitle = 'PR_TITLE', } export interface TemplateRepository { allow_auto_merge?: boolean; allow_merge_commit?: boolean; allow_rebase_merge?: boolean; allow_squash_merge?: boolean; allow_update_branch?: 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; delete_branch_on_merge?: boolean; 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?: string; languages_url?: string; /** * The default value for a merge commit message. * * - `PR_TITLE` - default to the pull request's title. * - `PR_BODY` - default to the pull request's body. * - `BLANK` - default to a blank commit message. */ merge_commit_message?: MergeCommitMessage; /** * The default value for a merge commit title. * * - `PR_TITLE` - default to the pull request's title. * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull * request #123 from branch-name). */ merge_commit_title?: MergeCommitTitle; 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?: Owner; permissions?: TemplateRepositoryPermissions; private?: boolean; pulls_url?: string; pushed_at?: string; releases_url?: string; size?: number; /** * The default value for a squash merge commit message: * * - `PR_BODY` - default to the pull request's body. * - `COMMIT_MESSAGES` - default to the branch's commit messages. * - `BLANK` - default to a blank commit message. */ squash_merge_commit_message?: SquashMergeCommitMessage; /** * The default value for a squash merge commit title: * * - `PR_TITLE` - default to the pull request's title. * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull * request's title (when more than one commit). */ squash_merge_commit_title?: SquashMergeCommitTitle; 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; topics?: string[]; trees_url?: string; updated_at?: string; url?: string; use_squash_pr_title_as_default?: boolean; visibility?: string; watchers_count?: number; [property: string]: unknown; } export interface Owner { 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; [property: string]: unknown; } export interface TemplateRepositoryPermissions { admin?: boolean; maintain?: boolean; pull?: boolean; push?: boolean; triage?: boolean; [property: string]: unknown; } export enum StateReason { Completed = 'completed', NotPlanned = 'not_planned', Reopened = 'reopened', } /** * A GitHub user. */ export interface TentacledSimpleUser { avatar_url: string; email?: null | string; events_url: string; followers_url: string; following_url: string; gists_url: string; gravatar_id: null | string; html_url: string; id: number; login: string; name?: null | string; node_id: string; organizations_url: string; received_events_url: string; repos_url: string; site_admin: boolean; starred_at?: string; starred_url: string; subscriptions_url: string; type: string; url: string; [property: string]: unknown; }