@pipedream/linear_app 0.4.7 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/create-issue/create-issue.mjs +12 -1
- package/actions/get-issue/get-issue.mjs +1 -1
- package/actions/get-teams/get-teams.mjs +1 -1
- package/actions/search-issues/search-issues.mjs +1 -1
- package/actions/update-issue/update-issue.mjs +28 -4
- package/linear_app.app.mjs +62 -18
- package/package.json +1 -1
- package/sources/comment-created-instant/comment-created-instant.mjs +1 -1
- package/sources/issue-created-instant/issue-created-instant.mjs +1 -1
- package/sources/issue-updated-instant/issue-updated-instant.mjs +1 -1
- package/sources/new-issue-status-updated/new-issue-status-updated.mjs +1 -1
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "linear_app-create-issue",
|
|
6
6
|
name: "Create Issue",
|
|
7
7
|
description: "Create an issue (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues)",
|
|
8
|
-
version: "0.
|
|
8
|
+
version: "0.4.0",
|
|
9
9
|
props: {
|
|
10
10
|
linearApp,
|
|
11
11
|
teamId: {
|
|
@@ -32,6 +32,15 @@ export default {
|
|
|
32
32
|
"assigneeId",
|
|
33
33
|
],
|
|
34
34
|
},
|
|
35
|
+
stateId: {
|
|
36
|
+
propDefinition: [
|
|
37
|
+
linearApp,
|
|
38
|
+
"stateId",
|
|
39
|
+
({ teamId }) => ({
|
|
40
|
+
teamId,
|
|
41
|
+
}),
|
|
42
|
+
],
|
|
43
|
+
},
|
|
35
44
|
},
|
|
36
45
|
async run({ $ }) {
|
|
37
46
|
const {
|
|
@@ -39,6 +48,7 @@ export default {
|
|
|
39
48
|
description,
|
|
40
49
|
teamId,
|
|
41
50
|
assigneeId,
|
|
51
|
+
stateId,
|
|
42
52
|
} = this;
|
|
43
53
|
|
|
44
54
|
const response =
|
|
@@ -47,6 +57,7 @@ export default {
|
|
|
47
57
|
title,
|
|
48
58
|
description,
|
|
49
59
|
assigneeId,
|
|
60
|
+
stateId,
|
|
50
61
|
});
|
|
51
62
|
|
|
52
63
|
const summary = response.success
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linear_app-get-issue",
|
|
5
5
|
name: "Get Issue",
|
|
6
6
|
description: "Get an issue by ID (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api)",
|
|
7
|
-
version: "0.0
|
|
7
|
+
version: "0.1.0",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linearApp,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "linear_app-get-teams",
|
|
5
5
|
name: "Get Teams",
|
|
6
6
|
description: "Get all the teams (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api)",
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.2.0",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
linearApp,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
name: "Search Issues",
|
|
7
7
|
description: "Search issues (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api)",
|
|
8
8
|
type: "action",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.2.0",
|
|
10
10
|
props: {
|
|
11
11
|
linearApp,
|
|
12
12
|
query: {
|
|
@@ -5,13 +5,23 @@ export default {
|
|
|
5
5
|
name: "Update Issue",
|
|
6
6
|
description: "Update an issue (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api#creating-and-editing-issues)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0
|
|
8
|
+
version: "0.1.0",
|
|
9
9
|
props: {
|
|
10
10
|
linearApp,
|
|
11
|
+
teamId: {
|
|
12
|
+
label: "Current Team",
|
|
13
|
+
propDefinition: [
|
|
14
|
+
linearApp,
|
|
15
|
+
"teamId",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
11
18
|
issueId: {
|
|
12
19
|
propDefinition: [
|
|
13
20
|
linearApp,
|
|
14
21
|
"issueId",
|
|
22
|
+
({ teamId }) => ({
|
|
23
|
+
teamId,
|
|
24
|
+
}),
|
|
15
25
|
],
|
|
16
26
|
},
|
|
17
27
|
title: {
|
|
@@ -28,13 +38,25 @@ export default {
|
|
|
28
38
|
"issueDescription",
|
|
29
39
|
],
|
|
30
40
|
},
|
|
31
|
-
|
|
41
|
+
teamIdToUpdate: {
|
|
42
|
+
description: "The identifier or key of the team to update the issue to",
|
|
32
43
|
optional: true,
|
|
33
44
|
propDefinition: [
|
|
34
45
|
linearApp,
|
|
35
46
|
"teamId",
|
|
36
47
|
],
|
|
37
48
|
},
|
|
49
|
+
stateId: {
|
|
50
|
+
propDefinition: [
|
|
51
|
+
linearApp,
|
|
52
|
+
"stateId",
|
|
53
|
+
({
|
|
54
|
+
teamId, teamIdToUpdate,
|
|
55
|
+
}) => ({
|
|
56
|
+
teamId: teamIdToUpdate || teamId,
|
|
57
|
+
}),
|
|
58
|
+
],
|
|
59
|
+
},
|
|
38
60
|
assigneeId: {
|
|
39
61
|
propDefinition: [
|
|
40
62
|
linearApp,
|
|
@@ -47,7 +69,8 @@ export default {
|
|
|
47
69
|
issueId,
|
|
48
70
|
title,
|
|
49
71
|
description,
|
|
50
|
-
|
|
72
|
+
teamIdToUpdate,
|
|
73
|
+
stateId,
|
|
51
74
|
assigneeId,
|
|
52
75
|
} = this;
|
|
53
76
|
|
|
@@ -55,10 +78,11 @@ export default {
|
|
|
55
78
|
await this.linearApp.updateIssue({
|
|
56
79
|
issueId,
|
|
57
80
|
input: {
|
|
58
|
-
teamId,
|
|
81
|
+
teamId: teamIdToUpdate,
|
|
59
82
|
title,
|
|
60
83
|
description,
|
|
61
84
|
assigneeId,
|
|
85
|
+
stateId,
|
|
62
86
|
},
|
|
63
87
|
});
|
|
64
88
|
|
package/linear_app.app.mjs
CHANGED
|
@@ -6,35 +6,46 @@ export default {
|
|
|
6
6
|
type: "app",
|
|
7
7
|
app: "linear_app",
|
|
8
8
|
propDefinitions: {
|
|
9
|
-
|
|
9
|
+
teamId: {
|
|
10
10
|
type: "string",
|
|
11
|
-
label: "
|
|
12
|
-
description: "The
|
|
11
|
+
label: "Team",
|
|
12
|
+
description: "The identifier or key of the team associated with the issue",
|
|
13
13
|
async options({ prevContext }) {
|
|
14
14
|
return this.listResourcesOptions({
|
|
15
15
|
prevContext,
|
|
16
|
-
resourcesFn: this.
|
|
16
|
+
resourcesFn: this.listTeams,
|
|
17
17
|
resouceMapper: ({
|
|
18
|
-
id,
|
|
18
|
+
id, name,
|
|
19
19
|
}) => ({
|
|
20
|
-
label:
|
|
20
|
+
label: name,
|
|
21
21
|
value: id,
|
|
22
22
|
}),
|
|
23
23
|
});
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
|
-
|
|
26
|
+
issueId: {
|
|
27
27
|
type: "string",
|
|
28
|
-
label: "
|
|
29
|
-
description: "The
|
|
30
|
-
async options({
|
|
28
|
+
label: "Issue",
|
|
29
|
+
description: "The issue to update",
|
|
30
|
+
async options({
|
|
31
|
+
teamId, prevContext,
|
|
32
|
+
}) {
|
|
31
33
|
return this.listResourcesOptions({
|
|
32
34
|
prevContext,
|
|
33
|
-
resourcesFn: this.
|
|
35
|
+
resourcesFn: this.listIssues,
|
|
36
|
+
resourcesArgs: teamId && {
|
|
37
|
+
filter: {
|
|
38
|
+
team: {
|
|
39
|
+
id: {
|
|
40
|
+
eq: teamId,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
34
45
|
resouceMapper: ({
|
|
35
|
-
id,
|
|
46
|
+
id, title,
|
|
36
47
|
}) => ({
|
|
37
|
-
label:
|
|
48
|
+
label: title,
|
|
38
49
|
value: id,
|
|
39
50
|
}),
|
|
40
51
|
});
|
|
@@ -42,7 +53,7 @@ export default {
|
|
|
42
53
|
},
|
|
43
54
|
projectId: {
|
|
44
55
|
type: "string",
|
|
45
|
-
label: "Project
|
|
56
|
+
label: "Project",
|
|
46
57
|
description: "The identifier or key of the project associated with the issue",
|
|
47
58
|
optional: true,
|
|
48
59
|
async options({ prevContext }) {
|
|
@@ -65,8 +76,8 @@ export default {
|
|
|
65
76
|
},
|
|
66
77
|
assigneeId: {
|
|
67
78
|
type: "string",
|
|
68
|
-
label: "Assignee
|
|
69
|
-
description: "The
|
|
79
|
+
label: "Assignee",
|
|
80
|
+
description: "The user to assign to the issue",
|
|
70
81
|
optional: true,
|
|
71
82
|
async options({ prevContext }) {
|
|
72
83
|
return this.listResourcesOptions({
|
|
@@ -81,6 +92,35 @@ export default {
|
|
|
81
92
|
});
|
|
82
93
|
},
|
|
83
94
|
},
|
|
95
|
+
stateId: {
|
|
96
|
+
type: "string",
|
|
97
|
+
label: "State (Status)",
|
|
98
|
+
description: "The state (status) to assign to the issue",
|
|
99
|
+
optional: true,
|
|
100
|
+
async options({
|
|
101
|
+
teamId, prevContext,
|
|
102
|
+
}) {
|
|
103
|
+
return this.listResourcesOptions({
|
|
104
|
+
prevContext,
|
|
105
|
+
resourcesFn: this.listStates,
|
|
106
|
+
resourcesArgs: teamId && {
|
|
107
|
+
filter: {
|
|
108
|
+
team: {
|
|
109
|
+
id: {
|
|
110
|
+
eq: teamId,
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
resouceMapper: ({
|
|
116
|
+
id: value, name: label,
|
|
117
|
+
}) => ({
|
|
118
|
+
label,
|
|
119
|
+
value,
|
|
120
|
+
}),
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
},
|
|
84
124
|
boardOrder: {
|
|
85
125
|
type: "string",
|
|
86
126
|
label: "Board order",
|
|
@@ -184,6 +224,9 @@ export default {
|
|
|
184
224
|
async listUsers(variables = {}) {
|
|
185
225
|
return this.client().users(variables);
|
|
186
226
|
},
|
|
227
|
+
async listStates(variables = {}) {
|
|
228
|
+
return this.client().workflowStates(variables);
|
|
229
|
+
},
|
|
187
230
|
async listIssues(variables = {}) {
|
|
188
231
|
return this.client().issues(variables);
|
|
189
232
|
},
|
|
@@ -194,8 +237,8 @@ export default {
|
|
|
194
237
|
return this.client().comments(variables);
|
|
195
238
|
},
|
|
196
239
|
async listResourcesOptions({
|
|
197
|
-
prevContext, resourcesFn, resouceMapper,
|
|
198
|
-
}) {
|
|
240
|
+
prevContext, resourcesFn, resourcesArgs, resouceMapper,
|
|
241
|
+
} = {}) {
|
|
199
242
|
const {
|
|
200
243
|
after,
|
|
201
244
|
hasNextPage,
|
|
@@ -212,6 +255,7 @@ export default {
|
|
|
212
255
|
await resourcesFn({
|
|
213
256
|
after,
|
|
214
257
|
first: constants.DEFAULT_LIMIT,
|
|
258
|
+
...resourcesArgs,
|
|
215
259
|
});
|
|
216
260
|
|
|
217
261
|
return {
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "New Created Comment (Instant)",
|
|
8
8
|
description: "Emit new event when a new comment is created. See the docs [here](https://developers.linear.app/docs/graphql/webhooks)",
|
|
9
9
|
type: "source",
|
|
10
|
-
version: "0.0
|
|
10
|
+
version: "0.1.0",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "New Created Issue (Instant)",
|
|
8
8
|
description: "Emit new event when a new issue is created. See the docs [here](https://developers.linear.app/docs/graphql/webhooks)",
|
|
9
9
|
type: "source",
|
|
10
|
-
version: "0.
|
|
10
|
+
version: "0.3.0",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "New Updated Issue (Instant)",
|
|
8
8
|
description: "Emit new event when an issue is updated. See the docs [here](https://developers.linear.app/docs/graphql/webhooks)",
|
|
9
9
|
type: "source",
|
|
10
|
-
version: "0.
|
|
10
|
+
version: "0.3.0",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
name: "New Issue Status Updated (Instant)",
|
|
8
8
|
description: "Emit new event when the status of an issue is updated. See the docs [here](https://developers.linear.app/docs/graphql/webhooks)",
|
|
9
9
|
type: "source",
|
|
10
|
-
version: "0.0
|
|
10
|
+
version: "0.1.0",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|