Skip to content

Commit

Permalink
Error messages updated
Browse files Browse the repository at this point in the history
  • Loading branch information
chamodshehanka committed Feb 28, 2022
1 parent 9003e75 commit f22ed38
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,19 @@ try {
githubService.createBranch(branch, defaultBranch).then(res => {
console.log(`Branch ${branch} created`);
core.setOutput('branchCreated', 'true');
}).catch(err => {
console.log(`Branch ${branch} creation failed : ${err}`);
}).catch(e => {
console.log(`Branch ${branch} creation failed : ${e}`);
core.setOutput('branchExists', 'false');
throw e;
});
} else {
console.log(`Branch ${branch} exists`);
core.setOutput('branchExists', 'true');
}
}).catch(e => {
console.log(`Branch ${branch} check failed : ${e}`);
core.setOutput('branchCheck', 'false');
throw e;
});


Expand Down

0 comments on commit f22ed38

Please sign in to comment.