UNPKG

@ehubbell/gitty

Version:

A simple CLI that will fetch, store, and clone Github repos.

200 lines (199 loc) 6.61 kB
import { Octokit } from '@octokit/core'; interface GithubService { token: string; } declare class GithubService { constructor(props: { token: string; }); get client(): Octokit; getRepo(ownerId: string, repoId: string): Promise<{ status: number; data: any; message?: undefined; } | { status: any; message: any; data?: undefined; }>; getRepoZip(ownerId: string, repoId: string): Promise<{ status: number; data: any; message?: undefined; } | { status: any; message: any; data?: undefined; }>; getRepoVersionZip(ownerId: string, repoId: string, ref?: string): Promise<{ status: number; data: any; message?: undefined; } | { status: any; message: any; data?: undefined; }>; getOrgs(params?: {}): Promise<{ status: 200; data: { login: string; id: number; node_id: string; 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; }[]; message?: undefined; } | { status: any; message: any; data?: undefined; }>; createRepo(ownerId: string, data: any): Promise<{ status: number; data: any; message?: undefined; } | { status: any; message: any; data?: undefined; }>; createPersonalRepo(data: any): Promise<{ status: 201; data: { id: number; node_id: string; name: string; full_name: string; owner: import("@octokit/openapi-types").components["schemas"]["simple-user"]; private: boolean; html_url: string; description: string | null; fork: boolean; url: string; 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; downloads_url: string; events_url: string; forks_url: string; git_commits_url: string; git_refs_url: string; git_tags_url: string; git_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; notifications_url: string; 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; clone_url: string; mirror_url: string | null; hooks_url: string; svn_url: string; homepage: string | null; language: string | null; forks_count: number; stargazers_count: number; watchers_count: number; size: number; default_branch: string; open_issues_count: number; is_template?: boolean; topics?: string[]; has_issues: boolean; has_projects: boolean; has_wiki: boolean; has_pages: boolean; has_downloads?: boolean; has_discussions: boolean; archived: boolean; disabled: boolean; visibility?: string; pushed_at: string; created_at: string; updated_at: string; permissions?: { admin: boolean; maintain?: boolean; push: boolean; triage?: boolean; pull: boolean; }; allow_rebase_merge?: boolean; template_repository?: import("@octokit/openapi-types").components["schemas"]["nullable-repository"]; temp_clone_token?: string | null; allow_squash_merge?: boolean; allow_auto_merge?: boolean; delete_branch_on_merge?: boolean; allow_merge_commit?: boolean; allow_update_branch?: boolean; use_squash_pr_title_as_default?: boolean; squash_merge_commit_title?: "PR_TITLE" | "COMMIT_OR_PR_TITLE"; squash_merge_commit_message?: "PR_BODY" | "COMMIT_MESSAGES" | "BLANK"; merge_commit_title?: "PR_TITLE" | "MERGE_MESSAGE"; merge_commit_message?: "PR_BODY" | "PR_TITLE" | "BLANK"; allow_forking?: boolean; web_commit_signoff_required?: boolean; subscribers_count: number; network_count: number; license: import("@octokit/openapi-types").components["schemas"]["nullable-license-simple"]; organization?: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"]; parent?: import("@octokit/openapi-types").components["schemas"]["repository"]; source?: import("@octokit/openapi-types").components["schemas"]["repository"]; forks: number; master_branch?: string; open_issues: number; watchers: number; anonymous_access_enabled?: boolean; code_of_conduct?: import("@octokit/openapi-types").components["schemas"]["code-of-conduct-simple"]; security_and_analysis?: import("@octokit/openapi-types").components["schemas"]["security-and-analysis"]; custom_properties?: { [key: string]: unknown; }; }; message?: undefined; } | { status: any; message: any; data?: undefined; }>; createOrgRepo(ownerId: string, data: any): Promise<{ status: number; data: any; message?: undefined; } | { status: any; message: any; data?: undefined; }>; } export { GithubService };