Skip to content

Commit

Permalink
chore: use debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
nejdetkadir committed Oct 11, 2023
1 parent f1b8356 commit 05be853
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dist/index.js

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

4 changes: 4 additions & 0 deletions src/lib/markdownParser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as github from '@actions/github';
import * as core from '@actions/core';

import { repository, pullRequest } from '@app/lib';
import { CHECKLIST_KEYS, QUESTIONS } from '@app/constants';
Expand Down Expand Up @@ -105,6 +106,9 @@ async function missingTaskId() {
const isValid = await pullRequest.hasTaskNumber();
const isChecked = checkedTaskId();

core.debug(`Task ID is valid: ${isValid}`);
core.debug(`Task ID is checked: ${isChecked}`);

if (isChecked) {
return isValid;
}
Expand Down
3 changes: 3 additions & 0 deletions src/lib/pullRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ async function hasTaskNumber() {
const regex = /\[(.*?)\]/g;
const taskNumber = title.match(regex);

core.debug(`Task number: ${taskNumber}`);
core.debug(`Task title: ${title}`);

if (!taskNumber) {
return false;
}
Expand Down

0 comments on commit 05be853

Please sign in to comment.