MCPcopy Create free account
hub / github.com/remix-run/react-router / closePr

Function closePr

scripts/utils/github.ts:159–173  ·  view source on GitHub ↗
(prNumber: number, comment?: string)

Source from the content-addressed store, hash-verified

157 * Close a PR with an optional comment
158 */
159export async function closePr(prNumber: number, comment?: string) {
160 if (comment) {
161 await request("POST /repos/{owner}/{repo}/issues/{issue_number}/comments", {
162 ...requestOptions(),
163 issue_number: prNumber,
164 body: comment,
165 });
166 }
167
168 await request("PATCH /repos/{owner}/{repo}/pulls/{pull_number}", {
169 ...requestOptions(),
170 pull_number: prNumber,
171 state: "closed",
172 });
173}
174
175/**
176 * Get all comments on a PR

Callers 2

runActionsFunction · 0.90
mainFunction · 0.90

Calls 2

requestOptionsFunction · 0.85
requestFunction · 0.50

Tested by

no test coverage detected