mirror of
https://github.com/kiegroup/git-backporting.git
synced 2025-06-29 14:13:48 +00:00
feat: disable comment if dry-run
This commit is contained in:
parent
1f09f3d7ea
commit
7c420531c8
4 changed files with 53 additions and 7 deletions
2
dist/cli/index.js
vendored
2
dist/cli/index.js
vendored
|
@ -1557,7 +1557,7 @@ class Runner {
|
|||
}
|
||||
catch (error) {
|
||||
this.logger.error(`Something went wrong backporting to ${pr.base}: ${error}`);
|
||||
if (configs.errorNotification.enabled && configs.errorNotification.message.length > 0) {
|
||||
if (!configs.dryRun && configs.errorNotification.enabled && configs.errorNotification.message.length > 0) {
|
||||
// notify the failure as comment in the original pull request
|
||||
const comment = (0, runner_util_1.injectError)(configs.errorNotification.message, error);
|
||||
gitApi.createPullRequestComment(configs.originalPullRequest.url, comment);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue