Skip to content

Commit

Permalink
improve 'behind' text output
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed Feb 15, 2023
1 parent 14dd22b commit 4c16773
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions __tests__/functions/prechecks.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ test('runs prechecks and finds the PR is BEHIND and a noop deploy and update_bra
)
).toStrictEqual({
message:
'### ⚠️ Cannot proceed with deployment\n\n- mergeStateStatus: `BEHIND`\n- update_branch: `warn`\n\n> Please ensure your branch is up to date with the `main` and try again',
'### ⚠️ Cannot proceed with deployment\n\nYour branch is behind the base branch and will need to be updated before deployments can continue.\n\n- mergeStateStatus: `BEHIND`\n- update_branch: `warn`\n\n> Please ensure your branch is up to date with the `main` branch and try again',
status: false
})
})
Expand Down Expand Up @@ -1453,7 +1453,7 @@ test('runs prechecks and finds the PR is BEHIND and a full deploy and update_bra
)
).toStrictEqual({
message:
'### ⚠️ Cannot proceed with deployment\n\n- mergeStateStatus: `BEHIND`\n- update_branch: `warn`\n\n> Please ensure your branch is up to date with the `main` and try again',
'### ⚠️ Cannot proceed with deployment\n\nYour branch is behind the base branch and will need to be updated before deployments can continue.\n\n- mergeStateStatus: `BEHIND`\n- update_branch: `warn`\n\n> Please ensure your branch is up to date with the `main` branch and try again',
status: false
})
})
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/functions/prechecks.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export async function prechecks(
) {
// If the update_branch param is set to "warn", warn and exit
if (update_branch === 'warn') {
message = `### ⚠️ Cannot proceed with deployment\n\n- mergeStateStatus: \`${mergeStateStatus}\`\n- update_branch: \`${update_branch}\`\n\n> Please ensure your branch is up to date with the \`${stable_branch}\` and try again`
message = `### ⚠️ Cannot proceed with deployment\n\nYour branch is behind the base branch and will need to be updated before deployments can continue.\n\n- mergeStateStatus: \`${mergeStateStatus}\`\n- update_branch: \`${update_branch}\`\n\n> Please ensure your branch is up to date with the \`${stable_branch}\` branch and try again`
return {message: message, status: false}
}

Expand Down

0 comments on commit 4c16773

Please sign in to comment.