@octokit/webhooks-types
Version:
Generated TypeScript definitions based on community contributed JSON Schemas
1,715 lines (1,713 loc) • 221 kB
TypeScript
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Schema =
| BranchProtectionConfigurationEvent
| BranchProtectionRuleEvent
| CheckRunEvent
| CheckSuiteEvent
| CodeScanningAlertEvent
| CommitCommentEvent
| CreateEvent
| CustomPropertyEvent
| CustomPropertyValuesEvent
| DeleteEvent
| DependabotAlertEvent
| DeployKeyEvent
| DeploymentEvent
| DeploymentProtectionRuleEvent
| DeploymentReviewEvent
| DeploymentStatusEvent
| DiscussionEvent
| DiscussionCommentEvent
| ForkEvent
| GithubAppAuthorizationEvent
| GollumEvent
| InstallationEvent
| InstallationRepositoriesEvent
| InstallationTargetEvent
| IssueCommentEvent
| IssuesEvent
| LabelEvent
| MarketplacePurchaseEvent
| MemberEvent
| MembershipEvent
| MergeGroupEvent
| MetaEvent
| MilestoneEvent
| OrgBlockEvent
| OrganizationEvent
| PackageEvent
| PageBuildEvent
| PingEvent
| ProjectEvent
| ProjectCardEvent
| ProjectColumnEvent
| ProjectsV2ItemEvent
| PublicEvent
| PullRequestEvent
| PullRequestReviewEvent
| PullRequestReviewCommentEvent
| PullRequestReviewThreadEvent
| PushEvent
| RegistryPackageEvent
| ReleaseEvent
| RepositoryEvent
| RepositoryDispatchEvent
| RepositoryImportEvent
| RepositoryVulnerabilityAlertEvent
| SecretScanningAlertEvent
| SecretScanningAlertLocationEvent
| SecurityAdvisoryEvent
| SponsorshipEvent
| StarEvent
| StatusEvent
| TeamEvent
| TeamAddEvent
| WatchEvent
| WorkflowDispatchEvent
| WorkflowJobEvent
| WorkflowRunEvent;
export type BranchProtectionConfigurationEvent =
| BranchProtectionConfigurationDisabledEvent
| BranchProtectionConfigurationEnabledEvent;
export type BranchProtectionRuleEvent =
| BranchProtectionRuleCreatedEvent
| BranchProtectionRuleDeletedEvent
| BranchProtectionRuleEditedEvent;
export type BranchProtectionRuleEnforcementLevel =
| "off"
| "non_admins"
| "everyone";
export type BranchProtectionRuleNumber = number;
export type BranchProtectionRuleBoolean = boolean;
export type BranchProtectionRuleArray = string[];
export type CheckRunEvent =
| CheckRunCompletedEvent
| CheckRunCreatedEvent
| CheckRunRequestedActionEvent
| CheckRunRerequestedEvent;
export type CheckSuiteEvent =
| CheckSuiteCompletedEvent
| CheckSuiteRequestedEvent
| CheckSuiteRerequestedEvent;
export type CodeScanningAlertEvent =
| CodeScanningAlertAppearedInBranchEvent
| CodeScanningAlertClosedByUserEvent
| CodeScanningAlertCreatedEvent
| CodeScanningAlertFixedEvent
| CodeScanningAlertReopenedEvent
| CodeScanningAlertReopenedByUserEvent;
export type CommitCommentEvent = CommitCommentCreatedEvent;
/**
* How the author is associated with the repository.
*/
export type AuthorAssociation =
| "COLLABORATOR"
| "CONTRIBUTOR"
| "FIRST_TIMER"
| "FIRST_TIME_CONTRIBUTOR"
| "MANNEQUIN"
| "MEMBER"
| "NONE"
| "OWNER";
export type CustomPropertyEvent =
| CustomPropertyCreatedEvent
| CustomPropertyDeletedEvent;
export type CustomPropertyValuesEvent = CustomPropertyValuesUpdatedEvent;
export type DependabotAlertEvent =
| DependabotAlertCreatedEvent
| DependabotAlertDismissedEvent
| DependabotAlertFixedEvent
| DependabotAlertReintroducedEvent
| DependabotAlertReopenedEvent;
export type DeployKeyEvent = DeployKeyCreatedEvent | DeployKeyDeletedEvent;
export type DeploymentEvent = DeploymentCreatedEvent;
export type DeploymentProtectionRuleEvent =
DeploymentProtectionRuleRequestedEvent;
export type DeploymentReviewEvent =
| DeploymentReviewApprovedEvent
| DeploymentReviewRejectedEvent
| DeploymentReviewRequestedEvent;
export type DeploymentStatusEvent = DeploymentStatusCreatedEvent;
export type DiscussionEvent =
| DiscussionAnsweredEvent
| DiscussionCategoryChangedEvent
| DiscussionCreatedEvent
| DiscussionDeletedEvent
| DiscussionEditedEvent
| DiscussionLabeledEvent
| DiscussionLockedEvent
| DiscussionPinnedEvent
| DiscussionTransferredEvent
| DiscussionUnansweredEvent
| DiscussionUnlabeledEvent
| DiscussionUnlockedEvent
| DiscussionUnpinnedEvent;
export type DiscussionCommentEvent =
| DiscussionCommentCreatedEvent
| DiscussionCommentDeletedEvent
| DiscussionCommentEditedEvent;
export type GithubAppAuthorizationEvent = GithubAppAuthorizationRevokedEvent;
export type InstallationEvent =
| InstallationCreatedEvent
| InstallationDeletedEvent
| InstallationNewPermissionsAcceptedEvent
| InstallationSuspendEvent
| InstallationUnsuspendEvent;
export type InstallationRepositoriesEvent =
| InstallationRepositoriesAddedEvent
| InstallationRepositoriesRemovedEvent;
export type InstallationTargetEvent = InstallationTargetRenamedEvent;
export type IssueCommentEvent =
| IssueCommentCreatedEvent
| IssueCommentDeletedEvent
| IssueCommentEditedEvent;
export type IssuesEvent =
| IssuesAssignedEvent
| IssuesClosedEvent
| IssuesDeletedEvent
| IssuesDemilestonedEvent
| IssuesEditedEvent
| IssuesLabeledEvent
| IssuesLockedEvent
| IssuesMilestonedEvent
| IssuesOpenedEvent
| IssuesPinnedEvent
| IssuesReopenedEvent
| IssuesTransferredEvent
| IssuesUnassignedEvent
| IssuesUnlabeledEvent
| IssuesUnlockedEvent
| IssuesUnpinnedEvent;
export type LabelEvent =
| LabelCreatedEvent
| LabelDeletedEvent
| LabelEditedEvent;
export type MarketplacePurchaseEvent =
| MarketplacePurchaseCancelledEvent
| MarketplacePurchaseChangedEvent
| MarketplacePurchasePendingChangeEvent
| MarketplacePurchasePendingChangeCancelledEvent
| MarketplacePurchasePurchasedEvent;
export type MemberEvent =
| MemberAddedEvent
| MemberEditedEvent
| MemberRemovedEvent;
export type MembershipEvent = MembershipAddedEvent | MembershipRemovedEvent;
export type MergeGroupEvent =
| MergeGroupChecksRequestedEvent
| MergeGroupDestroyedEvent;
export type MetaEvent = MetaDeletedEvent;
export type WebhookEvents =
| (
| "branch_protection_rule"
| "check_run"
| "check_suite"
| "code_scanning_alert"
| "commit_comment"
| "create"
| "delete"
| "deployment"
| "deployment_status"
| "deploy_key"
| "discussion"
| "discussion_comment"
| "fork"
| "gollum"
| "issues"
| "issue_comment"
| "label"
| "member"
| "membership"
| "meta"
| "milestone"
| "organization"
| "org_block"
| "package"
| "page_build"
| "project"
| "projects_v2_item"
| "project_card"
| "project_column"
| "public"
| "pull_request"
| "pull_request_review"
| "pull_request_review_comment"
| "pull_request_review_thread"
| "push"
| "registry_package"
| "release"
| "repository"
| "repository_import"
| "repository_vulnerability_alert"
| "secret_scanning_alert"
| "secret_scanning_alert_location"
| "security_and_analysis"
| "star"
| "status"
| "team"
| "team_add"
| "watch"
| "workflow_job"
| "workflow_run"
)[]
| ["*"];
export type MilestoneEvent =
| MilestoneClosedEvent
| MilestoneCreatedEvent
| MilestoneDeletedEvent
| MilestoneEditedEvent
| MilestoneOpenedEvent;
export type OrgBlockEvent = OrgBlockBlockedEvent | OrgBlockUnblockedEvent;
export type OrganizationEvent =
| OrganizationDeletedEvent
| OrganizationMemberAddedEvent
| OrganizationMemberInvitedEvent
| OrganizationMemberRemovedEvent
| OrganizationRenamedEvent;
export type PackageEvent = PackagePublishedEvent | PackageUpdatedEvent;
export type ProjectEvent =
| ProjectClosedEvent
| ProjectCreatedEvent
| ProjectDeletedEvent
| ProjectEditedEvent
| ProjectReopenedEvent;
export type ProjectCardEvent =
| ProjectCardConvertedEvent
| ProjectCardCreatedEvent
| ProjectCardDeletedEvent
| ProjectCardEditedEvent
| ProjectCardMovedEvent;
export type ProjectColumnEvent =
| ProjectColumnCreatedEvent
| ProjectColumnDeletedEvent
| ProjectColumnEditedEvent
| ProjectColumnMovedEvent;
export type ProjectsV2ItemEvent =
| ProjectsV2ItemArchivedEvent
| ProjectsV2ItemConvertedEvent
| ProjectsV2ItemCreatedEvent
| ProjectsV2ItemDeletedEvent
| ProjectsV2ItemEditedEvent
| ProjectsV2ItemReorderedEvent
| ProjectsV2ItemRestoredEvent;
export type PullRequestEvent =
| PullRequestAssignedEvent
| PullRequestAutoMergeDisabledEvent
| PullRequestAutoMergeEnabledEvent
| PullRequestClosedEvent
| PullRequestConvertedToDraftEvent
| PullRequestDemilestonedEvent
| PullRequestDequeuedEvent
| PullRequestEditedEvent
| PullRequestEnqueuedEvent
| PullRequestLabeledEvent
| PullRequestLockedEvent
| PullRequestMilestonedEvent
| PullRequestOpenedEvent
| PullRequestReadyForReviewEvent
| PullRequestReopenedEvent
| PullRequestReviewRequestRemovedEvent
| PullRequestReviewRequestedEvent
| PullRequestSynchronizeEvent
| PullRequestUnassignedEvent
| PullRequestUnlabeledEvent
| PullRequestUnlockedEvent;
export type PullRequestReviewRequestRemovedEvent =
| {
action: "review_request_removed";
/**
* The pull request number.
*/
number: number;
pull_request: PullRequest;
requested_reviewer: User;
repository: Repository;
installation?: InstallationLite;
organization?: Organization;
sender: User;
}
| {
action: "review_request_removed";
/**
* The pull request number.
*/
number: number;
pull_request: PullRequest;
requested_team: Team;
repository: Repository;
installation?: InstallationLite;
organization?: Organization;
sender: User;
};
export type PullRequestReviewRequestedEvent =
| {
action: "review_requested";
/**
* The pull request number.
*/
number: number;
pull_request: PullRequest;
requested_reviewer: User;
repository: Repository;
installation?: InstallationLite;
organization?: Organization;
sender: User;
}
| {
action: "review_requested";
/**
* The pull request number.
*/
number: number;
pull_request: PullRequest;
requested_team: Team;
repository: Repository;
installation?: InstallationLite;
organization?: Organization;
sender: User;
};
export type PullRequestReviewEvent =
| PullRequestReviewDismissedEvent
| PullRequestReviewEditedEvent
| PullRequestReviewSubmittedEvent;
export type PullRequestReviewCommentEvent =
| PullRequestReviewCommentCreatedEvent
| PullRequestReviewCommentDeletedEvent
| PullRequestReviewCommentEditedEvent;
export type PullRequestReviewThreadEvent =
| PullRequestReviewThreadResolvedEvent
| PullRequestReviewThreadUnresolvedEvent;
export type RegistryPackageEvent =
| RegistryPackagePublishedEvent
| RegistryPackageUpdatedEvent;
export type ReleaseEvent =
| ReleaseCreatedEvent
| ReleaseDeletedEvent
| ReleaseEditedEvent
| ReleasePrereleasedEvent
| ReleasePublishedEvent
| ReleaseReleasedEvent
| ReleaseUnpublishedEvent;
export type RepositoryEvent =
| RepositoryArchivedEvent
| RepositoryCreatedEvent
| RepositoryDeletedEvent
| RepositoryEditedEvent
| RepositoryPrivatizedEvent
| RepositoryPublicizedEvent
| RepositoryRenamedEvent
| RepositoryTransferredEvent
| RepositoryUnarchivedEvent;
export type RepositoryVulnerabilityAlertEvent =
| RepositoryVulnerabilityAlertCreateEvent
| RepositoryVulnerabilityAlertDismissEvent
| RepositoryVulnerabilityAlertReopenEvent
| RepositoryVulnerabilityAlertResolveEvent;
export type SecretScanningAlertEvent =
| SecretScanningAlertCreatedEvent
| SecretScanningAlertReopenedEvent
| SecretScanningAlertResolvedEvent
| SecretScanningAlertRevokedEvent;
export type SecretScanningAlertLocationEvent =
SecretScanningAlertLocationCreatedEvent;
export type SecretScanningLocation =
| {
/**
* The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found.
*/
type: "commit";
details: SecretScanningLocationCommit;
}
| {
/**
* The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found.
*/
type: "issue_title";
details: SecretScanningLocationIssueTitle;
}
| {
/**
* The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found.
*/
type: "issue_body";
details: SecretScanningLocationIssueBody;
}
| {
/**
* The location type. Because secrets may be found in different types of resources (ie. code, comments, issues), this field identifies the type of resource where the secret was found.
*/
type: "issue_comment";
details: SecretScanningLocationIssueComment;
};
export type SecurityAdvisoryEvent =
| SecurityAdvisoryPerformedEvent
| SecurityAdvisoryPublishedEvent
| SecurityAdvisoryUpdatedEvent
| SecurityAdvisoryWithdrawnEvent;
export type SponsorshipEvent =
| SponsorshipCancelledEvent
| SponsorshipCreatedEvent
| SponsorshipEditedEvent
| SponsorshipPendingCancellationEvent
| SponsorshipPendingTierChangeEvent
| SponsorshipTierChangedEvent;
export type StarEvent = StarCreatedEvent | StarDeletedEvent;
export type TeamEvent =
| TeamAddedToRepositoryEvent
| TeamCreatedEvent
| TeamDeletedEvent
| TeamEditedEvent
| TeamRemovedFromRepositoryEvent;
export type WatchEvent = WatchStartedEvent;
export type WorkflowJobEvent =
| WorkflowJobCompletedEvent
| WorkflowJobInProgressEvent
| WorkflowJobQueuedEvent
| WorkflowJobWaitingEvent;
export type WorkflowStep =
| WorkflowStepInProgress
| WorkflowStepQueued
| WorkflowStepCompleted;
export type WorkflowRunEvent =
| WorkflowRunCompletedEvent
| WorkflowRunInProgressEvent
| WorkflowRunRequestedEvent;
export interface BranchProtectionConfigurationDisabledEvent {
action: "disabled";
installation?: InstallationLite;
organization?: Organization;
repository: Repository;
sender: User;
}
/**
* Installation
*/
export interface InstallationLite {
/**
* The ID of the installation.
*/
id: number;
node_id: string;
}
export interface Organization {
login: string;
id: number;
node_id: string;
url: string;
html_url?: string;
repos_url: string;
events_url: string;
hooks_url: string;
issues_url: string;
members_url: string;
public_members_url: string;
avatar_url: string;
description: string | null;
}
/**
* A git repository
*/
export interface Repository {
/**
* Unique identifier of the repository
*/
id: number;
/**
* The GraphQL identifier of the repository.
*/
node_id: string;
/**
* The name of the repository.
*/
name: string;
/**
* The full, globally unique, name of the repository.
*/
full_name: string;
/**
* Whether the repository is private or public.
*/
private: boolean;
owner: User;
/**
* The URL to view the repository on GitHub.com.
*/
html_url: string;
/**
* The repository description.
*/
description: string | null;
/**
* Whether the repository is a fork.
*/
fork: boolean;
/**
* The URL to get more information about the repository from the GitHub API.
*/
url: string;
/**
* The API URL to list the forks of the repository.
*/
forks_url: string;
/**
* A template for the API URL to get information about deploy keys on the repository.
*/
keys_url: string;
/**
* A template for the API URL to get information about collaborators of the repository.
*/
collaborators_url: string;
/**
* The API URL to list the teams on the repository.
*/
teams_url: string;
/**
* The API URL to list the hooks on the repository.
*/
hooks_url: string;
/**
* A template for the API URL to get information about issue events on the repository.
*/
issue_events_url: string;
/**
* The API URL to list the events of the repository.
*/
events_url: string;
/**
* A template for the API URL to list the available assignees for issues in the repository.
*/
assignees_url: string;
/**
* A template for the API URL to get information about branches in the repository.
*/
branches_url: string;
/**
* The API URL to get information about tags on the repository.
*/
tags_url: string;
/**
* A template for the API URL to create or retrieve a raw Git blob in the repository.
*/
blobs_url: string;
/**
* A template for the API URL to get information about Git tags of the repository.
*/
git_tags_url: string;
/**
* A template for the API URL to get information about Git refs of the repository.
*/
git_refs_url: string;
/**
* A template for the API URL to create or retrieve a raw Git tree of the repository.
*/
trees_url: string;
/**
* A template for the API URL to get information about statuses of a commit.
*/
statuses_url: string;
/**
* The API URL to get information about the languages of the repository.
*/
languages_url: string;
/**
* The API URL to list the stargazers on the repository.
*/
stargazers_url: string;
/**
* A template for the API URL to list the contributors to the repository.
*/
contributors_url: string;
/**
* The API URL to list the subscribers on the repository.
*/
subscribers_url: string;
/**
* The API URL to subscribe to notifications for this repository.
*/
subscription_url: string;
/**
* A template for the API URL to get information about commits on the repository.
*/
commits_url: string;
/**
* A template for the API URL to get information about Git commits of the repository.
*/
git_commits_url: string;
/**
* A template for the API URL to get information about comments on the repository.
*/
comments_url: string;
/**
* A template for the API URL to get information about issue comments on the repository.
*/
issue_comment_url: string;
/**
* A template for the API URL to get the contents of the repository.
*/
contents_url: string;
/**
* A template for the API URL to compare two commits or refs.
*/
compare_url: string;
/**
* The API URL to merge branches in the repository.
*/
merges_url: string;
/**
* A template for the API URL to download the repository as an archive.
*/
archive_url: string;
/**
* The API URL to list the downloads on the repository.
*/
downloads_url: string;
/**
* A template for the API URL to get information about issues on the repository.
*/
issues_url: string;
/**
* A template for the API URL to get information about pull requests on the repository.
*/
pulls_url: string;
/**
* A template for the API URL to get information about milestones of the repository.
*/
milestones_url: string;
/**
* A template for the API URL to get information about notifications on the repository.
*/
notifications_url: string;
/**
* A template for the API URL to get information about labels of the repository.
*/
labels_url: string;
/**
* A template for the API URL to get information about releases on the repository.
*/
releases_url: string;
/**
* The API URL to list the deployments of the repository.
*/
deployments_url: string;
created_at: number | string;
updated_at: string;
pushed_at: number | string | null;
git_url: string;
ssh_url: string;
clone_url: string;
svn_url: string;
homepage: string | null;
size: number;
stargazers_count: number;
watchers_count: number;
language: string | null;
/**
* Whether issues are enabled.
*/
has_issues: boolean;
/**
* Whether projects are enabled.
*/
has_projects: boolean;
/**
* Whether downloads are enabled.
*/
has_downloads: boolean;
/**
* Whether the wiki is enabled.
*/
has_wiki: boolean;
has_pages: boolean;
/**
* Whether discussions are enabled.
*/
has_discussions?: boolean;
forks_count: number;
mirror_url: string | null;
/**
* Whether the repository is archived.
*/
archived: boolean;
/**
* Returns whether or not this repository is disabled.
*/
disabled?: boolean;
open_issues_count: number;
license: License | null;
forks: number;
open_issues: number;
watchers: number;
stargazers?: number;
/**
* The default branch of the repository.
*/
default_branch: string;
/**
* Whether to allow squash merges for pull requests.
*/
allow_squash_merge?: 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 auto-merge for pull requests.
*/
allow_auto_merge?: boolean;
/**
* Whether to allow private forks
*/
allow_forking?: boolean;
allow_update_branch?: boolean;
use_squash_pr_title_as_default?: boolean;
squash_merge_commit_message?: string;
squash_merge_commit_title?: string;
merge_commit_message?: string;
merge_commit_title?: string;
is_template: boolean;
web_commit_signoff_required: boolean;
topics: string[];
visibility: "public" | "private" | "internal";
/**
* Whether to delete head branches when pull requests are merged
*/
delete_branch_on_merge?: boolean;
master_branch?: string;
permissions?: {
pull: boolean;
push: boolean;
admin: boolean;
maintain?: boolean;
triage?: boolean;
};
public?: boolean;
organization?: string;
custom_properties: {
[k: string]: null | string | string[];
};
}
export interface User {
login: string;
id: number;
node_id: string;
name?: string;
email?: string | null;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: string;
received_events_url: string;
type: "Bot" | "User" | "Organization";
site_admin: boolean;
}
export interface License {
key: string;
name: string;
spdx_id: string;
url: string | null;
node_id: string;
}
export interface BranchProtectionConfigurationEnabledEvent {
action: "enabled";
installation?: InstallationLite;
organization?: Organization;
repository: Repository;
sender: User;
}
/**
* Activity related to a branch protection rule. For more information, see "[About branch protection rules](https://docs.github.com/en/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules)."
*/
export interface BranchProtectionRuleCreatedEvent {
action: "created";
rule: BranchProtectionRule;
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
/**
* The branch protection rule. Includes a `name` and all the [branch protection settings](https://docs.github.com/en/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings.
*/
export interface BranchProtectionRule {
id: number;
repository_id: number;
name: string;
created_at: string;
updated_at: string;
pull_request_reviews_enforcement_level: BranchProtectionRuleEnforcementLevel;
required_approving_review_count: BranchProtectionRuleNumber;
dismiss_stale_reviews_on_push: BranchProtectionRuleBoolean;
require_code_owner_review: BranchProtectionRuleBoolean;
authorized_dismissal_actors_only: BranchProtectionRuleBoolean;
ignore_approvals_from_contributors: BranchProtectionRuleBoolean;
require_last_push_approval?: BranchProtectionRuleBoolean;
required_status_checks: BranchProtectionRuleArray;
required_status_checks_enforcement_level: BranchProtectionRuleEnforcementLevel;
strict_required_status_checks_policy: BranchProtectionRuleBoolean;
signature_requirement_enforcement_level: BranchProtectionRuleEnforcementLevel;
linear_history_requirement_enforcement_level: BranchProtectionRuleEnforcementLevel;
admin_enforced: BranchProtectionRuleBoolean;
create_protected?: BranchProtectionRuleBoolean;
allow_force_pushes_enforcement_level: BranchProtectionRuleEnforcementLevel;
allow_deletions_enforcement_level: BranchProtectionRuleEnforcementLevel;
merge_queue_enforcement_level: BranchProtectionRuleEnforcementLevel;
required_deployments_enforcement_level: BranchProtectionRuleEnforcementLevel;
required_conversation_resolution_level: BranchProtectionRuleEnforcementLevel;
authorized_actors_only: BranchProtectionRuleBoolean;
authorized_actor_names: BranchProtectionRuleArray;
}
/**
* Activity related to a branch protection rule. For more information, see "[About branch protection rules](https://docs.github.com/en/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules)."
*/
export interface BranchProtectionRuleDeletedEvent {
action: "deleted";
rule: BranchProtectionRule;
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
/**
* Activity related to a branch protection rule. For more information, see "[About branch protection rules](https://docs.github.com/en/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules)."
*/
export interface BranchProtectionRuleEditedEvent {
action: "edited";
rule: BranchProtectionRule;
/**
* If the action was `edited`, the changes to the rule.
*/
changes?: {
admin_enforced?: {
from: BranchProtectionRuleBoolean;
};
allow_deletions_enforcement_level?: {
from: BranchProtectionRuleEnforcementLevel | null;
};
allow_force_pushes_enforcement_level?: {
from: BranchProtectionRuleEnforcementLevel;
};
authorized_actors_only?: {
from: BranchProtectionRuleBoolean;
};
authorized_actor_names?: {
from: BranchProtectionRuleArray;
};
authorized_dismissal_actors_only?: {
from: BranchProtectionRuleBoolean | null;
};
dismiss_stale_reviews_on_push?: {
from: BranchProtectionRuleBoolean;
};
pull_request_reviews_enforcement_level?: {
from: BranchProtectionRuleEnforcementLevel;
};
require_code_owner_review?: {
from: BranchProtectionRuleBoolean;
};
required_approving_review_count?: {
from: BranchProtectionRuleNumber;
};
required_conversation_resolution_level?: {
from: BranchProtectionRuleEnforcementLevel;
};
required_deployments_enforcement_level?: {
from: BranchProtectionRuleEnforcementLevel;
};
required_status_checks?: {
from: BranchProtectionRuleArray;
};
required_status_checks_enforcement_level?: {
from: BranchProtectionRuleEnforcementLevel;
};
signature_requirement_enforcement_level?: {
from: BranchProtectionRuleEnforcementLevel;
};
linear_history_requirement_enforcement_level?: {
from: BranchProtectionRuleEnforcementLevel;
};
};
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
export interface CheckRunCompletedEvent {
action: "completed";
/**
* The [check_run](https://docs.github.com/en/rest/reference/checks#get-a-check-run).
*/
check_run: {
/**
* The id of the check.
*/
id: number;
node_id?: string;
/**
* The SHA of the commit that is being checked.
*/
head_sha: string;
external_id: string;
url: string;
html_url: string;
details_url?: string;
/**
* The current status of the check run. Can be `queued`, `in_progress`, or `completed`.
*/
status: "completed";
/**
* The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed.
*/
conclusion:
| "success"
| "failure"
| "neutral"
| "cancelled"
| "timed_out"
| "action_required"
| "stale"
| "skipped"
| null;
/**
* 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 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;
output: {
title?: string | null;
summary: string | null;
text: string | null;
annotations_count: number;
annotations_url: string;
};
/**
* The name of the check run.
*/
name: string;
check_suite: {
/**
* The id of the check suite that this check run is part of.
*/
id: number;
node_id?: string;
head_branch: string | null;
/**
* The SHA of the head commit that is being checked.
*/
head_sha: string;
status: "in_progress" | "completed" | "queued";
conclusion:
| "success"
| "failure"
| "neutral"
| "cancelled"
| "timed_out"
| "action_required"
| "stale"
| null;
url: string;
before: string | null;
after: string | null;
/**
* An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_branch`.
*
* **Note:**
*
* * The `head_sha` of the check suite can differ from the `sha` of the pull request if subsequent pushes are made into the PR.
* * When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty.
*/
pull_requests: CheckRunPullRequest[];
deployment?: CheckRunDeployment;
app: App;
created_at: string;
updated_at: string;
};
app: App;
pull_requests: CheckRunPullRequest[];
deployment?: CheckRunDeployment;
};
/**
* The action requested by the user.
*/
requested_action?: {
/**
* The integrator reference of the action requested by the user.
*/
identifier?: string;
} | null;
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
export interface CheckRunPullRequest {
url: string;
id: number;
number: number;
head: {
ref: string;
sha: string;
repo: RepoRef;
};
base: {
ref: string;
sha: string;
repo: RepoRef;
};
}
export interface RepoRef {
id: number;
url: string;
name: string;
}
/**
* A deployment to a repository environment. This will only be populated if the check run was created by a GitHub Actions workflow job that references an environment.
*/
export interface CheckRunDeployment {
url: string;
id: number;
node_id: string;
task: string;
original_environment: string;
environment: string;
description: string | null;
created_at: string;
updated_at: string;
statuses_url: string;
repository_url: string;
}
/**
* 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 App {
/**
* Unique identifier of the GitHub app
*/
id: number;
/**
* The slug name of the GitHub app
*/
slug?: string;
node_id: string;
owner: User;
/**
* The name of the GitHub app
*/
name: string;
description: string | null;
external_url: string;
html_url: string;
created_at: string;
updated_at: string;
/**
* The set of permissions for the GitHub app
*/
permissions?: {
actions?: "read" | "write";
administration?: "read" | "write";
blocking?: "read" | "write";
checks?: "read" | "write";
content_references?: "read" | "write";
contents?: "read" | "write";
deployments?: "read" | "write";
discussions?: "read" | "write";
emails?: "read" | "write";
environments?: "read" | "write";
followers?: "read" | "write";
gpg_keys?: "read" | "write";
interaction_limits?: "read" | "write";
issues?: "read" | "write";
keys?: "read" | "write";
members?: "read" | "write";
merge_queues?: "read" | "write";
metadata?: "read" | "write";
organization_administration?: "read" | "write";
organization_hooks?: "read" | "write";
organization_packages?: "read" | "write";
organization_plan?: "read" | "write";
organization_projects?: "read" | "write";
organization_secrets?: "read" | "write";
organization_self_hosted_runners?: "read" | "write";
organization_user_blocking?: "read" | "write";
packages?: "read" | "write";
pages?: "read" | "write";
plan?: "read" | "write";
pull_requests?: "read" | "write";
repository_hooks?: "read" | "write";
repository_projects?: "read" | "write";
secret_scanning_alerts?: "read" | "write";
secrets?: "read" | "write";
security_events?: "read" | "write";
security_scanning_alert?: "read" | "write";
single_file?: "read" | "write";
starring?: "read" | "write";
statuses?: "read" | "write";
team_discussions?: "read" | "write";
vulnerability_alerts?: "read" | "write";
watching?: "read" | "write";
workflows?: "read" | "write";
};
/**
* The list of events for the GitHub app
*/
events?: (
| "branch_protection_rule"
| "check_run"
| "check_suite"
| "code_scanning_alert"
| "commit_comment"
| "create"
| "delete"
| "dependabot_alert"
| "deployment"
| "deployment_protection_rule"
| "deployment_review"
| "deployment_status"
| "deploy_key"
| "discussion"
| "discussion_comment"
| "fork"
| "gollum"
| "issues"
| "issue_comment"
| "label"
| "member"
| "membership"
| "merge_group"
| "merge_queue_entry"
| "milestone"
| "organization"
| "org_block"
| "page_build"
| "project"
| "projects_v2_item"
| "project_card"
| "project_column"
| "public"
| "pull_request"
| "pull_request_review"
| "pull_request_review_comment"
| "pull_request_review_thread"
| "push"
| "registry_package"
| "release"
| "repository"
| "repository_dispatch"
| "repository_ruleset"
| "secret_scanning_alert"
| "secret_scanning_alert_location"
| "security_and_analysis"
| "star"
| "status"
| "team"
| "team_add"
| "watch"
| "workflow_dispatch"
| "workflow_job"
| "workflow_run"
)[];
}
export interface CheckRunCreatedEvent {
action: "created";
/**
* The [check_run](https://docs.github.com/en/rest/reference/checks#get-a-check-run).
*/
check_run: {
/**
* The id of the check.
*/
id: number;
node_id?: string;
/**
* The SHA of the commit that is being checked.
*/
head_sha: string;
external_id: string;
url: string;
html_url: string;
details_url?: string;
/**
* The current status of the check run. Can be `queued`, `in_progress`, or `completed`.
*/
status: "queued" | "in_progress" | "completed" | "waiting";
/**
* The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed.
*/
conclusion:
| "success"
| "failure"
| "neutral"
| "cancelled"
| "timed_out"
| "action_required"
| "stale"
| "skipped"
| null;
/**
* 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 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 | null;
output: {
title?: string | null;
summary: string | null;
text: string | null;
annotations_count: number;
annotations_url: string;
};
/**
* The name of the check run.
*/
name: string;
check_suite: {
/**
* The id of the check suite that this check run is part of.
*/
id: number;
node_id?: string;
head_branch: string | null;
/**
* The SHA of the head commit that is being checked.
*/
head_sha: string;
status: "queued" | "in_progress" | "completed";
conclusion:
| "success"
| "failure"
| "neutral"
| "cancelled"
| "timed_out"
| "action_required"
| "stale"
| null;
url: string;
before: string | null;
after: string | null;
/**
* An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_branch`.
*
* **Note:**
*
* * The `head_sha` of the check suite can differ from the `sha` of the pull request if subsequent pushes are made into the PR.
* * When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty.
*/
pull_requests: CheckRunPullRequest[];
deployment?: CheckRunDeployment;
app: App;
created_at: string;
updated_at: string;
};
app: App;
pull_requests: CheckRunPullRequest[];
deployment?: CheckRunDeployment;
};
/**
* The action requested by the user.
*/
requested_action?: {
/**
* The integrator reference of the action requested by the user.
*/
identifier?: string;
} | null;
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
export interface CheckRunRequestedActionEvent {
action: "requested_action";
/**
* The [check_run](https://docs.github.com/en/rest/reference/checks#get-a-check-run).
*/
check_run: {
/**
* The id of the check.
*/
id: number;
node_id?: string;
/**
* The SHA of the commit that is being checked.
*/
head_sha: string;
external_id: string;
url: string;
html_url: string;
details_url?: string;
/**
* The current status of the check run. Can be `queued`, `in_progress`, or `completed`.
*/
status: "queued" | "in_progress" | "completed";
/**
* The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed.
*/
conclusion:
| "success"
| "failure"
| "neutral"
| "cancelled"
| "timed_out"
| "action_required"
| "stale"
| "skipped"
| null;
/**
* 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 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 | null;
output: {
title?: string | null;
summary: string | null;
text: string | null;
annotations_count: number;
annotations_url: string;
};
/**
* The name of the check run.
*/
name: string;
check_suite: {
/**
* The id of the check suite that this check run is part of.
*/
id: number;
node_id?: string;
head_branch: string | null;
/**
* The SHA of the head commit that is being checked.
*/
head_sha: string;
status: "queued" | "in_progress" | "completed" | "waiting";
conclusion:
| "success"
| "failure"
| "neutral"
| "cancelled"
| "timed_out"
| "action_required"
| "stale"
| null;
url: string;
before: string | null;
after: string | null;
/**
* An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_branch`.
*
* **Note:**
*
* * The `head_sha` of the check suite can differ from the `sha` of the pull request if subsequent pushes are made into the PR.
* * When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty.
*/
pull_requests: CheckRunPullRequest[];
deployment?: CheckRunDeployment;
app: App;
created_at: string;
updated_at: string;
};
app: App;
pull_requests: CheckRunPullRequest[];
deployment?: CheckRunDeployment;
};
/**
* The action requested by the user.
*/
requested_action: {
/**
* The integrator reference of the action requested by the user.
*/
identifier?: string;
};
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
export interface CheckRunRerequestedEvent {
action: "rerequested";
/**
* The [check_run](https://docs.github.com/en/rest/reference/checks#get-a-check-run).
*/
check_run: {
/**
* The id of the check.
*/
id: number;
node_id?: string;
/**
* The SHA of the commit that is being checked.
*/
head_sha: string;
external_id: string;
url: string;
html_url: string;
details_url?: string;
/**
* The phase of the lifecycle that the check is currently in.
*/
status: "completed";
/**
* The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`.
*/
conclusion:
| "success"
| "failure"
| "neutral"
| "cancelled"
| "timed_out"
| "action_required"
| "stale"
| "skipped"
| null;
/**
* 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 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;
output: {
title?: string | null;
summary: string | null;
text: string | null;
annotations_count: number;
annotations_url: string;
};
/**
* The name of the check.
*/
name: string;
check_suite: {
/**
* The id of the check suite that this check run is part of.
*/
id: number;
node_id?: string;
head_branch: string | null;
/**
* The SHA of the head commit that is being checked.
*/
head_sha: string;
status: "completed";
conclusion:
| "success"
| "failure"
| "neutral"
| "cancelled"
| "timed_out"
| "action_required"
| "stale";
url: string;
before: string | null;
after: string | null;
/**
* An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_branch`.
*
* **Note:**
*
* * The `head_sha` of the check suite can differ from the `sha` of the pull request if subsequent pushes are made into the PR.
* * When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty.
*/
pull_requests: CheckRunPullRequest[];
deployment?: CheckRunDeployment;
app: App;
created_at: string;
updated_at: string;
};
app: App;
pull_requests: CheckRunPullRequest[];
deployment?: CheckRunDeployment;
};
/**
* The action requested by the user.
*/
requested_action?: {
/**
* The integrator reference of the action requested by the user.
*/
identifier?: string;
} | null;
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
export interface CheckSuiteCompletedEvent {
action: "completed";
/**
* The [check_suite](https://docs.github.com/en/rest/reference/checks#suites).
*/
check_suite: {
id: number;
node_id: string;
/**
* The head branch name the changes are on.
*/
head_branch: string | null;
/**
* The SHA of the head commit that is being checked.
*/
head_sha: string;
/**
* The summary status for all check runs that are part of the check suite. Can be `queued`, `requested`, `in_progress`, or `completed`.
*/
status: "requested" | "in_progress" | "completed" | "queued" | null;
/**
* The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has `completed`.
*/
conclusion:
| "success"
| "failure"
| "neutral"
| "cancelled"
| "timed_out"
| "action_required"
| "stale"
| null;
/**
* URL that points to the check suite API resource.
*/
url: string;
before: string | null;
after: string | null;
/**
* An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty.
*/
pull_requests: CheckRunPullRequest[];
app: App;
created_at: string;
updated_at: string;
runs_rerequestable?: boolean;
rerequestable?: boolean;
latest_check_runs_count: number;
check_runs_url: string;
head_commit: SimpleCommit;
};
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
export interface SimpleCommit {
id: string;
tree_id: string;
message: string;
timestamp: string;
author: Committer;
committer: Committer;
}
/**
* Metaproperties for Git author/committer information.
*/
export interface Committer {
/**
* The git author's name.
*/
name: string;
/**
* The git author's email address.
*/
email: string | null;
date?: string;
username?: string;
}
export interface CheckSuiteRequestedEvent {
action: "requested";
/**
* The [check_suite](https://docs.github.com/en/rest/reference/checks#suites).
*/
check_suite: {
id: number;
node_id: string;
/**
* The head branch name the changes are on.
*/
head_branch: string | null;
/**
* The SHA of the head commit that is being checked.
*/
head_sha: string;
/**
* The summary status for all check runs that are part of the check suite. Can be `queued`, `requested`, `in_progress`, or `completed`.
*/
status: "requested" | "in_progress" | "completed" | "queued" | null;
/**
* The summary conclusion for all check runs that are part of the check suite. Can be one of `success`, `failure`,` neutral`, `cancelled`, `timed_out`, `action_required` or `stale`. This value will be `null` until the check run has completed.
*/
conclusion:
| "success"
| "failure"
| "neutral"
| "cancelled"
| "timed_out"
| "action_required"
| "stale"
| null;
/**
* URL that points to the check suite API resource.
*/
url: string;
before: string | null;
after: string | null;
/**
* An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty.
*/
pull_requests: CheckRunPullRequest[];
app: App;
created_at: string;
updated_at: string;
runs_rerequestable?: boolean;
rerequestable?: boolean;
latest_check_runs_count: number;
check_runs_url: string;
head_commit: SimpleCommit;
};
repository: Repository;
sender: User;
installation?: InstallationLite;
organization?: Organization;
}
export interface CheckSuiteRerequestedEvent {
action: "rerequested";
/**
* The [check_suite](https://docs.github.com/en/rest/reference/checks#suites).
*/
check_suite: {
id: number;
node_id: string;
/**
* The head branch name the changes are on.
*/
head_branch: string | null;
/**
* The SHA of the head commit that is being checked.
*/
head_sha: string;
/**
* The summary status for all check runs that are part of the check suite. Can be `queued`, `requested`, `in_progress`, or `