MCPcopy Create free account
hub / github.com/api3dao/airnode / createPullRequest

Function createPullRequest

docker/scripts/github.ts:74–92  ·  view source on GitHub ↗
(head: string, base: string, title: string, description: string)

Source from the content-addressed store, hash-verified

72export const disableMerge = () => toggleMerge(false);
73
74export const createPullRequest = async (head: string, base: string, title: string, description: string) => {
75 const octokit = initializeOctokit();
76
77 const goPullRequest = await go(() =>
78 octokit.request(`POST /repos/${OWNER}/${REPOSITORY}/pulls`, {
79 owner: OWNER,
80 repo: REPOSITORY,
81 title,
82 body: description,
83 head,
84 base,
85 })
86 );
87 if (!goPullRequest.success) {
88 throw new Error(`Can't create a GitHub pull-request: ${goPullRequest.error}`);
89 }
90
91 return goPullRequest.data.data.number as number;
92};
93
94export const requestPullRequestReview = async (pullRequestNumber: number) => {
95 const octokit = initializeOctokit();

Callers

nothing calls this directly

Calls 1

initializeOctokitFunction · 0.85

Tested by

no test coverage detected