mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-03-14 06:50:10 +08:00
refactor report json saving
This commit is contained in:
parent
a4eee53def
commit
48b13fa8f1
81
dist/cleanup/index.js
generated
vendored
81
dist/cleanup/index.js
generated
vendored
@ -74035,6 +74035,12 @@ function ignoreErrors(promise) {
|
|||||||
}
|
}
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
try {
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
if (error instanceof Error)
|
||||||
|
core.setFailed(error.message);
|
||||||
|
}
|
||||||
yield ignoreErrors((0, reports_1.generateReports)());
|
yield ignoreErrors((0, reports_1.generateReports)());
|
||||||
yield ignoreErrors(saveCache());
|
yield ignoreErrors(saveCache());
|
||||||
});
|
});
|
||||||
@ -74402,9 +74408,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.generateReports = exports.setUpNativeImageBuildReports = void 0;
|
exports.generateReports = exports.setUpNativeImageBuildReports = void 0;
|
||||||
const c = __importStar(__nccwpck_require__(2764));
|
const c = __importStar(__nccwpck_require__(2764));
|
||||||
@ -74415,9 +74418,6 @@ const path_1 = __nccwpck_require__(1017);
|
|||||||
const os_1 = __nccwpck_require__(2037);
|
const os_1 = __nccwpck_require__(2037);
|
||||||
const utils_1 = __nccwpck_require__(2867);
|
const utils_1 = __nccwpck_require__(2867);
|
||||||
const semver_1 = __nccwpck_require__(6560);
|
const semver_1 = __nccwpck_require__(6560);
|
||||||
const js_base64_1 = __nccwpck_require__(7821);
|
|
||||||
const rest_1 = __nccwpck_require__(6175);
|
|
||||||
const node_fetch_1 = __importDefault(__nccwpck_require__(831));
|
|
||||||
const BUILD_OUTPUT_JSON_PATH = (0, path_1.join)((0, os_1.tmpdir)(), 'native-image-build-output.json');
|
const BUILD_OUTPUT_JSON_PATH = (0, path_1.join)((0, os_1.tmpdir)(), 'native-image-build-output.json');
|
||||||
const BYTES_TO_KiB = 1024;
|
const BYTES_TO_KiB = 1024;
|
||||||
const BYTES_TO_MiB = 1024 * 1024;
|
const BYTES_TO_MiB = 1024 * 1024;
|
||||||
@ -74457,29 +74457,7 @@ function generateReports() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const buildOutput = JSON.parse(fs.readFileSync(BUILD_OUTPUT_JSON_PATH, 'utf8'));
|
const buildOutput = JSON.parse(fs.readFileSync(BUILD_OUTPUT_JSON_PATH, 'utf8'));
|
||||||
const octokit = new rest_1.Octokit({
|
(0, utils_1.saveReportJson)(JSON.stringify(buildOutput));
|
||||||
auth: c.INPUT_GITHUB_TOKEN,
|
|
||||||
request: {
|
|
||||||
fetch: node_fetch_1.default,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const contentEncoded = js_base64_1.Base64.encode(JSON.stringify(buildOutput));
|
|
||||||
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
|
||||||
owner: 'jessiscript',
|
|
||||||
repo: 're23_build_tracking',
|
|
||||||
path: 'OUTPUT.json',
|
|
||||||
content: contentEncoded,
|
|
||||||
message: 'Add Report JSON data',
|
|
||||||
committer: {
|
|
||||||
name: 'jessiscript',
|
|
||||||
email: 'pauljessica2001@gmail.com',
|
|
||||||
},
|
|
||||||
author: {
|
|
||||||
name: 'jessiscript',
|
|
||||||
email: 'pauljessica2001@gmail.com',
|
|
||||||
}
|
|
||||||
});
|
|
||||||
console.log(data);
|
|
||||||
const report = createReport(buildOutput);
|
const report = createReport(buildOutput);
|
||||||
if (areJobReportsEnabled()) {
|
if (areJobReportsEnabled()) {
|
||||||
core.summary.addRaw(report);
|
core.summary.addRaw(report);
|
||||||
@ -74781,8 +74759,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.createPRComment = exports.isPREvent = exports.toSemVer = exports.calculateSHA256 = exports.downloadExtractAndCacheJDK = exports.downloadAndExtractJDK = exports.getMatchingTags = exports.getTaggedRelease = exports.getLatestRelease = exports.exec = void 0;
|
exports.saveReportJson = exports.createPRComment = exports.isPREvent = exports.toSemVer = exports.calculateSHA256 = exports.downloadExtractAndCacheJDK = exports.downloadAndExtractJDK = exports.getMatchingTags = exports.getTaggedRelease = exports.getLatestRelease = exports.exec = void 0;
|
||||||
const c = __importStar(__nccwpck_require__(2764));
|
const c = __importStar(__nccwpck_require__(2764));
|
||||||
const core = __importStar(__nccwpck_require__(2258));
|
const core = __importStar(__nccwpck_require__(2258));
|
||||||
const github = __importStar(__nccwpck_require__(7168));
|
const github = __importStar(__nccwpck_require__(7168));
|
||||||
@ -74790,12 +74771,15 @@ const httpClient = __importStar(__nccwpck_require__(9547));
|
|||||||
const tc = __importStar(__nccwpck_require__(5603));
|
const tc = __importStar(__nccwpck_require__(5603));
|
||||||
const exec_1 = __nccwpck_require__(1483);
|
const exec_1 = __nccwpck_require__(1483);
|
||||||
const fs_1 = __nccwpck_require__(7147);
|
const fs_1 = __nccwpck_require__(7147);
|
||||||
const core_1 = __nccwpck_require__(5013);
|
//import {Octokit} from '@octokit/core'
|
||||||
const crypto_1 = __nccwpck_require__(6113);
|
const crypto_1 = __nccwpck_require__(6113);
|
||||||
const path_1 = __nccwpck_require__(1017);
|
const path_1 = __nccwpck_require__(1017);
|
||||||
|
const node_fetch_1 = __importDefault(__nccwpck_require__(831));
|
||||||
|
const js_base64_1 = __nccwpck_require__(7821);
|
||||||
|
const rest_1 = __nccwpck_require__(6175);
|
||||||
// Set up Octokit for github.com only and in the same way as @actions/github (see https://git.io/Jy9YP)
|
// Set up Octokit for github.com only and in the same way as @actions/github (see https://git.io/Jy9YP)
|
||||||
const baseUrl = 'https://api.github.com';
|
const baseUrl = 'https://api.github.com';
|
||||||
const GitHubDotCom = core_1.Octokit.defaults({
|
const GitHubDotCom = rest_1.Octokit.defaults({
|
||||||
baseUrl,
|
baseUrl,
|
||||||
request: {
|
request: {
|
||||||
agent: new httpClient.HttpClient().getAgent(baseUrl)
|
agent: new httpClient.HttpClient().getAgent(baseUrl)
|
||||||
@ -74936,6 +74920,39 @@ function createPRComment(content) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.createPRComment = createPRComment;
|
exports.createPRComment = createPRComment;
|
||||||
|
function saveReportJson(content) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
try {
|
||||||
|
const octokit = new rest_1.Octokit({
|
||||||
|
auth: getGitHubToken(),
|
||||||
|
request: {
|
||||||
|
fetch: node_fetch_1.default,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const contentEncoded = js_base64_1.Base64.encode(content);
|
||||||
|
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
||||||
|
owner: 'jessiscript',
|
||||||
|
repo: 're23_build_tracking',
|
||||||
|
path: 'OUTPUT.json',
|
||||||
|
content: contentEncoded,
|
||||||
|
message: 'Add Report JSON data',
|
||||||
|
committer: {
|
||||||
|
name: 'jessiscript',
|
||||||
|
email: 'pauljessica2001@gmail.com',
|
||||||
|
},
|
||||||
|
author: {
|
||||||
|
name: 'jessiscript',
|
||||||
|
email: 'pauljessica2001@gmail.com',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log(data);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
core.error(`Failed to create pull request comment. Please make sure this job has 'write' permissions for the 'pull-requests' scope (see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions)? Internal error: ${err}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.saveReportJson = saveReportJson;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
75
dist/main/index.js
generated
vendored
75
dist/main/index.js
generated
vendored
@ -74501,9 +74501,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.generateReports = exports.setUpNativeImageBuildReports = void 0;
|
exports.generateReports = exports.setUpNativeImageBuildReports = void 0;
|
||||||
const c = __importStar(__nccwpck_require__(2764));
|
const c = __importStar(__nccwpck_require__(2764));
|
||||||
@ -74514,9 +74511,6 @@ const path_1 = __nccwpck_require__(1017);
|
|||||||
const os_1 = __nccwpck_require__(2037);
|
const os_1 = __nccwpck_require__(2037);
|
||||||
const utils_1 = __nccwpck_require__(2867);
|
const utils_1 = __nccwpck_require__(2867);
|
||||||
const semver_1 = __nccwpck_require__(6560);
|
const semver_1 = __nccwpck_require__(6560);
|
||||||
const js_base64_1 = __nccwpck_require__(7821);
|
|
||||||
const rest_1 = __nccwpck_require__(6175);
|
|
||||||
const node_fetch_1 = __importDefault(__nccwpck_require__(831));
|
|
||||||
const BUILD_OUTPUT_JSON_PATH = (0, path_1.join)((0, os_1.tmpdir)(), 'native-image-build-output.json');
|
const BUILD_OUTPUT_JSON_PATH = (0, path_1.join)((0, os_1.tmpdir)(), 'native-image-build-output.json');
|
||||||
const BYTES_TO_KiB = 1024;
|
const BYTES_TO_KiB = 1024;
|
||||||
const BYTES_TO_MiB = 1024 * 1024;
|
const BYTES_TO_MiB = 1024 * 1024;
|
||||||
@ -74556,29 +74550,7 @@ function generateReports() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const buildOutput = JSON.parse(fs.readFileSync(BUILD_OUTPUT_JSON_PATH, 'utf8'));
|
const buildOutput = JSON.parse(fs.readFileSync(BUILD_OUTPUT_JSON_PATH, 'utf8'));
|
||||||
const octokit = new rest_1.Octokit({
|
(0, utils_1.saveReportJson)(JSON.stringify(buildOutput));
|
||||||
auth: c.INPUT_GITHUB_TOKEN,
|
|
||||||
request: {
|
|
||||||
fetch: node_fetch_1.default,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const contentEncoded = js_base64_1.Base64.encode(JSON.stringify(buildOutput));
|
|
||||||
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
|
||||||
owner: 'jessiscript',
|
|
||||||
repo: 're23_build_tracking',
|
|
||||||
path: 'OUTPUT.json',
|
|
||||||
content: contentEncoded,
|
|
||||||
message: 'Add Report JSON data',
|
|
||||||
committer: {
|
|
||||||
name: 'jessiscript',
|
|
||||||
email: 'pauljessica2001@gmail.com',
|
|
||||||
},
|
|
||||||
author: {
|
|
||||||
name: 'jessiscript',
|
|
||||||
email: 'pauljessica2001@gmail.com',
|
|
||||||
}
|
|
||||||
});
|
|
||||||
console.log(data);
|
|
||||||
const report = createReport(buildOutput);
|
const report = createReport(buildOutput);
|
||||||
if (areJobReportsEnabled()) {
|
if (areJobReportsEnabled()) {
|
||||||
core.summary.addRaw(report);
|
core.summary.addRaw(report);
|
||||||
@ -75778,8 +75750,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.createPRComment = exports.isPREvent = exports.toSemVer = exports.calculateSHA256 = exports.downloadExtractAndCacheJDK = exports.downloadAndExtractJDK = exports.getMatchingTags = exports.getTaggedRelease = exports.getLatestRelease = exports.exec = void 0;
|
exports.saveReportJson = exports.createPRComment = exports.isPREvent = exports.toSemVer = exports.calculateSHA256 = exports.downloadExtractAndCacheJDK = exports.downloadAndExtractJDK = exports.getMatchingTags = exports.getTaggedRelease = exports.getLatestRelease = exports.exec = void 0;
|
||||||
const c = __importStar(__nccwpck_require__(2764));
|
const c = __importStar(__nccwpck_require__(2764));
|
||||||
const core = __importStar(__nccwpck_require__(2258));
|
const core = __importStar(__nccwpck_require__(2258));
|
||||||
const github = __importStar(__nccwpck_require__(7168));
|
const github = __importStar(__nccwpck_require__(7168));
|
||||||
@ -75787,12 +75762,15 @@ const httpClient = __importStar(__nccwpck_require__(9547));
|
|||||||
const tc = __importStar(__nccwpck_require__(5603));
|
const tc = __importStar(__nccwpck_require__(5603));
|
||||||
const exec_1 = __nccwpck_require__(1483);
|
const exec_1 = __nccwpck_require__(1483);
|
||||||
const fs_1 = __nccwpck_require__(7147);
|
const fs_1 = __nccwpck_require__(7147);
|
||||||
const core_1 = __nccwpck_require__(5013);
|
//import {Octokit} from '@octokit/core'
|
||||||
const crypto_1 = __nccwpck_require__(6113);
|
const crypto_1 = __nccwpck_require__(6113);
|
||||||
const path_1 = __nccwpck_require__(1017);
|
const path_1 = __nccwpck_require__(1017);
|
||||||
|
const node_fetch_1 = __importDefault(__nccwpck_require__(831));
|
||||||
|
const js_base64_1 = __nccwpck_require__(7821);
|
||||||
|
const rest_1 = __nccwpck_require__(6175);
|
||||||
// Set up Octokit for github.com only and in the same way as @actions/github (see https://git.io/Jy9YP)
|
// Set up Octokit for github.com only and in the same way as @actions/github (see https://git.io/Jy9YP)
|
||||||
const baseUrl = 'https://api.github.com';
|
const baseUrl = 'https://api.github.com';
|
||||||
const GitHubDotCom = core_1.Octokit.defaults({
|
const GitHubDotCom = rest_1.Octokit.defaults({
|
||||||
baseUrl,
|
baseUrl,
|
||||||
request: {
|
request: {
|
||||||
agent: new httpClient.HttpClient().getAgent(baseUrl)
|
agent: new httpClient.HttpClient().getAgent(baseUrl)
|
||||||
@ -75933,6 +75911,39 @@ function createPRComment(content) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.createPRComment = createPRComment;
|
exports.createPRComment = createPRComment;
|
||||||
|
function saveReportJson(content) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
try {
|
||||||
|
const octokit = new rest_1.Octokit({
|
||||||
|
auth: getGitHubToken(),
|
||||||
|
request: {
|
||||||
|
fetch: node_fetch_1.default,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const contentEncoded = js_base64_1.Base64.encode(content);
|
||||||
|
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
||||||
|
owner: 'jessiscript',
|
||||||
|
repo: 're23_build_tracking',
|
||||||
|
path: 'OUTPUT.json',
|
||||||
|
content: contentEncoded,
|
||||||
|
message: 'Add Report JSON data',
|
||||||
|
committer: {
|
||||||
|
name: 'jessiscript',
|
||||||
|
email: 'pauljessica2001@gmail.com',
|
||||||
|
},
|
||||||
|
author: {
|
||||||
|
name: 'jessiscript',
|
||||||
|
email: 'pauljessica2001@gmail.com',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log(data);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
core.error(`Failed to create pull request comment. Please make sure this job has 'write' permissions for the 'pull-requests' scope (see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions)? Internal error: ${err}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
exports.saveReportJson = saveReportJson;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
@ -4,7 +4,7 @@ import * as fs from 'fs'
|
|||||||
import * as github from '@actions/github'
|
import * as github from '@actions/github'
|
||||||
import {join} from 'path'
|
import {join} from 'path'
|
||||||
import {tmpdir} from 'os'
|
import {tmpdir} from 'os'
|
||||||
import {createPRComment, isPREvent, toSemVer} from '../utils'
|
import {createPRComment, isPREvent, saveReportJson, toSemVer} from '../utils'
|
||||||
import {gte} from 'semver'
|
import {gte} from 'semver'
|
||||||
import {Base64} from 'js-base64';
|
import {Base64} from 'js-base64';
|
||||||
import { Octokit } from '@octokit/rest';
|
import { Octokit } from '@octokit/rest';
|
||||||
@ -134,32 +134,7 @@ export async function generateReports(): Promise<void> {
|
|||||||
fs.readFileSync(BUILD_OUTPUT_JSON_PATH, 'utf8')
|
fs.readFileSync(BUILD_OUTPUT_JSON_PATH, 'utf8')
|
||||||
)
|
)
|
||||||
|
|
||||||
const octokit = new Octokit({
|
saveReportJson(JSON.stringify(buildOutput))
|
||||||
auth: c.INPUT_GITHUB_TOKEN,
|
|
||||||
request: {
|
|
||||||
fetch: fetch,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
const contentEncoded = Base64.encode(JSON.stringify(buildOutput))
|
|
||||||
|
|
||||||
|
|
||||||
const { data } = await octokit.repos.createOrUpdateFileContents({
|
|
||||||
owner: 'jessiscript',
|
|
||||||
repo: 're23_build_tracking',
|
|
||||||
path: 'OUTPUT.json',
|
|
||||||
content: contentEncoded,
|
|
||||||
message: 'Add Report JSON data',
|
|
||||||
committer: {
|
|
||||||
name: 'jessiscript',
|
|
||||||
email: 'pauljessica2001@gmail.com',
|
|
||||||
},
|
|
||||||
author:{
|
|
||||||
name: 'jessiscript',
|
|
||||||
email: 'pauljessica2001@gmail.com',
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
const report = createReport(buildOutput)
|
const report = createReport(buildOutput)
|
||||||
if (areJobReportsEnabled()) {
|
if (areJobReportsEnabled()) {
|
||||||
|
41
src/utils.ts
41
src/utils.ts
@ -5,9 +5,12 @@ import * as httpClient from '@actions/http-client'
|
|||||||
import * as tc from '@actions/tool-cache'
|
import * as tc from '@actions/tool-cache'
|
||||||
import {ExecOptions, exec as e} from '@actions/exec'
|
import {ExecOptions, exec as e} from '@actions/exec'
|
||||||
import {readFileSync, readdirSync} from 'fs'
|
import {readFileSync, readdirSync} from 'fs'
|
||||||
import {Octokit} from '@octokit/core'
|
//import {Octokit} from '@octokit/core'
|
||||||
import {createHash} from 'crypto'
|
import {createHash} from 'crypto'
|
||||||
import {join} from 'path'
|
import {join} from 'path'
|
||||||
|
import fetch from "node-fetch";
|
||||||
|
import {Base64} from "js-base64";
|
||||||
|
import { Octokit } from '@octokit/rest';
|
||||||
|
|
||||||
// Set up Octokit for github.com only and in the same way as @actions/github (see https://git.io/Jy9YP)
|
// Set up Octokit for github.com only and in the same way as @actions/github (see https://git.io/Jy9YP)
|
||||||
const baseUrl = 'https://api.github.com'
|
const baseUrl = 'https://api.github.com'
|
||||||
@ -173,3 +176,39 @@ export async function createPRComment(content: string): Promise<void> {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function saveReportJson(content: string): Promise<void> {
|
||||||
|
try {
|
||||||
|
const octokit = new Octokit({
|
||||||
|
auth: getGitHubToken(),
|
||||||
|
request: {
|
||||||
|
fetch: fetch,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const contentEncoded = Base64.encode(content)
|
||||||
|
|
||||||
|
|
||||||
|
const { data } = await octokit.repos.createOrUpdateFileContents({
|
||||||
|
owner: 'jessiscript',
|
||||||
|
repo: 're23_build_tracking',
|
||||||
|
path: 'OUTPUT.json',
|
||||||
|
content: contentEncoded,
|
||||||
|
message: 'Add Report JSON data',
|
||||||
|
committer: {
|
||||||
|
name: 'jessiscript',
|
||||||
|
email: 'pauljessica2001@gmail.com',
|
||||||
|
},
|
||||||
|
author:{
|
||||||
|
name: 'jessiscript',
|
||||||
|
email: 'pauljessica2001@gmail.com',
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(data);
|
||||||
|
} catch (err) {
|
||||||
|
core.error(
|
||||||
|
`Failed to create pull request comment. Please make sure this job has 'write' permissions for the 'pull-requests' scope (see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions)? Internal error: ${err}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user