We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2caa56e commit 5db82fbCopy full SHA for 5db82fb
1 file changed
.github/workflows/comment-on-issue.yml
@@ -8,6 +8,7 @@ on:
8
inputs:
9
issue_number:
10
description: "Issue number"
11
+ type: number
12
required: true
13
14
permissions:
@@ -30,9 +31,12 @@ jobs:
30
31
issue_number = Number(core.getInput("issue_number"));
32
}
33
- if (!issue_number) {
34
- throw new Error(`Unsupported trigger: ${context.eventName}`);
+ if (!issue_number || Number.isNaN(issue_number)) {
35
+ throw new Error(
36
+ `Invalid issue_number for event ${context.eventName}. Got: "${core.getInput("issue_number")}"`
37
+ );
38
39
+
40
github.rest.issues.createComment({
41
issue_number: issue_number,
42
owner: context.repo.owner,
0 commit comments