octokit-plugin-create-pull-request
Version:
Octokit plugin to create a pull request with multiple file changes
692 lines (691 loc) • 23.9 kB
TypeScript
import type { Octokit } from "@octokit/core";
import type { Options } from "./types.js";
export declare function composeCreatePullRequest(octokit: Octokit, { owner, repo, title, body, base, head, createWhenEmpty, changes: changesOption, draft, labels, forceFork, update, }: Options): Promise<import("@octokit/types").OctokitResponse<{
url: string;
id: number;
node_id: string;
html_url: string;
diff_url: string;
patch_url: string;
issue_url: string;
commits_url: string;
review_comments_url: string;
review_comment_url: string;
comments_url: string;
statuses_url: string;
number: number;
state: "open" | "closed";
locked: boolean;
title: string;
user: import("@octokit/openapi-types").components["schemas"]["simple-user"];
body: string | null;
labels: {
id: number;
node_id: string;
url: string;
name: string;
description: string | null;
color: string;
default: boolean;
}[];
milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"];
active_lock_reason?: string | null;
created_at: string;
updated_at: string;
closed_at: string | null;
merged_at: string | null;
merge_commit_sha: string | null;
assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"];
assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null;
requested_reviewers?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null;
requested_teams?: import("@octokit/openapi-types").components["schemas"]["team-simple"][] | null;
head: {
label: string;
ref: string;
repo: {
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 | null;
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;
html_url: string;
id: number;
node_id: 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;
notifications_url: string;
owner: {
avatar_url: string;
events_url: string;
followers_url: string;
following_url: string;
gists_url: string;
gravatar_id: string | null;
html_url: string;
id: number;
node_id: string;
login: string;
organizations_url: string;
received_events_url: string;
repos_url: string;
site_admin: boolean;
starred_url: string;
subscriptions_url: string;
type: string;
url: string;
};
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;
url: string;
clone_url: string;
default_branch: string;
forks: number;
forks_count: number;
git_url: string;
has_downloads: boolean;
has_issues: boolean;
has_projects: boolean;
has_wiki: boolean;
has_pages: boolean;
has_discussions: boolean;
homepage: string | null;
language: string | null;
master_branch?: string;
archived: boolean;
disabled: boolean;
visibility?: string;
mirror_url: string | null;
open_issues: number;
open_issues_count: number;
permissions?: {
admin: boolean;
maintain?: boolean;
push: boolean;
triage?: boolean;
pull: boolean;
};
temp_clone_token?: string;
allow_merge_commit?: boolean;
allow_squash_merge?: boolean;
allow_rebase_merge?: boolean;
license: {
key: string;
name: string;
url: string | null;
spdx_id: string | null;
node_id: string;
} | null;
pushed_at: string;
size: number;
ssh_url: string;
stargazers_count: number;
svn_url: string;
topics?: string[];
watchers: number;
watchers_count: number;
created_at: string;
updated_at: string;
allow_forking?: boolean;
is_template?: boolean;
web_commit_signoff_required?: boolean;
} | null;
sha: string;
user: {
avatar_url: string;
events_url: string;
followers_url: string;
following_url: string;
gists_url: string;
gravatar_id: string | null;
html_url: string;
id: number;
node_id: string;
login: string;
organizations_url: string;
received_events_url: string;
repos_url: string;
site_admin: boolean;
starred_url: string;
subscriptions_url: string;
type: string;
url: string;
};
};
base: {
label: string;
ref: string;
repo: {
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 | null;
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;
html_url: string;
id: number;
is_template?: boolean;
node_id: 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;
notifications_url: string;
owner: {
avatar_url: string;
events_url: string;
followers_url: string;
following_url: string;
gists_url: string;
gravatar_id: string | null;
html_url: string;
id: number;
node_id: string;
login: string;
organizations_url: string;
received_events_url: string;
repos_url: string;
site_admin: boolean;
starred_url: string;
subscriptions_url: string;
type: string;
url: string;
};
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;
url: string;
clone_url: string;
default_branch: string;
forks: number;
forks_count: number;
git_url: string;
has_downloads: boolean;
has_issues: boolean;
has_projects: boolean;
has_wiki: boolean;
has_pages: boolean;
has_discussions: boolean;
homepage: string | null;
language: string | null;
master_branch?: string;
archived: boolean;
disabled: boolean;
visibility?: string;
mirror_url: string | null;
open_issues: number;
open_issues_count: number;
permissions?: {
admin: boolean;
maintain?: boolean;
push: boolean;
triage?: boolean;
pull: boolean;
};
temp_clone_token?: string;
allow_merge_commit?: boolean;
allow_squash_merge?: boolean;
allow_rebase_merge?: boolean;
license: import("@octokit/openapi-types").components["schemas"]["nullable-license-simple"];
pushed_at: string;
size: number;
ssh_url: string;
stargazers_count: number;
svn_url: string;
topics?: string[];
watchers: number;
watchers_count: number;
created_at: string;
updated_at: string;
allow_forking?: boolean;
web_commit_signoff_required?: boolean;
};
sha: string;
user: {
avatar_url: string;
events_url: string;
followers_url: string;
following_url: string;
gists_url: string;
gravatar_id: string | null;
html_url: string;
id: number;
node_id: string;
login: string;
organizations_url: string;
received_events_url: string;
repos_url: string;
site_admin: boolean;
starred_url: string;
subscriptions_url: string;
type: string;
url: string;
};
};
_links: {
comments: import("@octokit/openapi-types").components["schemas"]["link"];
commits: import("@octokit/openapi-types").components["schemas"]["link"];
statuses: import("@octokit/openapi-types").components["schemas"]["link"];
html: import("@octokit/openapi-types").components["schemas"]["link"];
issue: import("@octokit/openapi-types").components["schemas"]["link"];
review_comments: import("@octokit/openapi-types").components["schemas"]["link"];
review_comment: import("@octokit/openapi-types").components["schemas"]["link"];
self: import("@octokit/openapi-types").components["schemas"]["link"];
};
author_association: import("@octokit/openapi-types").components["schemas"]["author-association"];
auto_merge: import("@octokit/openapi-types").components["schemas"]["auto-merge"];
draft?: boolean;
merged: boolean;
mergeable: boolean | null;
rebaseable?: boolean | null;
mergeable_state: string;
merged_by: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"];
comments: number;
review_comments: number;
maintainer_can_modify: boolean;
commits: number;
additions: number;
deletions: number;
changed_files: number;
}, 200> | import("@octokit/types").OctokitResponse<{
url: string;
id: number;
node_id: string;
html_url: string;
diff_url: string;
patch_url: string;
issue_url: string;
commits_url: string;
review_comments_url: string;
review_comment_url: string;
comments_url: string;
statuses_url: string;
number: number;
state: "open" | "closed";
locked: boolean;
title: string;
user: import("@octokit/openapi-types").components["schemas"]["simple-user"];
body: string | null;
labels: {
id: number;
node_id: string;
url: string;
name: string;
description: string | null;
color: string;
default: boolean;
}[];
milestone: import("@octokit/openapi-types").components["schemas"]["nullable-milestone"];
active_lock_reason?: string | null;
created_at: string;
updated_at: string;
closed_at: string | null;
merged_at: string | null;
merge_commit_sha: string | null;
assignee: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"];
assignees?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null;
requested_reviewers?: import("@octokit/openapi-types").components["schemas"]["simple-user"][] | null;
requested_teams?: import("@octokit/openapi-types").components["schemas"]["team-simple"][] | null;
head: {
label: string;
ref: string;
repo: {
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 | null;
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;
html_url: string;
id: number;
node_id: 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;
notifications_url: string;
owner: {
avatar_url: string;
events_url: string;
followers_url: string;
following_url: string;
gists_url: string;
gravatar_id: string | null;
html_url: string;
id: number;
node_id: string;
login: string;
organizations_url: string;
received_events_url: string;
repos_url: string;
site_admin: boolean;
starred_url: string;
subscriptions_url: string;
type: string;
url: string;
};
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;
url: string;
clone_url: string;
default_branch: string;
forks: number;
forks_count: number;
git_url: string;
has_downloads: boolean;
has_issues: boolean;
has_projects: boolean;
has_wiki: boolean;
has_pages: boolean;
has_discussions: boolean;
homepage: string | null;
language: string | null;
master_branch?: string;
archived: boolean;
disabled: boolean;
visibility?: string;
mirror_url: string | null;
open_issues: number;
open_issues_count: number;
permissions?: {
admin: boolean;
maintain?: boolean;
push: boolean;
triage?: boolean;
pull: boolean;
};
temp_clone_token?: string;
allow_merge_commit?: boolean;
allow_squash_merge?: boolean;
allow_rebase_merge?: boolean;
license: {
key: string;
name: string;
url: string | null;
spdx_id: string | null;
node_id: string;
} | null;
pushed_at: string;
size: number;
ssh_url: string;
stargazers_count: number;
svn_url: string;
topics?: string[];
watchers: number;
watchers_count: number;
created_at: string;
updated_at: string;
allow_forking?: boolean;
is_template?: boolean;
web_commit_signoff_required?: boolean;
} | null;
sha: string;
user: {
avatar_url: string;
events_url: string;
followers_url: string;
following_url: string;
gists_url: string;
gravatar_id: string | null;
html_url: string;
id: number;
node_id: string;
login: string;
organizations_url: string;
received_events_url: string;
repos_url: string;
site_admin: boolean;
starred_url: string;
subscriptions_url: string;
type: string;
url: string;
};
};
base: {
label: string;
ref: string;
repo: {
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 | null;
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;
html_url: string;
id: number;
is_template?: boolean;
node_id: 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;
notifications_url: string;
owner: {
avatar_url: string;
events_url: string;
followers_url: string;
following_url: string;
gists_url: string;
gravatar_id: string | null;
html_url: string;
id: number;
node_id: string;
login: string;
organizations_url: string;
received_events_url: string;
repos_url: string;
site_admin: boolean;
starred_url: string;
subscriptions_url: string;
type: string;
url: string;
};
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;
url: string;
clone_url: string;
default_branch: string;
forks: number;
forks_count: number;
git_url: string;
has_downloads: boolean;
has_issues: boolean;
has_projects: boolean;
has_wiki: boolean;
has_pages: boolean;
has_discussions: boolean;
homepage: string | null;
language: string | null;
master_branch?: string;
archived: boolean;
disabled: boolean;
visibility?: string;
mirror_url: string | null;
open_issues: number;
open_issues_count: number;
permissions?: {
admin: boolean;
maintain?: boolean;
push: boolean;
triage?: boolean;
pull: boolean;
};
temp_clone_token?: string;
allow_merge_commit?: boolean;
allow_squash_merge?: boolean;
allow_rebase_merge?: boolean;
license: import("@octokit/openapi-types").components["schemas"]["nullable-license-simple"];
pushed_at: string;
size: number;
ssh_url: string;
stargazers_count: number;
svn_url: string;
topics?: string[];
watchers: number;
watchers_count: number;
created_at: string;
updated_at: string;
allow_forking?: boolean;
web_commit_signoff_required?: boolean;
};
sha: string;
user: {
avatar_url: string;
events_url: string;
followers_url: string;
following_url: string;
gists_url: string;
gravatar_id: string | null;
html_url: string;
id: number;
node_id: string;
login: string;
organizations_url: string;
received_events_url: string;
repos_url: string;
site_admin: boolean;
starred_url: string;
subscriptions_url: string;
type: string;
url: string;
};
};
_links: {
comments: import("@octokit/openapi-types").components["schemas"]["link"];
commits: import("@octokit/openapi-types").components["schemas"]["link"];
statuses: import("@octokit/openapi-types").components["schemas"]["link"];
html: import("@octokit/openapi-types").components["schemas"]["link"];
issue: import("@octokit/openapi-types").components["schemas"]["link"];
review_comments: import("@octokit/openapi-types").components["schemas"]["link"];
review_comment: import("@octokit/openapi-types").components["schemas"]["link"];
self: import("@octokit/openapi-types").components["schemas"]["link"];
};
author_association: import("@octokit/openapi-types").components["schemas"]["author-association"];
auto_merge: import("@octokit/openapi-types").components["schemas"]["auto-merge"];
draft?: boolean;
merged: boolean;
mergeable: boolean | null;
rebaseable?: boolean | null;
mergeable_state: string;
merged_by: import("@octokit/openapi-types").components["schemas"]["nullable-simple-user"];
comments: number;
review_comments: number;
maintainer_can_modify: boolean;
commits: number;
additions: number;
deletions: number;
changed_files: number;
}, 201> | null>;