-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Expand file tree
/
Copy pathcreate-issue-comment.mjs
More file actions
53 lines (50 loc) · 1.22 KB
/
create-issue-comment.mjs
File metadata and controls
53 lines (50 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import github from "../../github.app.mjs";
export default {
key: "github-create-issue-comment",
name: "Create Issue Comment",
description: "Create a new comment in a issue. [See the documentation](https://docs.github.com/en/rest/issues/comments#create-an-issue-comment)",
version: "0.0.25",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
type: "action",
props: {
github,
repoFullname: {
propDefinition: [
github,
"repoFullname",
],
},
issueNumber: {
label: "Issue Number",
description: "The number that identifies the issue.",
type: "integer",
propDefinition: [
github,
"issueNumber",
(c) => ({
repoFullname: c.repoFullname,
}),
],
},
body: {
label: "Body",
description: "The contents of the comment",
type: "string",
},
},
async run({ $ }) {
const response = await this.github.createIssueComment({
repoFullname: this.repoFullname,
issueNumber: this.issueNumber,
data: {
body: this.body,
},
});
$.export("$summary", "Successfully commented in the issue.");
return response;
},
};