fix artifact
This commit is contained in:
parent
79fe616082
commit
eae709c29e
|
@ -1518,6 +1518,29 @@ exports.StaleOperations = StaleOperations;
|
|||
|
||||
"use strict";
|
||||
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
|
@ -1536,7 +1559,7 @@ const os_1 = __importDefault(__nccwpck_require__(2037));
|
|||
const crypto_1 = __importDefault(__nccwpck_require__(6113));
|
||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||
const artifact_1 = __importDefault(__nccwpck_require__(2605));
|
||||
const artifact = __importStar(__nccwpck_require__(2605));
|
||||
class State {
|
||||
constructor() {
|
||||
this.processedIssuesIDs = new Set();
|
||||
|
@ -1556,7 +1579,7 @@ class State {
|
|||
const tmpDir = os_1.default.tmpdir();
|
||||
const file = crypto_1.default.randomBytes(8).readBigUInt64LE(0).toString();
|
||||
fs_1.default.writeFileSync(path_1.default.join(tmpDir, file), serialized);
|
||||
const artifactClient = artifact_1.default.create();
|
||||
const artifactClient = artifact.create();
|
||||
// TODO: handle errors
|
||||
yield artifactClient.uploadArtifact(State.ARTIFACT_NAME, [file], tmpDir);
|
||||
});
|
||||
|
@ -1565,7 +1588,7 @@ class State {
|
|||
return __awaiter(this, void 0, void 0, function* () {
|
||||
this.reset();
|
||||
const tmpDir = os_1.default.tmpdir();
|
||||
const artifactClient = artifact_1.default.create();
|
||||
const artifactClient = artifact.create();
|
||||
const downloadResponse = yield artifactClient.downloadArtifact(State.ARTIFACT_NAME, tmpDir);
|
||||
const downloadedFiles = fs_1.default.readdirSync(downloadResponse.downloadPath);
|
||||
if (downloadedFiles.length === 0) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import os from 'os';
|
|||
import crypto from 'crypto';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import artifact from '@actions/artifact';
|
||||
import * as artifact from '@actions/artifact';
|
||||
|
||||
type IssueID = number;
|
||||
export class State implements IState {
|
||||
|
|
Loading…
Reference in New Issue