Add logging

This commit is contained in:
Sergey Dolin 2023-06-23 09:23:17 +02:00
parent e953c7f258
commit 6e0ace4210
2 changed files with 7 additions and 2 deletions

4
dist/index.js vendored
View File

@ -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());

View File

@ -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('|');