Skip to content

Commit

Permalink
feat: Fold logs (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris authored Jun 21, 2020
1 parent 1628494 commit 51c2e3d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export async function run(): Promise<void> {
const inps: Inputs = getInputs();

if (core.isDebug()) {
core.startGroup('Dump GitHub context');
console.log(context);
core.endGroup();
}

const eventName = context.eventName;
Expand All @@ -64,7 +66,9 @@ export async function run(): Promise<void> {
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;
Expand Down Expand Up @@ -122,6 +126,9 @@ export async function run(): Promise<void> {
}

// 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
Expand Down

0 comments on commit 51c2e3d

Please sign in to comment.