feat: create action-conventional-commits

This commit is contained in:
Adrian Smijulj 2020-06-11 08:44:55 +02:00
parent b3b8bc11c1
commit abd844cd82
2 changed files with 4 additions and 0 deletions

2
dist/main/index.js vendored
View file

@ -23573,6 +23573,7 @@ function run() {
return; return;
} }
let hasErrors; let hasErrors;
core.startGroup("Commit messages");
for (let i = 0; i < context.payload.commits.length; i++) { for (let i = 0; i < context.payload.commits.length; i++) {
let commit = context.payload.commits[i]; let commit = context.payload.commits[i];
if (isValidCommitMessage(commit.message)) { if (isValidCommitMessage(commit.message)) {
@ -23583,6 +23584,7 @@ function run() {
hasErrors = true; hasErrors = true;
} }
} }
core.endGroup();
if (hasErrors) { if (hasErrors) {
core.setFailed(`🚫 According to the conventional-commits specification, some of the commit messages are not valid.`); core.setFailed(`🚫 According to the conventional-commits specification, some of the commit messages are not valid.`);
} }

View file

@ -15,6 +15,7 @@ async function run() {
} }
let hasErrors; let hasErrors;
core.startGroup("Commit messages");
for (let i = 0; i < context.payload.commits.length; i++) { for (let i = 0; i < context.payload.commits.length; i++) {
let commit = context.payload.commits[i]; let commit = context.payload.commits[i];
if (isValidCommitMessage(commit.message)) { if (isValidCommitMessage(commit.message)) {
@ -24,6 +25,7 @@ async function run() {
hasErrors = true; hasErrors = true;
} }
} }
core.endGroup();
if (hasErrors) { if (hasErrors) {
core.setFailed( core.setFailed(