diff --git a/lib/landing_session.js b/lib/landing_session.js index 0b7e191b..3ea1e9a4 100644 --- a/lib/landing_session.js +++ b/lib/landing_session.js @@ -88,17 +88,20 @@ class LandingSession extends Session { } // Check for and maybe assign any unmarked deprecations in the codebase. - const unmarkedDeprecations = await getUnmarkedDeprecations(); - const unmarkedDepCount = unmarkedDeprecations.length; - if (unmarkedDepCount > 0) { - cli.startSpinner('Assigning deprecation numbers to DEPOXXX items'); - - // Update items then stage files and amend the last commit. - await updateDeprecations(unmarkedDeprecations); - await runAsync('git', ['add', 'doc', 'lib', 'src', 'test']); - await runAsync('git', ['commit', '--amend', '--no-edit']); - - cli.stopSpinner(`Updated ${unmarkedDepCount} DEPOXXX items in codebase`); + if (this.updateDeprecations !== 'yes') { + const unmarkedDeprecations = await getUnmarkedDeprecations(); + const unmarkedDepCount = unmarkedDeprecations.length; + if (unmarkedDepCount > 0) { + cli.startSpinner('Assigning deprecation numbers to DEPOXXX items'); + + // Update items then stage files and amend the last commit. + await updateDeprecations(unmarkedDeprecations); + await runAsync('git', ['add', 'doc', 'lib', 'src', 'test']); + await runAsync('git', ['commit', '--amend', '--no-edit']); + + cli + .stopSpinner(`Updated ${unmarkedDepCount} DEPOXXX items in codebase`); + } } cli.ok('Patches applied'); diff --git a/lib/session.js b/lib/session.js index 4e107d84..4db0e3d9 100644 --- a/lib/session.js +++ b/lib/session.js @@ -60,6 +60,7 @@ class Session { readme: this.readme, waitTimeSingleApproval: this.waitTimeSingleApproval, waitTimeMultiApproval: this.waitTimeMultiApproval, + updateDeprecations: this.updateDeprecations, ciType: this.ciType, prid: this.prid }; @@ -109,6 +110,10 @@ class Session { return path.join(this.ncuDir, `${this.prid}`); } + get updateDeprecations() { + return this.config.updateDeprecations || 'yes'; + } + startLanding() { writeJson(this.sessionPath, { state: STARTED,