Skip to content

Commit

Permalink
fix: Replace actions/core with console calls.
Browse files Browse the repository at this point in the history
Closes #3
  • Loading branch information
joberstein committed Feb 16, 2023
1 parent 360cee2 commit 3914de8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 66 deletions.
61 changes: 0 additions & 61 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"homepage": "https://github.com/joberstein/actions-commitlint-validation#readme",
"dependencies": {
"@actions/core": "^1.10.0",
"commitlint": "^17.4.2"
},
"devDependencies": {
Expand Down
7 changes: 3 additions & 4 deletions src/commitlint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import load from "@commitlint/load";
import read from "@commitlint/read";
import lint from "@commitlint/lint";
import format from "@commitlint/format";
import { info, warning, error } from "@actions/core";

/**
* Run commitlint and print the formatted results.
Expand All @@ -23,7 +22,7 @@ export default async (args: GetCommitMessageOptions) => {
const results = await Promise.all(lintOutcomes);
const formatted = format({ results }, { color: true , verbose: true });

info(formatted);
console.info(formatted);

const warnings = [];
const errors = [];
Expand All @@ -34,11 +33,11 @@ export default async (args: GetCommitMessageOptions) => {
});

if (!!warnings.length) {
warning(`${warnings.length} warning(s) found.`);
console.warn(`${warnings.length} warning(s) found.`);
}

if (!!errors.length) {
error(`${errors.length} error(s) found.`);
console.error(`${errors.length} error(s) found.`);
}

if (results.some(result => !result.valid)) {
Expand Down

0 comments on commit 3914de8

Please sign in to comment.