Created by lplit 215 days ago Viewed 13 times 0 Points
(Description borrowed from official documentation at https://github.com/octokit/plugin-rest-endpoint-methods.js/blob/master/docs/pulls/merge.md)
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.
No comments yet
import * as wmill from "https://deno.land/x/windmill@v1.34.0/mod.ts";
import { Octokit } from "https://cdn.skypack.dev/octokit?dts";
/*
@param: {wmill.Resource<"github">} gh_auth - Resource containing Github Auth API Key
example:
{
auth: github_api_key
}
*/
export async function main(
gh_auth: wmill.Resource<"github">,
owner: string,
repo: string,
pullNumber: string,
mergeMethod: "merge" | "squash" | "rebase" = "merge",
commitTitle?: string,
commitMessage?: string,
sha?: string,
) {
const octokit = new Octokit(gh_auth);
const response = await octokit.rest.pulls.merge({
owner: owner,
repo: repo,
pull_number: pullNumber,
merge_method: mergeMethod,
commit_title: commitTitle,
commit_message: commitMessage,
sha: sha,
});
return response;
}
No comments yet