import { tags } from "typia";
import { webhooks_nullable_string } from "./webhooks_nullable_string";
import { enterprise_minus_webhooks } from "./enterprise_minus_webhooks";
import { simple_minus_installation } from "./simple_minus_installation";
import { organization_minus_simple_minus_webhooks } from "./organization_minus_simple_minus_webhooks";
import { simple_minus_user_minus_webhooks } from "./simple_minus_user_minus_webhooks";
/**
 * @title push event
 */
export type webhook_minus_push = {
    /**
     * The SHA of the most recent commit on `ref` after the push.
     */
    after: string;
    base_ref: webhooks_nullable_string;
    /**
     * The SHA of the most recent commit on `ref` before the push.
     */
    before: string;
    /**
     * An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the `compare` between the `before` commit and the `after` commit.) The array includes a maximum of 2048 commits. If necessary, you can use the [Commits API](https://docs.github.com/rest/commits) to fetch additional commits.
     */
    commits: {
        /**
         * An array of files added in the commit. A maximum of 3000 changed files will be reported per commit.
         */
        added?: string[];
        /**
         * Metaproperties for Git author/committer information.
         *
         * @title Committer
         */
        author: {
            date?: string & tags.Format<"date-time">;
            email: (string & tags.Format<"email">) | null;
            /**
             * The git author's name.
             */
            name: string;
            username?: string;
        };
        /**
         * Metaproperties for Git author/committer information.
         *
         * @title Committer
         */
        committer: {
            date?: string & tags.Format<"date-time">;
            email: (string & tags.Format<"email">) | null;
            /**
             * The git author's name.
             */
            name: string;
            username?: string;
        };
        /**
         * Whether this commit is distinct from any that have been pushed before.
         */
        distinct: boolean;
        id: string;
        /**
         * The commit message.
         */
        message: string;
        /**
         * An array of files modified by the commit. A maximum of 3000 changed files will be reported per commit.
         */
        modified?: string[];
        /**
         * An array of files removed in the commit. A maximum of 3000 changed files will be reported per commit.
         */
        removed?: string[];
        /**
         * The ISO 8601 timestamp of the commit.
         */
        timestamp: string & tags.Format<"date-time">;
        tree_id: string;
        /**
         * URL that points to the commit API resource.
         */
        url: string & tags.Format<"uri">;
    }[];
    /**
     * URL that shows the changes in this `ref` update, from the `before` commit to the `after` commit. For a newly created `ref` that is directly based on the default branch, this is the comparison between the head of the default branch and the `after` commit. Otherwise, this shows all commits until the `after` commit.
     */
    compare: string;
    /**
     * Whether this push created the `ref`.
     */
    created: boolean;
    /**
     * Whether this push deleted the `ref`.
     */
    deleted: boolean;
    enterprise?: enterprise_minus_webhooks;
    /**
     * Whether this push was a force push of the `ref`.
     */
    forced: boolean;
    /**
     * @title Commit
     */
    head_commit: {
        /**
         * An array of files added in the commit.
         */
        added?: string[];
        /**
         * Metaproperties for Git author/committer information.
         *
         * @title Committer
         */
        author: {
            date?: string & tags.Format<"date-time">;
            email: (string & tags.Format<"email">) | null;
            /**
             * The git author's name.
             */
            name: string;
            username?: string;
        };
        /**
         * Metaproperties for Git author/committer information.
         *
         * @title Committer
         */
        committer: {
            date?: string & tags.Format<"date-time">;
            email: (string & tags.Format<"email">) | null;
            /**
             * The git author's name.
             */
            name: string;
            username?: string;
        };
        /**
         * Whether this commit is distinct from any that have been pushed before.
         */
        distinct: boolean;
        id: string;
        /**
         * The commit message.
         */
        message: string;
        /**
         * An array of files modified by the commit.
         */
        modified?: string[];
        /**
         * An array of files removed in the commit.
         */
        removed?: string[];
        /**
         * The ISO 8601 timestamp of the commit.
         */
        timestamp: string & tags.Format<"date-time">;
        tree_id: string;
        /**
         * URL that points to the commit API resource.
         */
        url: string & tags.Format<"uri">;
    } | null;
    installation?: simple_minus_installation;
    organization?: organization_minus_simple_minus_webhooks;
    /**
     * Metaproperties for Git author/committer information.
     *
     * @title Committer
     */
    pusher: {
        date?: string & tags.Format<"date-time">;
        email?: (string & tags.Format<"email">) | null;
        /**
         * The git author's name.
         */
        name: string;
        username?: string;
    };
    /**
     * The full git ref that was pushed. Example: `refs/heads/main` or `refs/tags/v3.14.1`.
     */
    ref: string;
    /**
     * A git repository
     *
     * @title Repository
     */
    repository: {
        /**
         * Whether to allow auto-merge for pull requests.
         */
        allow_auto_merge?: boolean;
        /**
         * Whether to allow private forks
         */
        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;
        allow_update_branch?: boolean;
        archive_url: string & tags.Format<"uri-template">;
        /**
         * Whether the repository is archived.
         */
        archived: boolean;
        assignees_url: string & tags.Format<"uri-template">;
        blobs_url: string & tags.Format<"uri-template">;
        branches_url: string & tags.Format<"uri-template">;
        clone_url: string & tags.Format<"uri">;
        collaborators_url: string & tags.Format<"uri-template">;
        comments_url: string & tags.Format<"uri-template">;
        commits_url: string & tags.Format<"uri-template">;
        compare_url: string & tags.Format<"uri-template">;
        contents_url: string & tags.Format<"uri-template">;
        contributors_url: string & tags.Format<"uri">;
        created_at: (number & tags.Type<"int32">) | (string & tags.Format<"date-time">);
        /**
         * The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.
         */
        custom_properties?: {};
        /**
         * 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 & tags.Format<"uri">;
        description: string | null;
        /**
         * Returns whether or not this repository is disabled.
         */
        disabled?: boolean;
        downloads_url: string & tags.Format<"uri">;
        events_url: string & tags.Format<"uri">;
        fork: boolean;
        forks: number & tags.Type<"int32">;
        forks_count: number & tags.Type<"int32">;
        forks_url: string & tags.Format<"uri">;
        full_name: string;
        git_commits_url: string & tags.Format<"uri-template">;
        git_refs_url: string & tags.Format<"uri-template">;
        git_tags_url: string & tags.Format<"uri-template">;
        git_url: string & tags.Format<"uri">;
        /**
         * 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;
        /**
         * Whether discussions are enabled.
         */
        has_discussions: boolean;
        homepage: string | null;
        hooks_url: string & tags.Format<"uri">;
        html_url: string & tags.Format<"uri">;
        /**
         * Unique identifier of the repository
         */
        id: number & tags.Type<"int32"> & tags.JsonSchemaPlugin<{
            format: "int64";
        }>;
        is_template?: boolean;
        issue_comment_url: string & tags.Format<"uri-template">;
        issue_events_url: string & tags.Format<"uri-template">;
        issues_url: string & tags.Format<"uri-template">;
        keys_url: string & tags.Format<"uri-template">;
        labels_url: string & tags.Format<"uri-template">;
        language: string | null;
        languages_url: string & tags.Format<"uri">;
        /**
         * @title License
         */
        license: {
            key: string;
            name: string;
            node_id: string;
            spdx_id: string;
            url: (string & tags.Format<"uri">) | null;
        } | null;
        master_branch?: string;
        merges_url: string & tags.Format<"uri">;
        milestones_url: string & tags.Format<"uri-template">;
        mirror_url: (string & tags.Format<"uri">) | null;
        /**
         * The name of the repository.
         */
        name: string;
        node_id: string;
        notifications_url: string & tags.Format<"uri-template">;
        open_issues: number & tags.Type<"int32">;
        open_issues_count: number & tags.Type<"int32">;
        organization?: string;
        /**
         * @title User
         */
        owner: {
            avatar_url?: string & tags.Format<"uri">;
            deleted?: boolean;
            email?: string | null;
            events_url?: string & tags.Format<"uri-template">;
            followers_url?: string & tags.Format<"uri">;
            following_url?: string & tags.Format<"uri-template">;
            gists_url?: string & tags.Format<"uri-template">;
            gravatar_id?: string;
            html_url?: string & tags.Format<"uri">;
            id: number & tags.Type<"int32">;
            login: string;
            name?: string;
            node_id?: string;
            organizations_url?: string & tags.Format<"uri">;
            received_events_url?: string & tags.Format<"uri">;
            repos_url?: string & tags.Format<"uri">;
            site_admin?: boolean;
            starred_url?: string & tags.Format<"uri-template">;
            subscriptions_url?: string & tags.Format<"uri">;
            type?: "Bot" | "User" | "Organization";
            url?: string & tags.Format<"uri">;
        } | null;
        permissions?: {
            admin: boolean;
            maintain?: boolean;
            pull: boolean;
            push: boolean;
            triage?: boolean;
        };
        /**
         * Whether the repository is private or public.
         */
        private: boolean;
        public?: boolean;
        pulls_url: string & tags.Format<"uri-template">;
        pushed_at: (number & tags.Type<"int32">) | (string & tags.Format<"date-time">) | null;
        releases_url: string & tags.Format<"uri-template">;
        role_name?: string | null;
        size: number & tags.Type<"int32">;
        ssh_url: string;
        stargazers?: number & tags.Type<"int32">;
        stargazers_count: number & tags.Type<"int32">;
        stargazers_url: string & tags.Format<"uri">;
        statuses_url: string & tags.Format<"uri-template">;
        subscribers_url: string & tags.Format<"uri">;
        subscription_url: string & tags.Format<"uri">;
        svn_url: string & tags.Format<"uri">;
        tags_url: string & tags.Format<"uri">;
        teams_url: string & tags.Format<"uri">;
        topics: string[];
        trees_url: string & tags.Format<"uri-template">;
        updated_at: string & tags.Format<"date-time">;
        url: string & tags.Format<"uri">;
        visibility: "public" | "private" | "internal";
        watchers: number & tags.Type<"int32">;
        watchers_count: number & tags.Type<"int32">;
        /**
         * Whether to require contributors to sign off on web-based commits
         */
        web_commit_signoff_required?: boolean;
    };
    sender?: simple_minus_user_minus_webhooks;
};
