MCPcopy Index your code
hub / github.com/remix-run/react-router / commitChanges

Function commitChanges

scripts/changes/version.ts:336–379  ·  view source on GitHub ↗

* Stages and commits changes, or prints the commit message in preview mode

()

Source from the content-addressed store, hash-verified

334 * Stages and commits changes, or prints the commit message in preview mode
335 */
336function commitChanges() {
337 let commitMessage = generateCommitMessage(releases);
338
339 if (preview) {
340 console.log(` • Would commit with message: ${commitMessage}`);
341 console.log();
342 } else if (skipCommit) {
343 console.log("═".repeat(80));
344 console.log(colorize("VERSION UPDATED", colors.lightGreen));
345 console.log("═".repeat(80));
346 console.log();
347 console.log("Files updated. Review the changes, then manually commit:");
348 console.log();
349 console.log(` git add .`);
350 console.log(` git commit -m "${commitMessage}"`);
351 console.log();
352 } else {
353 // Stage all changes
354 console.log("Staging changes...");
355 logAndExec("git add .");
356 console.log();
357
358 // Create commit
359 console.log("Creating commit...");
360 logAndExec(`git commit -m "${commitMessage}"`);
361 console.log();
362
363 // Success message (skip in CI since the workflow handles the rest)
364 if (!process.env.CI) {
365 console.log("═".repeat(80));
366 console.log("✅ RELEASE PREPARED");
367 console.log("═".repeat(80));
368 console.log();
369 console.log("Release commit has been created locally.");
370 console.log();
371 console.log(
372 "To publish, push and the publish workflow will handle the rest:",
373 );
374 console.log();
375 console.log(" git push");
376 console.log();
377 }
378 }
379}

Callers 1

version.tsFile · 0.85

Calls 4

generateCommitMessageFunction · 0.90
colorizeFunction · 0.90
logAndExecFunction · 0.90
logMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…