@pipedream/linear_app 0.5.7 → 0.6.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 +1 -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 +1 -1
- package/common/fragments.mjs +35 -0
- package/common/queries.mjs +22 -4
- 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
- package/sources/project-updated-instant/project-updated-instant.mjs +68 -0
|
@@ -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.4.
|
|
8
|
+
version: "0.4.6",
|
|
9
9
|
props: {
|
|
10
10
|
linearApp,
|
|
11
11
|
teamId: {
|
|
@@ -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.1.
|
|
7
|
+
version: "0.1.6",
|
|
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.2.
|
|
7
|
+
version: "0.2.6",
|
|
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.2.
|
|
9
|
+
version: "0.2.6",
|
|
10
10
|
props: {
|
|
11
11
|
linearApp,
|
|
12
12
|
query: {
|
|
@@ -5,7 +5,7 @@ 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.1.
|
|
8
|
+
version: "0.1.6",
|
|
9
9
|
props: {
|
|
10
10
|
linearApp,
|
|
11
11
|
teamId: {
|
package/common/fragments.mjs
CHANGED
|
@@ -101,4 +101,39 @@ export default {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
`,
|
|
104
|
+
project: `
|
|
105
|
+
fragment Project on Project {
|
|
106
|
+
id
|
|
107
|
+
name
|
|
108
|
+
creator {
|
|
109
|
+
id
|
|
110
|
+
}
|
|
111
|
+
lead {
|
|
112
|
+
id
|
|
113
|
+
}
|
|
114
|
+
status {
|
|
115
|
+
id
|
|
116
|
+
}
|
|
117
|
+
color
|
|
118
|
+
completedIssueCountHistory
|
|
119
|
+
completedScopeHistory
|
|
120
|
+
createdAt
|
|
121
|
+
description
|
|
122
|
+
inProgressScopeHistory
|
|
123
|
+
issueCountHistory
|
|
124
|
+
name
|
|
125
|
+
priority
|
|
126
|
+
progress
|
|
127
|
+
scope
|
|
128
|
+
scopeHistory
|
|
129
|
+
slackIssueComments
|
|
130
|
+
slackIssueStatuses
|
|
131
|
+
slackNewIssue
|
|
132
|
+
slugId
|
|
133
|
+
sortOrder
|
|
134
|
+
state
|
|
135
|
+
updatedAt
|
|
136
|
+
url
|
|
137
|
+
}
|
|
138
|
+
`,
|
|
104
139
|
};
|
package/common/queries.mjs
CHANGED
|
@@ -48,13 +48,31 @@ export default {
|
|
|
48
48
|
${fragments.comment}
|
|
49
49
|
`,
|
|
50
50
|
listProjects: `
|
|
51
|
-
query ListProjects
|
|
52
|
-
|
|
51
|
+
query ListProjects(
|
|
52
|
+
$filter: ProjectFilter,
|
|
53
|
+
$before: String,
|
|
54
|
+
$after: String,
|
|
55
|
+
$first: Int,
|
|
56
|
+
$last: Int,
|
|
57
|
+
$orderBy: PaginationOrderBy
|
|
58
|
+
) {
|
|
59
|
+
projects(
|
|
60
|
+
filter: $filter,
|
|
61
|
+
before: $before,
|
|
62
|
+
after: $after,
|
|
63
|
+
first: $first,
|
|
64
|
+
last: $last,
|
|
65
|
+
orderBy: $orderBy
|
|
66
|
+
) {
|
|
67
|
+
pageInfo {
|
|
68
|
+
...PageInfo
|
|
69
|
+
}
|
|
53
70
|
nodes {
|
|
54
|
-
|
|
55
|
-
name
|
|
71
|
+
...Project
|
|
56
72
|
}
|
|
57
73
|
}
|
|
58
74
|
}
|
|
75
|
+
${fragments.project}
|
|
76
|
+
${fragments.pageInfo}
|
|
59
77
|
`,
|
|
60
78
|
};
|
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 documentation](https://developers.linear.app/docs/graphql/webhooks)",
|
|
9
9
|
type: "source",
|
|
10
|
-
version: "0.1.
|
|
10
|
+
version: "0.1.8",
|
|
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 documentation](https://developers.linear.app/docs/graphql/webhooks)",
|
|
9
9
|
type: "source",
|
|
10
|
-
version: "0.3.
|
|
10
|
+
version: "0.3.8",
|
|
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 documentation](https://developers.linear.app/docs/graphql/webhooks)",
|
|
9
9
|
type: "source",
|
|
10
|
-
version: "0.3.
|
|
10
|
+
version: "0.3.8",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
name: "New Issue Status Updated (Instant)",
|
|
9
9
|
description: "Emit new event when the status of an issue is updated. [See the documentation](https://developers.linear.app/docs/graphql/webhooks)",
|
|
10
10
|
type: "source",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.8",
|
|
12
12
|
dedupe: "unique",
|
|
13
13
|
props: {
|
|
14
14
|
linearApp: common.props.linearApp,
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import common from "../common/webhook.mjs";
|
|
2
|
+
import constants from "../../common/constants.mjs";
|
|
3
|
+
import linearApp from "../../linear_app.app.mjs";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
...common,
|
|
7
|
+
key: "linear_app-project-updated-instant",
|
|
8
|
+
name: "New Updated Project (Instant)",
|
|
9
|
+
description: "Emit new event when a project is updated. [See the documentation](https://developers.linear.app/docs/graphql/webhooks)",
|
|
10
|
+
type: "source",
|
|
11
|
+
version: "0.0.1",
|
|
12
|
+
dedupe: "unique",
|
|
13
|
+
props: {
|
|
14
|
+
linearApp,
|
|
15
|
+
teamIds: {
|
|
16
|
+
label: "Team IDs",
|
|
17
|
+
type: "string[]",
|
|
18
|
+
propDefinition: [
|
|
19
|
+
linearApp,
|
|
20
|
+
"teamId",
|
|
21
|
+
],
|
|
22
|
+
reloadProps: true,
|
|
23
|
+
},
|
|
24
|
+
db: "$.service.db",
|
|
25
|
+
},
|
|
26
|
+
methods: {
|
|
27
|
+
...common.methods,
|
|
28
|
+
getResourceTypes() {
|
|
29
|
+
return [
|
|
30
|
+
constants.RESOURCE_TYPE.PROJECT,
|
|
31
|
+
];
|
|
32
|
+
},
|
|
33
|
+
getWebhookLabel() {
|
|
34
|
+
return "Project updated";
|
|
35
|
+
},
|
|
36
|
+
getResourcesFn() {
|
|
37
|
+
return this.linearApp.listProjects;
|
|
38
|
+
},
|
|
39
|
+
getResourcesFnArgs() {
|
|
40
|
+
return {
|
|
41
|
+
orderBy: "updatedAt",
|
|
42
|
+
filter: {
|
|
43
|
+
accessibleTeams: {
|
|
44
|
+
id: {
|
|
45
|
+
in: this.teamIds,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
getResource(project) {
|
|
52
|
+
return this.linearApp.getProject(project.id);
|
|
53
|
+
},
|
|
54
|
+
getMetadata(resource) {
|
|
55
|
+
const {
|
|
56
|
+
name,
|
|
57
|
+
data,
|
|
58
|
+
updatedAt,
|
|
59
|
+
} = resource;
|
|
60
|
+
const ts = Date.parse(data?.updatedAt || updatedAt);
|
|
61
|
+
return {
|
|
62
|
+
id: `${resource.id}-${ts}`,
|
|
63
|
+
summary: `Project Updated: ${data?.name || name}`,
|
|
64
|
+
ts,
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
};
|