remove try catch to get real error message

This commit is contained in:
jpaul 2023-11-13 06:15:38 +01:00
parent 621295feb1
commit cb8703f3ca
3 changed files with 46 additions and 62 deletions

5
dist/cleanup/index.js generated vendored
View File

@ -74916,7 +74916,6 @@ function createPRComment(content) {
exports.createPRComment = createPRComment;
function saveReportJson(content) {
return __awaiter(this, void 0, void 0, function* () {
try {
const octokit = new rest_1.Octokit({
auth: getGitHubToken(),
request: {
@ -74940,10 +74939,6 @@ function saveReportJson(content) {
}
});
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;

5
dist/main/index.js generated vendored
View File

@ -75913,7 +75913,6 @@ function createPRComment(content) {
exports.createPRComment = createPRComment;
function saveReportJson(content) {
return __awaiter(this, void 0, void 0, function* () {
try {
const octokit = new rest_1.Octokit({
auth: getGitHubToken(),
request: {
@ -75937,10 +75936,6 @@ function saveReportJson(content) {
}
});
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;

View File

@ -178,7 +178,6 @@ export async function createPRComment(content: string): Promise<void> {
}
export async function saveReportJson(content: string): Promise<void> {
try {
const octokit = new Octokit({
auth: getGitHubToken(),
request: {
@ -206,9 +205,4 @@ export async function saveReportJson(content: string): Promise<void> {
});
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}`
)
}
}