Skip to content

Commit

Permalink
Debugging linter with printf-like method
Browse files Browse the repository at this point in the history
  • Loading branch information
dacap committed Jun 6, 2024
1 parent 45fbae4 commit 9629dba
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/lint_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,18 @@ jobs:
const errors = [];
for (const { sha, commit: { message }, author } of commits) {
if (author !== null) {
continue;
}
console.log("message:" + message);
console.log("rules.length:" + rules.length);
//if (author !== null) {
// continue;
//}
const commitErrors = [];
for (const { pattern, error } of rules) {
console.log("pattern:" + pattern);
if (!pattern.test(message)) {
console.log("failed pattern:" + pattern);
commitErrors.push(error);
}
}
Expand All @@ -66,6 +72,8 @@ jobs:
if (errors.length > 0) {
core.setFailed(`One or more of the commits in this PR do not match the code submission policy:\n\n${errors.join("\n")}`);
}
console.log("errors.length = " + errors.length);
- name: Comment on PR
if: ${{ failure() && !github.event.pull_request.draft }}
uses: unsplash/comment-on-pr@a9bf050e744c8282dee4bb0dbcf063186d8316c4
Expand Down

0 comments on commit 9629dba

Please sign in to comment.