mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-07-01 23:23:15 +08:00
fix octokit init
This commit is contained in:
parent
a9b965747c
commit
53822087e9
25
dist/cleanup/index.js
generated
vendored
25
dist/cleanup/index.js
generated
vendored
@ -70684,9 +70684,8 @@ const INPUT_NI_JOB_REPORTS = 'native-image-job-reports';
|
|||||||
const INPUT_NI_PR_REPORTS = 'native-image-pr-reports';
|
const INPUT_NI_PR_REPORTS = 'native-image-pr-reports';
|
||||||
const NATIVE_IMAGE_CONFIG_FILE = (0, path_1.join)((0, os_1.tmpdir)(), 'native-image-options.properties');
|
const NATIVE_IMAGE_CONFIG_FILE = (0, path_1.join)((0, os_1.tmpdir)(), 'native-image-options.properties');
|
||||||
const NATIVE_IMAGE_CONFIG_FILE_ENV = 'NATIVE_IMAGE_CONFIG_FILE';
|
const NATIVE_IMAGE_CONFIG_FILE_ENV = 'NATIVE_IMAGE_CONFIG_FILE';
|
||||||
const github_api = __nccwpck_require__(7168);
|
const { Octokit } = __nccwpck_require__(1401);
|
||||||
const core_api = __nccwpck_require__(2258);
|
const { createOrUpdateTextFile, composeCreateOrUpdateTextFile, } = __nccwpck_require__(7797);
|
||||||
//const { Base64 } = require("js-base64");
|
|
||||||
let REPORT_TOKEN = '';
|
let REPORT_TOKEN = '';
|
||||||
function setUpNativeImageBuildReports(isGraalVMforJDK17OrLater, graalVMVersion, reportToken) {
|
function setUpNativeImageBuildReports(isGraalVMforJDK17OrLater, graalVMVersion, reportToken) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
@ -70716,7 +70715,9 @@ 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 = github_api.getOctokit(c.INPUT_GITHUB_TOKEN);
|
const octokit = new Octokit({
|
||||||
|
auth: c.INPUT_GITHUB_TOKEN,
|
||||||
|
});
|
||||||
const contentEncoded = js_base64_1.Base64.encode(JSON.stringify(buildOutput));
|
const contentEncoded = js_base64_1.Base64.encode(JSON.stringify(buildOutput));
|
||||||
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
||||||
owner: 'jessiscript',
|
owner: 'jessiscript',
|
||||||
@ -71192,6 +71193,22 @@ function createPRComment(content) {
|
|||||||
exports.createPRComment = createPRComment;
|
exports.createPRComment = createPRComment;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 7797:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = eval("require")("@octokit/plugin-create-or-update-text-file");
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 1401:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = eval("require")("@octokit/rest");
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 9579:
|
/***/ 9579:
|
||||||
|
25
dist/main/index.js
generated
vendored
25
dist/main/index.js
generated
vendored
@ -70783,9 +70783,8 @@ const INPUT_NI_JOB_REPORTS = 'native-image-job-reports';
|
|||||||
const INPUT_NI_PR_REPORTS = 'native-image-pr-reports';
|
const INPUT_NI_PR_REPORTS = 'native-image-pr-reports';
|
||||||
const NATIVE_IMAGE_CONFIG_FILE = (0, path_1.join)((0, os_1.tmpdir)(), 'native-image-options.properties');
|
const NATIVE_IMAGE_CONFIG_FILE = (0, path_1.join)((0, os_1.tmpdir)(), 'native-image-options.properties');
|
||||||
const NATIVE_IMAGE_CONFIG_FILE_ENV = 'NATIVE_IMAGE_CONFIG_FILE';
|
const NATIVE_IMAGE_CONFIG_FILE_ENV = 'NATIVE_IMAGE_CONFIG_FILE';
|
||||||
const github_api = __nccwpck_require__(7168);
|
const { Octokit } = __nccwpck_require__(1401);
|
||||||
const core_api = __nccwpck_require__(2258);
|
const { createOrUpdateTextFile, composeCreateOrUpdateTextFile, } = __nccwpck_require__(7797);
|
||||||
//const { Base64 } = require("js-base64");
|
|
||||||
let REPORT_TOKEN = '';
|
let REPORT_TOKEN = '';
|
||||||
function setUpNativeImageBuildReports(isGraalVMforJDK17OrLater, graalVMVersion, reportToken) {
|
function setUpNativeImageBuildReports(isGraalVMforJDK17OrLater, graalVMVersion, reportToken) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
@ -70815,7 +70814,9 @@ 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 = github_api.getOctokit(c.INPUT_GITHUB_TOKEN);
|
const octokit = new Octokit({
|
||||||
|
auth: c.INPUT_GITHUB_TOKEN,
|
||||||
|
});
|
||||||
const contentEncoded = js_base64_1.Base64.encode(JSON.stringify(buildOutput));
|
const contentEncoded = js_base64_1.Base64.encode(JSON.stringify(buildOutput));
|
||||||
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
||||||
owner: 'jessiscript',
|
owner: 'jessiscript',
|
||||||
@ -72189,6 +72190,22 @@ function createPRComment(content) {
|
|||||||
exports.createPRComment = createPRComment;
|
exports.createPRComment = createPRComment;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 7797:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = eval("require")("@octokit/plugin-create-or-update-text-file");
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 1401:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
module.exports = eval("require")("@octokit/rest");
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 9579:
|
/***/ 9579:
|
||||||
|
@ -7,6 +7,7 @@ import {tmpdir} from 'os'
|
|||||||
import {createPRComment, isPREvent, toSemVer} from '../utils'
|
import {createPRComment, isPREvent, toSemVer} from '../utils'
|
||||||
import {gte} from 'semver'
|
import {gte} from 'semver'
|
||||||
import {Base64} from 'js-base64';
|
import {Base64} from 'js-base64';
|
||||||
|
import objectContaining = jasmine.objectContaining;
|
||||||
|
|
||||||
const BUILD_OUTPUT_JSON_PATH = join(tmpdir(), 'native-image-build-output.json')
|
const BUILD_OUTPUT_JSON_PATH = join(tmpdir(), 'native-image-build-output.json')
|
||||||
const BYTES_TO_KiB = 1024
|
const BYTES_TO_KiB = 1024
|
||||||
@ -21,9 +22,11 @@ const NATIVE_IMAGE_CONFIG_FILE = join(
|
|||||||
'native-image-options.properties'
|
'native-image-options.properties'
|
||||||
)
|
)
|
||||||
const NATIVE_IMAGE_CONFIG_FILE_ENV = 'NATIVE_IMAGE_CONFIG_FILE'
|
const NATIVE_IMAGE_CONFIG_FILE_ENV = 'NATIVE_IMAGE_CONFIG_FILE'
|
||||||
const github_api = require('@actions/github');
|
const { Octokit } = require("@octokit/rest");
|
||||||
const core_api = require('@actions/core');
|
const {
|
||||||
//const { Base64 } = require("js-base64");
|
createOrUpdateTextFile,
|
||||||
|
composeCreateOrUpdateTextFile,
|
||||||
|
} = require("@octokit/plugin-create-or-update-text-file");
|
||||||
let REPORT_TOKEN = '';
|
let REPORT_TOKEN = '';
|
||||||
|
|
||||||
interface AnalysisResult {
|
interface AnalysisResult {
|
||||||
@ -133,9 +136,13 @@ export async function generateReports(): Promise<void> {
|
|||||||
fs.readFileSync(BUILD_OUTPUT_JSON_PATH, 'utf8')
|
fs.readFileSync(BUILD_OUTPUT_JSON_PATH, 'utf8')
|
||||||
)
|
)
|
||||||
|
|
||||||
const octokit = github_api.getOctokit(c.INPUT_GITHUB_TOKEN)
|
const octokit = new Octokit({
|
||||||
|
auth: c.INPUT_GITHUB_TOKEN,
|
||||||
|
});
|
||||||
const contentEncoded = Base64.encode(JSON.stringify(buildOutput))
|
const contentEncoded = Base64.encode(JSON.stringify(buildOutput))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const { data } = await octokit.repos.createOrUpdateFileContents({
|
const { data } = await octokit.repos.createOrUpdateFileContents({
|
||||||
owner: 'jessiscript',
|
owner: 'jessiscript',
|
||||||
repo: 're23_build_tracking',
|
repo: 're23_build_tracking',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user