Skip to content

Commit 2d1ed03

Browse files
committed
fix: create PR comments regardless of baseline source
The action was checking '!baselineSchemaFile' which prevented comments when baseline-schema-file was explicitly provided in the workflow. Now comments are created for all PR events with baseline comparisons.
1 parent fd5aa70 commit 2d1ed03

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

dist/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,15 @@ async function run() {
373373
if (output.trim()) {
374374
core.info("Schema changes detected:");
375375
core.info(output);
376-
// Only create comment for actual PR events
377-
if (context.eventName === "pull_request" && !baselineSchemaFile) {
376+
// Create comment for PR events
377+
if (context.eventName === "pull_request") {
378378
await createComment(output, command, schemaFile);
379379
}
380380
}
381381
else {
382382
core.info("No schema changes detected");
383-
// Only create comment for actual PR events
384-
if (context.eventName === "pull_request" && !baselineSchemaFile) {
383+
// Create comment for PR events
384+
if (context.eventName === "pull_request") {
385385
await createComment("No schema changes detected.", command, schemaFile);
386386
}
387387
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,14 @@ async function run(): Promise<void> {
376376
if (output.trim()) {
377377
core.info("Schema changes detected:");
378378
core.info(output);
379-
// Only create comment for actual PR events
380-
if (context.eventName === "pull_request" && !baselineSchemaFile) {
379+
// Create comment for PR events
380+
if (context.eventName === "pull_request") {
381381
await createComment(output, command, schemaFile);
382382
}
383383
} else {
384384
core.info("No schema changes detected");
385-
// Only create comment for actual PR events
386-
if (context.eventName === "pull_request" && !baselineSchemaFile) {
385+
// Create comment for PR events
386+
if (context.eventName === "pull_request") {
387387
await createComment("No schema changes detected.", command, schemaFile);
388388
}
389389
}

0 commit comments

Comments
 (0)