Add logging

This commit is contained in:
Sergey Dolin 2023-06-23 09:21:22 +02:00
parent 1e059ce975
commit e953c7f258
2 changed files with 4 additions and 0 deletions

1
dist/index.js vendored
View File

@ -1585,6 +1585,7 @@ class State {
const tmpDir = os_1.default.tmpdir(); const tmpDir = os_1.default.tmpdir();
const file = path_1.default.join(tmpDir, crypto_1.default.randomBytes(8).readBigUInt64LE(0).toString()); const file = path_1.default.join(tmpDir, crypto_1.default.randomBytes(8).readBigUInt64LE(0).toString());
fs_1.default.writeFileSync(file, serialized); fs_1.default.writeFileSync(file, serialized);
core.debug(`Persisting state includes info about ${this.processedIssuesIDs.size} issue(s)`);
const artifactClient = artifact.create(); const artifactClient = artifact.create();
try { try {
yield artifactClient.uploadArtifact(State.ARTIFACT_NAME, [file], tmpDir); yield artifactClient.uploadArtifact(State.ARTIFACT_NAME, [file], tmpDir);

View File

@ -44,6 +44,9 @@ export class State implements IState {
); );
fs.writeFileSync(file, serialized); fs.writeFileSync(file, serialized);
core.debug(
`Persisting state includes info about ${this.processedIssuesIDs.size} issue(s)`
);
const artifactClient = artifact.create(); const artifactClient = artifact.create();
try { try {
await artifactClient.uploadArtifact(State.ARTIFACT_NAME, [file], tmpDir); await artifactClient.uploadArtifact(State.ARTIFACT_NAME, [file], tmpDir);