generated from alexk111/node-red-node-typescript-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
github-adding-label-to-new-issues.json
98 lines (98 loc) · 2.09 KB
/
github-adding-label-to-new-issues.json
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
[
{
"id": "c4419a25.f43718",
"type": "github-webhook",
"z": "a1b0b10c.cd51a",
"path": "/github-webhook",
"name": "",
"x": 320,
"y": 340,
"wires": [["f1a8fb8d.6a3778"]]
},
{
"id": "f1a8fb8d.6a3778",
"type": "switch",
"z": "a1b0b10c.cd51a",
"name": "Which type?",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "issues",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 510,
"y": 340,
"wires": [["87a4a50a.221488"]]
},
{
"id": "87a4a50a.221488",
"type": "switch",
"z": "a1b0b10c.cd51a",
"name": "Which action?",
"property": "payload.action",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "opened",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 700,
"y": 340,
"wires": [["b2affab1.141348"]]
},
{
"id": "6620878f.e1b268",
"type": "github-rest-api",
"z": "a1b0b10c.cd51a",
"endpoint": "POST /repos/{owner}/{repo}/issues/{issue_number}/labels",
"client": "ef21f219.57adb",
"name": "Add label",
"x": 920,
"y": 360,
"wires": [[]]
},
{
"id": "b2affab1.141348",
"type": "function",
"z": "a1b0b10c.cd51a",
"name": "Prep API data",
"func": "msg.payload = {\n \"owner\": msg.payload.repository.owner.login,\n \"repo\": msg.payload.repository.name,\n \"issue_number\": msg.payload.issue.number,\n \"labels\": [\"needs-response\"]\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 900,
"y": 320,
"wires": [["6620878f.e1b268"]]
},
{
"id": "4c17fd91.505a14",
"type": "comment",
"z": "a1b0b10c.cd51a",
"name": "Add needs-response label to new issues",
"info": "",
"x": 400,
"y": 280,
"wires": []
},
{
"id": "ef21f219.57adb",
"type": "github-api-config",
"z": "",
"appId": "12345",
"instId": "12345678",
"ua": "add-label-app",
"name": ""
}
]