correcting bug with async env

pull/496/head
Frostebite 2023-01-21 01:13:37 +00:00
parent 11a35fd3df
commit 044f1a3061
3 changed files with 9 additions and 5 deletions

5
dist/index.js generated vendored
View File

@ -6477,7 +6477,8 @@ class GitHub {
}
static updateGitHubCheck(longDescription, summary, result = `neutral`, status = `in_progress`) {
return __awaiter(this, void 0, void 0, function* () {
if (!cloud_runner_options_1.default.githubChecks) {
if (!cloud_runner_options_1.default.githubChecks ||
(!cloud_runner_1.default.isCloudRunnerEnvironment && cloud_runner_options_1.default.asyncCloudRunner)) {
return;
}
GitHub.longDescriptionContent += `\n${longDescription}`;
@ -6507,7 +6508,7 @@ class GitHub {
data.completed_at = GitHub.endedDate || GitHub.startedDate;
data.conclusion = result;
}
if (cloud_runner_1.default.isCloudRunnerEnvironment && !cloud_runner_1.default.isCloudRunnerAsyncEnvironment) {
if (cloud_runner_1.default.isCloudRunnerAsyncEnvironment) {
yield GitHub.runUpdateAsyncChecksWorkflow(data, `update`);
cloud_runner_logger_1.default.log(`Updating check via async update workflow`);
return;

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -81,7 +81,10 @@ class GitHub {
}
public static async updateGitHubCheck(longDescription, summary, result = `neutral`, status = `in_progress`) {
if (!CloudRunnerOptions.githubChecks) {
if (
!CloudRunnerOptions.githubChecks ||
(!CloudRunner.isCloudRunnerEnvironment && CloudRunnerOptions.asyncCloudRunner)
) {
return;
}
GitHub.longDescriptionContent += `\n${longDescription}`;
@ -114,7 +117,7 @@ class GitHub {
data.conclusion = result;
}
if (CloudRunner.isCloudRunnerEnvironment && !CloudRunner.isCloudRunnerAsyncEnvironment) {
if (CloudRunner.isCloudRunnerAsyncEnvironment) {
await GitHub.runUpdateAsyncChecksWorkflow(data, `update`);
CloudRunnerLogger.log(`Updating check via async update workflow`);