correcting bug with async env
parent
94c3601e58
commit
237fa754fd
|
@ -6426,11 +6426,11 @@ class GitHub {
|
|||
}
|
||||
static createGitHubCheck(summary) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
if (!cloud_runner_options_1.default.githubChecks || !cloud_runner_1.default.isCloudRunnerEnvironment) {
|
||||
if (!cloud_runner_options_1.default.githubChecks || cloud_runner_1.default.isCloudRunnerEnvironment) {
|
||||
return ``;
|
||||
}
|
||||
GitHub.startedDate = new Date().toISOString();
|
||||
cloud_runner_logger_1.default.log(`POST /repos/${GitHub.owner}/${GitHub.repo}/check-runs`);
|
||||
cloud_runner_logger_1.default.log(`POST /repos/{owner}/{repo}/check-runs`);
|
||||
const data = {
|
||||
owner: GitHub.owner,
|
||||
repo: GitHub.repo,
|
||||
|
@ -6513,7 +6513,7 @@ class GitHub {
|
|||
if (mode === `create`) {
|
||||
throw new Error(`Not supported: only use update`);
|
||||
}
|
||||
const workflowsResult = yield GitHub.octokitPAT.request(`GET /repos/${GitHub.owner}/${GitHub.repo}/actions/workflows`, {
|
||||
const workflowsResult = yield GitHub.octokitPAT.request(`GET /repos/{owner}/{repo}/actions/workflows`, {
|
||||
owner: GitHub.owner,
|
||||
repo: GitHub.repo,
|
||||
});
|
||||
|
@ -6521,7 +6521,7 @@ class GitHub {
|
|||
let selectedId = ``;
|
||||
for (let index = 0; index < workflowsResult.data.total_count; index++) {
|
||||
if (workflows[index].name === GitHub.asyncChecksApiWorkflowName) {
|
||||
selectedId = workflows[index].id;
|
||||
selectedId = workflows[index].id.toString();
|
||||
}
|
||||
}
|
||||
if (selectedId === ``) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -44,12 +44,12 @@ class GitHub {
|
|||
}
|
||||
|
||||
public static async createGitHubCheck(summary) {
|
||||
if (!CloudRunnerOptions.githubChecks || !CloudRunner.isCloudRunnerEnvironment) {
|
||||
if (!CloudRunnerOptions.githubChecks || CloudRunner.isCloudRunnerEnvironment) {
|
||||
return ``;
|
||||
}
|
||||
GitHub.startedDate = new Date().toISOString();
|
||||
|
||||
CloudRunnerLogger.log(`POST /repos/${GitHub.owner}/${GitHub.repo}/check-runs`);
|
||||
CloudRunnerLogger.log(`POST /repos/{owner}/{repo}/check-runs`);
|
||||
|
||||
const data = {
|
||||
owner: GitHub.owner,
|
||||
|
@ -134,18 +134,15 @@ class GitHub {
|
|||
if (mode === `create`) {
|
||||
throw new Error(`Not supported: only use update`);
|
||||
}
|
||||
const workflowsResult = await GitHub.octokitPAT.request(
|
||||
`GET /repos/${GitHub.owner}/${GitHub.repo}/actions/workflows`,
|
||||
{
|
||||
const workflowsResult = await GitHub.octokitPAT.request(`GET /repos/{owner}/{repo}/actions/workflows`, {
|
||||
owner: GitHub.owner,
|
||||
repo: GitHub.repo,
|
||||
},
|
||||
);
|
||||
});
|
||||
const workflows = workflowsResult.data.workflows;
|
||||
let selectedId = ``;
|
||||
for (let index = 0; index < workflowsResult.data.total_count; index++) {
|
||||
if (workflows[index].name === GitHub.asyncChecksApiWorkflowName) {
|
||||
selectedId = workflows[index].id;
|
||||
selectedId = workflows[index].id.toString();
|
||||
}
|
||||
}
|
||||
if (selectedId === ``) {
|
||||
|
|
Loading…
Reference in New Issue