Skip to content

Commit a038353

Browse files
committed
Add info messages to ease debug
1 parent 9dfd79d commit a038353

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

dist/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ const batch = (size, inputs) => inputs.reduce((batches, input) => {
304304
}, [[]])
305305

306306
const createCheck = async function (octokit, owner, repo, title, ref) {
307+
core.info(`Creating check {owner: "${owner}", repo: "${repo}", name: ${title}}`)
307308
try {
308309
const { data: { id: checkRunId } } = await octokit.checks.create({
309310
owner,
@@ -322,6 +323,7 @@ const createCheck = async function (octokit, owner, repo, title, ref) {
322323
}
323324

324325
const updateCheck = async function (octokit, owner, repo, checkRunId, conclusion, title, summary, annotations) {
326+
core.info(`Updating check {owner: "${owner}", repo: "${repo}", check_run_id: ${checkRunId}}`)
325327
try {
326328
await octokit.checks.update({
327329
owner,
@@ -400,6 +402,7 @@ async function run () {
400402
const annotations = JSON.parse(inputContent)
401403
const checkRunId = await createCheck(octokit, owner, repo, title, ref)
402404
const { failureCount, warningCount, noticeCount } = stats(annotations)
405+
core.info(`Found ${failureCount} failure(s), ${warningCount} warning(s) and ${noticeCount} notice(s)`)
403406
const summary = generateSummary(failureCount, warningCount, noticeCount)
404407
const conclusion = generateConclusion(failureCount, warningCount, noticeCount)
405408

index.js

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const batch = (size, inputs) => inputs.reduce((batches, input) => {
3131
}, [[]])
3232

3333
const createCheck = async function (octokit, owner, repo, title, ref) {
34+
core.info(`Creating check {owner: "${owner}", repo: "${repo}", name: ${title}}`)
3435
try {
3536
const { data: { id: checkRunId } } = await octokit.checks.create({
3637
owner,
@@ -49,6 +50,7 @@ const createCheck = async function (octokit, owner, repo, title, ref) {
4950
}
5051

5152
const updateCheck = async function (octokit, owner, repo, checkRunId, conclusion, title, summary, annotations) {
53+
core.info(`Updating check {owner: "${owner}", repo: "${repo}", check_run_id: ${checkRunId}}`)
5254
try {
5355
await octokit.checks.update({
5456
owner,
@@ -127,6 +129,7 @@ async function run () {
127129
const annotations = JSON.parse(inputContent)
128130
const checkRunId = await createCheck(octokit, owner, repo, title, ref)
129131
const { failureCount, warningCount, noticeCount } = stats(annotations)
132+
core.info(`Found ${failureCount} failure(s), ${warningCount} warning(s) and ${noticeCount} notice(s)`)
130133
const summary = generateSummary(failureCount, warningCount, noticeCount)
131134
const conclusion = generateConclusion(failureCount, warningCount, noticeCount)
132135

0 commit comments

Comments
 (0)