From 6e0ace4210b3d95bd56f8b90d2794bfe37cfd153 Mon Sep 17 00:00:00 2001 From: Sergey Dolin Date: Fri, 23 Jun 2023 09:23:17 +0200 Subject: [PATCH] Add logging --- dist/index.js | 4 +++- src/classes/state.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index cfb8dad1..f1aa2cb6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1579,8 +1579,10 @@ class State { } persist() { return __awaiter(this, void 0, void 0, function* () { - if (this.debug) + if (this.debug) { + core.debug('The state is not persisted in the debug mode'); return; + } const serialized = Array.from(this.processedIssuesIDs).join('|'); const tmpDir = os_1.default.tmpdir(); const file = path_1.default.join(tmpDir, crypto_1.default.randomBytes(8).readBigUInt64LE(0).toString()); diff --git a/src/classes/state.ts b/src/classes/state.ts index 5b1035ee..7aebc5da 100644 --- a/src/classes/state.ts +++ b/src/classes/state.ts @@ -33,7 +33,10 @@ export class State implements IState { private static readonly ARTIFACT_NAME = '_stale_state'; async persist() { - if (this.debug) return; + if (this.debug) { + core.debug('The state is not persisted in the debug mode'); + return; + } const serialized = Array.from(this.processedIssuesIDs).join('|');