From 51c2e3d7c5eea7fabcb38b600614c3f31ebe95a8 Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Mon, 22 Jun 2020 05:58:02 +0900 Subject: [PATCH] feat: Fold logs (#159) --- src/main.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.ts b/src/main.ts index 12b83723..15413f0c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -38,7 +38,9 @@ export async function run(): Promise { const inps: Inputs = getInputs(); if (core.isDebug()) { + core.startGroup('Dump GitHub context'); console.log(context); + core.endGroup(); } const eventName = context.eventName; @@ -64,7 +66,9 @@ export async function run(): Promise { const configFilePath = inps.ConfigFilePath; const config = yaml.safeLoad(fs.readFileSync(configFilePath, 'utf8')); if (core.isDebug()) { + core.startGroup('Dump Config'); console.log(config); + core.endGroup(); } let isExistLabel = false; @@ -122,6 +126,9 @@ export async function run(): Promise { } // Render template + if (core.isDebug()) { + console.log((context.payload as any).issue.assignees); // eslint-disable-line @typescript-eslint/no-explicit-any + } const commentBodyView = { sender: { login: (context.payload as any).sender.login // eslint-disable-line @typescript-eslint/no-explicit-any