MCPcopy
hub / github.com/continuedev/continue / checks

Function checks

extensions/cli/src/commands/checks.ts:282–319  ·  view source on GitHub ↗
(
  actionOrUrl: string | undefined,
  prUrlArg: string | undefined,
)

Source from the content-addressed store, hash-verified

280 * cn checks reject [pr-url] - Reject pending suggestions
281 */
282export async function checks(
283 actionOrUrl: string | undefined,
284 prUrlArg: string | undefined,
285): Promise<void> {
286 try {
287 // Determine if first arg is an action or a PR URL
288 let action: "list" | "accept" | "reject" = "list";
289 let rawPrUrl: string | undefined = prUrlArg;
290
291 if (actionOrUrl === "accept" || actionOrUrl === "reject") {
292 action = actionOrUrl;
293 // prUrlArg already has the right value from Commander
294 } else if (actionOrUrl) {
295 // First arg is a PR URL, not an action
296 rawPrUrl = actionOrUrl;
297 }
298
299 const prUrl = await resolvePrUrl(rawPrUrl);
300
301 switch (action) {
302 case "accept":
303 await acceptChecks(prUrl);
304 break;
305 case "reject":
306 await rejectChecks(prUrl);
307 break;
308 default:
309 await listChecks(prUrl);
310 break;
311 }
312 } catch (err) {
313 if (err instanceof Error && err.name === "AuthenticationRequiredError") {
314 console.error(chalk.red(err.message));
315 await gracefulExit(1);
316 }
317 throw err;
318 }
319}

Callers 1

index.tsFile · 0.85

Calls 6

resolvePrUrlFunction · 0.85
acceptChecksFunction · 0.85
rejectChecksFunction · 0.85
listChecksFunction · 0.85
gracefulExitFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected