MCPcopy Create free account
hub / github.com/angular/dev-infra / waitForEditsAndCreateReleaseCommit

Function waitForEditsAndCreateReleaseCommit

ng-dev/release/publish/actions.ts:220–252  ·  view source on GitHub ↗

* Prompts the user for potential release notes edits that need to be made. Once * confirmed, a new commit for the release point is created.

(newVersion: semver.SemVer)

Source from the content-addressed store, hash-verified

218 * confirmed, a new commit for the release point is created.
219 */
220 protected async waitForEditsAndCreateReleaseCommit(newVersion: semver.SemVer) {
221 Log.warn(
222 ' ⚠ Please review the changelog and ensure that the log contains only changes ' +
223 'that apply to the public API surface.',
224 );
225 Log.warn(' Manual changes can be made. When done, please proceed with the prompt below.');
226
227 if (!(await Prompt.confirm({message: 'Do you want to proceed and commit the changes?'}))) {
228 throw new UserAbortedReleaseActionError();
229 }
230
231 // Commit message for the release point.
232 const filesToCommit = [
233 workspaceRelativePackageJsonPath,
234 workspaceRelativeChangelogPath,
235 ...this.getAspectLockFiles(),
236 ];
237
238 const commitMessage = getCommitMessageForRelease(newVersion);
239
240 // Create a release staging commit including changelog and version bump.
241 await this.createCommit(commitMessage, filesToCommit);
242
243 // The caretaker may have attempted to make additional changes. These changes would
244 // not be captured into the release commit. The working directory should remain clean,
245 // like we assume it being clean when we start the release actions.
246 if (this.git.hasUncommittedChanges()) {
247 Log.error(' ✘ Unrelated changes have been made as part of the changelog editing.');
248 throw new FatalReleaseActionError();
249 }
250
251 Log.info(green(` ✓ Created release commit for: "${newVersion}".`));
252 }
253
254 /**
255 * Gets an owned fork for the configured project of the authenticated user. Aborts the

Callers

nothing calls this directly

Calls 3

hasUncommittedChangesMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected