Skip to content

Commit

Permalink
#3 fix usage of colon in PR title
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Strzebonski committed Sep 23, 2020
1 parent 087ae36 commit 38e23d9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@ async function check() {
const prDescription = core.getInput("pr_description");

if (helpers.checkPrBranch(prBranch) === false) {
core.setFailed("PR branch has wrong name");
core.setFailed(
`PR branch has wrong name\n - branch name: "${prBranch}"`
);
return;
}

if (helpers.checkPrTitle(prTitle) === false) {
core.setFailed("PR title doesn't start with issue number");
core.setFailed(
`PR title doesn't start with issue number\n - PR title: "${prTitle}"`
);
return;
}

if (helpers.checkPrDescription(prDescription) == false) {
core.setFailed("PR description doesn't contain 'fixes #issue' phrase");
core.setFailed(
`PR description doesn't contain 'fixes #issue' phrase\n - PR description: "${prDescription}"`
);
return;
}

Expand All @@ -30,7 +36,7 @@ async function check() {
) === false
) {
core.setFailed(
"PR title and description contain different issue numbers"
`Branch name, PR title and description contain different issue numbers\n - branch name: "${prBranch}"\n - PR title: "${prTitle}"\n- PR description: "${prDescription}"`
);
return;
}
Expand Down

0 comments on commit 38e23d9

Please sign in to comment.