Skip to content

Commit

Permalink
Add all discovered labels in comment when multiple bump labels are pr…
Browse files Browse the repository at this point in the history
…esent
  • Loading branch information
simu committed Nov 2, 2023
1 parent ecc62d3 commit 729fe35
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('action', () => {
)
expect(createOrUpdateCommentMock).toHaveBeenNthCalledWith(
1,
'Found 2 bump labels, please make sure you only add one bump label.\n\n' +
'Found 2 bump labels (`bump:patch`, `bump:minor`), please make sure you only add one bump label.\n\n' +
'🛠️ _Auto release disabled_'
)
})
Expand Down
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion dist/index.js

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

3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ export async function run(): Promise<void> {
if (!bumpAction.bump) {
// update comment if multiple labels found
if (bumpAction.labels.length > 1) {
const labels = bumpAction.labels.map(formatCode).join(', ')
await createOrUpdateComment(
`Found ${bumpAction.labels.length} bump labels, ` +
`Found ${bumpAction.labels.length} bump labels (${labels}), ` +
'please make sure you only add one bump label.\n\n🛠️ _Auto release disabled_'
)
}
Expand Down

0 comments on commit 729fe35

Please sign in to comment.