Skip to content

Commit 4ad4e68

Browse files
committed
Should comment on PR only if cloud test run is executed
1 parent 9570743 commit 4ad4e68

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

dist/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -35512,7 +35512,7 @@ async function run() {
3551235512
const inspectFlags = core.getInput('inspect-flags');
3551335513
const cloudRunLocally = core.getBooleanInput('cloud-run-locally');
3551435514
const onlyVerifyScripts = core.getBooleanInput('only-verify-scripts');
35515-
const shouldCommentCloudTestRunUrlOnPR = core.getBooleanInput('cloud-comment-on-pr');
35515+
const shouldCommentOnPR = core.getBooleanInput('cloud-comment-on-pr');
3551635516
const debug = core.getBooleanInput('debug');
3551735517
const allPromises = [];
3551835518
core.debug(`Flag to show k6 progress output set to: ${debug}`);
@@ -35625,7 +35625,7 @@ async function run() {
3562535625
}
3562635626
}
3562735627
await Promise.all(allPromises);
35628-
if (shouldCommentCloudTestRunUrlOnPR) {
35628+
if (isCloud && shouldCommentOnPR) {
3562935629
// Generate PR comment with test run URLs
3563035630
await (0, githubHelper_1.generatePRComment)(TEST_RESULT_URLS_MAP);
3563135631
}

src/index.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ export async function run(): Promise<void> {
3131
const inspectFlags = core.getInput('inspect-flags')
3232
const cloudRunLocally = core.getBooleanInput('cloud-run-locally')
3333
const onlyVerifyScripts = core.getBooleanInput('only-verify-scripts')
34-
const shouldCommentCloudTestRunUrlOnPR = core.getBooleanInput(
35-
'cloud-comment-on-pr'
36-
)
34+
const shouldCommentOnPR = core.getBooleanInput('cloud-comment-on-pr')
3735
const debug = core.getBooleanInput('debug')
3836

3937
const allPromises: Promise<void>[] = []
@@ -183,7 +181,7 @@ export async function run(): Promise<void> {
183181
}
184182
await Promise.all(allPromises)
185183

186-
if (shouldCommentCloudTestRunUrlOnPR) {
184+
if (isCloud && shouldCommentOnPR) {
187185
// Generate PR comment with test run URLs
188186
await generatePRComment(TEST_RESULT_URLS_MAP)
189187
}

0 commit comments

Comments
 (0)