Skip to content

Commit e9da58c

Browse files
authored
fix: comment false does not work (#527)
* fix: comment false does not work replaced `getInput` to `getBooleanInput` for reading boolean options * fix: replaced getInput to getBooleanInput in tests
1 parent ac9d961 commit e9da58c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33035,7 +33035,7 @@ async function run() {
3303533035
if (!linkedIssuesCount) {
3303633036
const prId = pullRequest?.id;
3303733037
const shouldComment =
33038-
!linkedIssuesComments.length && core.getInput("comment") && prId;
33038+
!linkedIssuesComments.length && core.getBooleanInput("comment") && prId;
3303933039

3304033040
if (shouldComment) {
3304133041
const body = core.getInput("custom-body-comment");

src/action.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ async function run() {
7676
if (!linkedIssuesCount) {
7777
const prId = pullRequest?.id;
7878
const shouldComment =
79-
!linkedIssuesComments.length && core.getInput("comment") && prId;
79+
!linkedIssuesComments.length && core.getBooleanInput("comment") && prId;
8080

8181
if (shouldComment) {
8282
const body = core.getInput("custom-body-comment");

src/action.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ test.each([["pull_request"], ["pull_request_target"]])(
194194
});
195195

196196
// eslint-disable-next-line
197-
core.getInput.mockReturnValue("true");
197+
core.getBooleanInput.mockReturnValue("true");
198198

199199
await run();
200200

@@ -268,7 +268,7 @@ test.each([["pull_request"], ["pull_request_target"]])(
268268
});
269269

270270
// eslint-disable-next-line
271-
core.getInput.mockReturnValue("true");
271+
core.getBooleanInput.mockReturnValue("true");
272272

273273
await run();
274274

@@ -318,7 +318,7 @@ test.each([["pull_request"], ["pull_request_target"]])(
318318
});
319319

320320
// eslint-disable-next-line
321-
core.getInput.mockReturnValue("");
321+
core.getBooleanInput.mockReturnValue("");
322322

323323
await run();
324324

0 commit comments

Comments
 (0)