File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ export function generatePublishPipeline(config: PublishPipelineConfig): string {
1212 const envValues = config . environments . map ( ( env ) => ` - '${ env } '` ) . join ( '\n' ) ;
1313
1414 const stages = config . environments . map ( ( env , idx ) => {
15- const prevEnv = idx > 0 ? config . environments [ idx - 1 ] : null ;
16- const dependsOnProp = prevEnv ? ` dependsOn: Publish_${ prevEnv } \n` : '' ;
17- const approvalComment = prevEnv
15+ const previousEnvironment = idx > 0 ? config . environments [ idx - 1 ] : null ;
16+ const dependsOnProp = previousEnvironment ? ` dependsOn: Publish_${ previousEnvironment } \n` : '' ;
17+ const approvalComment = previousEnvironment
1818 ? ` # To require human approval before this stage:
1919 # Go to Pipelines > Environments > ${ env } in Azure DevOps and add an approval check.
2020`
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ export function generatePublishWorkflow(config: PublishWorkflowConfig): string {
1212 const envChoices = config . environments . map ( ( env ) => ` - ${ env } ` ) . join ( '\n' ) ;
1313
1414 const envJobs = config . environments . map ( ( env , idx ) => {
15- const prevEnv = idx > 0 ? config . environments [ idx - 1 ] : null ;
16- const needs = prevEnv ? `[get-commit, publish-${ prevEnv } ]` : 'get-commit' ;
15+ const previousEnvironment = idx > 0 ? config . environments [ idx - 1 ] : null ;
16+ const needs = previousEnvironment ? `[get-commit, publish-${ previousEnvironment } ]` : 'get-commit' ;
1717
1818 const jobComment = idx === 0
1919 ? ` # Automatically deploys to ${ env } on push to main (incremental mode) or when selected via workflow_dispatch`
20- : ` # Deploys to ${ env } after ${ prevEnv } succeeds (sequential promotion).
20+ : ` # Deploys to ${ env } after ${ previousEnvironment } succeeds (sequential promotion).
2121 # To require human approval before deploying to ${ env } :
2222 # 1. Go to Settings > Environments > ${ env } in your GitHub repository
2323 # 2. Add "Required reviewers" under "Environment protection rules"` ;
You can’t perform that action at this time.
0 commit comments