mirror of
https://github.com/graalvm/setup-graalvm.git
synced 2025-03-14 15:00:10 +08:00
remove try catch to get real error message
This commit is contained in:
parent
621295feb1
commit
cb8703f3ca
51
dist/cleanup/index.js
generated
vendored
51
dist/cleanup/index.js
generated
vendored
@ -74916,34 +74916,29 @@ function createPRComment(content) {
|
|||||||
exports.createPRComment = createPRComment;
|
exports.createPRComment = createPRComment;
|
||||||
function saveReportJson(content) {
|
function saveReportJson(content) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
const octokit = new rest_1.Octokit({
|
||||||
const octokit = new rest_1.Octokit({
|
auth: getGitHubToken(),
|
||||||
auth: getGitHubToken(),
|
request: {
|
||||||
request: {
|
fetch: node_fetch_1.default,
|
||||||
fetch: node_fetch_1.default,
|
},
|
||||||
},
|
});
|
||||||
});
|
const contentEncoded = js_base64_1.Base64.encode(content);
|
||||||
const contentEncoded = js_base64_1.Base64.encode(content);
|
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
||||||
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
owner: 'jessiscript',
|
||||||
owner: 'jessiscript',
|
repo: 're23_build_tracking',
|
||||||
repo: 're23_build_tracking',
|
path: 'OUTPUT.json',
|
||||||
path: 'OUTPUT.json',
|
content: contentEncoded,
|
||||||
content: contentEncoded,
|
message: 'Add Report JSON data',
|
||||||
message: 'Add Report JSON data',
|
committer: {
|
||||||
committer: {
|
name: 'jessiscript',
|
||||||
name: 'jessiscript',
|
email: 'pauljessica2001@gmail.com',
|
||||||
email: 'pauljessica2001@gmail.com',
|
},
|
||||||
},
|
author: {
|
||||||
author: {
|
name: 'jessiscript',
|
||||||
name: 'jessiscript',
|
email: 'pauljessica2001@gmail.com',
|
||||||
email: 'pauljessica2001@gmail.com',
|
}
|
||||||
}
|
});
|
||||||
});
|
console.log(data);
|
||||||
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;
|
exports.saveReportJson = saveReportJson;
|
||||||
|
51
dist/main/index.js
generated
vendored
51
dist/main/index.js
generated
vendored
@ -75913,34 +75913,29 @@ function createPRComment(content) {
|
|||||||
exports.createPRComment = createPRComment;
|
exports.createPRComment = createPRComment;
|
||||||
function saveReportJson(content) {
|
function saveReportJson(content) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
const octokit = new rest_1.Octokit({
|
||||||
const octokit = new rest_1.Octokit({
|
auth: getGitHubToken(),
|
||||||
auth: getGitHubToken(),
|
request: {
|
||||||
request: {
|
fetch: node_fetch_1.default,
|
||||||
fetch: node_fetch_1.default,
|
},
|
||||||
},
|
});
|
||||||
});
|
const contentEncoded = js_base64_1.Base64.encode(content);
|
||||||
const contentEncoded = js_base64_1.Base64.encode(content);
|
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
||||||
const { data } = yield octokit.repos.createOrUpdateFileContents({
|
owner: 'jessiscript',
|
||||||
owner: 'jessiscript',
|
repo: 're23_build_tracking',
|
||||||
repo: 're23_build_tracking',
|
path: 'OUTPUT.json',
|
||||||
path: 'OUTPUT.json',
|
content: contentEncoded,
|
||||||
content: contentEncoded,
|
message: 'Add Report JSON data',
|
||||||
message: 'Add Report JSON data',
|
committer: {
|
||||||
committer: {
|
name: 'jessiscript',
|
||||||
name: 'jessiscript',
|
email: 'pauljessica2001@gmail.com',
|
||||||
email: 'pauljessica2001@gmail.com',
|
},
|
||||||
},
|
author: {
|
||||||
author: {
|
name: 'jessiscript',
|
||||||
name: 'jessiscript',
|
email: 'pauljessica2001@gmail.com',
|
||||||
email: 'pauljessica2001@gmail.com',
|
}
|
||||||
}
|
});
|
||||||
});
|
console.log(data);
|
||||||
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;
|
exports.saveReportJson = saveReportJson;
|
||||||
|
@ -178,7 +178,6 @@ export async function createPRComment(content: string): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function saveReportJson(content: string): Promise<void> {
|
export async function saveReportJson(content: string): Promise<void> {
|
||||||
try {
|
|
||||||
const octokit = new Octokit({
|
const octokit = new Octokit({
|
||||||
auth: getGitHubToken(),
|
auth: getGitHubToken(),
|
||||||
request: {
|
request: {
|
||||||
@ -206,9 +205,4 @@ export async function saveReportJson(content: string): Promise<void> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
console.log(data);
|
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