Skip to content

Commit

Permalink
Tweak dry-run output
Browse files Browse the repository at this point in the history
  • Loading branch information
lerebear committed Oct 6, 2023
1 parent b1d1d89 commit f5f7dd5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
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.
10 changes: 7 additions & 3 deletions dist/index.js

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

12 changes: 7 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,17 +179,15 @@ async function ensureLabelExists(
})
} catch (e) {
if (configOrDefault(config.applyCategoryLabels, true)) {
core.info(`Creating new label for category "${label.name}"`)
core.info(`Creating new label "${prefixedLabelName}"`)
response = await octokit.rest.issues.createLabel({
owner: pull.base.repo.owner.login,
repo: pull.base.repo.name,
...label,
name: prefixedLabelName
})
} else {
core.info(
`Would have created new label for category "${prefixedLabelName}"`
)
core.info(`Would have created new label "${prefixedLabelName}"`)
}
}

Expand Down Expand Up @@ -290,8 +288,12 @@ async function addScoreThresholdExceededComment(
if (
!configOrDefault(config.addCommentWhenScoreThresholdHasBeenExceeded, true)
) {
const indentedComment = comment
.split('\n')
.map(l => ` ${l}`)
.join('\n')
core.info(
'Would have added the following comment to the pull request:\n${comment}'
`Would have added the following comment to the pull request:\n${indentedComment}`
)
return
}
Expand Down

0 comments on commit f5f7dd5

Please sign in to comment.