Skip to content

Commit

Permalink
Add consistency in messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
ncalteen committed Oct 31, 2024
1 parent e5f861e commit 5c5e4fc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ describe('main', () => {
await main.run()

expect(core.setFailed).toHaveBeenCalledWith(
"Version already exists and 'overwrite' is false"
"Version exists and 'overwrite' is false"
)
})

Expand Down
6 changes: 3 additions & 3 deletions 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/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function run() {
// Fail if not running in checkOnly mode, not allowing overwrites, and the
// version exists.
if (!checkOnly && !overwrite && exists)
return core.setFailed("Version already exists and 'overwrite' is false")
return core.setFailed("Version exists and 'overwrite' is false")

// If not running in checkOnly mode, tag and push the version in the
// workspace. Otherwise, just output the version information.
Expand Down
4 changes: 2 additions & 2 deletions src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ export async function versionCheckComment(
'### Semantic Version Check Passed :white_check_mark:',
`Version in manifest file \`${manifestPath}\` is valid.`,
'This comment will be automatically updated as changes are pushed to this PR branch.',
'<!-- fast-track-version-check-action: workflow=${{ github.workflow }} -->'
'<!-- semver: workflow=${{ github.workflow }} -->'
].join('\n\n')

const failureBody = [
'### Semantic Version Check Failed :x:',
`Version in manifest file \`${manifestPath}\` has already been published. Please increment the version in the manifest file before attempting to merge this pull request.`,
'This comment will be automatically updated as changes are pushed to this PR branch.',
'<!-- fast-track-version-check-action: workflow=${{ github.workflow }} -->'
'<!-- semver: workflow=${{ github.workflow }} -->'
].join('\n\n')

// Update the existing comment, or create a new one.
Expand Down

0 comments on commit 5c5e4fc

Please sign in to comment.