mirror of
https://github.com/kiegroup/git-backporting.git
synced 2025-07-19 21:18:20 +02:00
refactor: updated logging messages (#65)
This commit is contained in:
parent
e29dae5073
commit
a8db0755a8
18 changed files with 88 additions and 85 deletions
|
@ -24,12 +24,12 @@ import LoggerServiceFactory from "../logger/logger-service-factory";
|
|||
|
||||
// if pr is opened check if the there exists one single commit
|
||||
if (configs.originalPullRequest.state == "open") {
|
||||
this.logger.warn("Trying to backport an open pull request!");
|
||||
this.logger.warn("Trying to backport an open pull request");
|
||||
}
|
||||
|
||||
// if PR is closed and not merged log a warning
|
||||
// if PR is closed and not merged throw an error
|
||||
if (configs.originalPullRequest.state == "closed" && !configs.originalPullRequest.merged) {
|
||||
throw new Error("Provided pull request is closed and not merged!");
|
||||
throw new Error("Provided pull request is closed and not merged");
|
||||
}
|
||||
|
||||
return Promise.resolve(configs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue