@pipedream/linear_app 0.3.3 → 0.3.4
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 +5 -6
- package/actions/get-issue/get-issue.mjs +24 -0
- package/actions/search-issues/search-issues.mjs +5 -3
- package/actions/update-issue/update-issue.mjs +5 -6
- package/linear_app.app.mjs +11 -8
- package/package.json +1 -1
- package/sources/common/webhook.mjs +4 -3
- package/sources/issue-created-instant/issue-created-instant.mjs +1 -1
- package/sources/issue-updated-instant/issue-updated-instant.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.3.
|
|
8
|
+
version: "0.3.4",
|
|
9
9
|
props: {
|
|
10
10
|
linearApp,
|
|
11
11
|
teamId: {
|
|
@@ -49,11 +49,10 @@ export default {
|
|
|
49
49
|
assigneeId,
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
52
|
+
const summary = response.success
|
|
53
|
+
? `Created issue ${response._issue.id}`
|
|
54
|
+
: "Failed to create issue";
|
|
55
|
+
$.export("summary", summary);
|
|
57
56
|
|
|
58
57
|
return response;
|
|
59
58
|
},
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import linearApp from "../../linear_app.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "linear_app-get-issue",
|
|
5
|
+
name: "Get Issue",
|
|
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.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
props: {
|
|
10
|
+
linearApp,
|
|
11
|
+
issueId: {
|
|
12
|
+
propDefinition: [
|
|
13
|
+
linearApp,
|
|
14
|
+
"issueId",
|
|
15
|
+
],
|
|
16
|
+
description: "The issue ID",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
async run({ $ }) {
|
|
20
|
+
const issue = await this.linearApp.getIssue(this.issueId);
|
|
21
|
+
$.export("summary", `Found issue with ID ${this.issueId}`);
|
|
22
|
+
return issue;
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import constants from "../../common/constants.mjs";
|
|
1
2
|
import linearApp from "../../linear_app.app.mjs";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
@@ -5,7 +6,7 @@ export default {
|
|
|
5
6
|
name: "Search Issues",
|
|
6
7
|
description: "Search issues (API Key). See the docs [here](https://developers.linear.app/docs/graphql/working-with-the-graphql-api)",
|
|
7
8
|
type: "action",
|
|
8
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.2",
|
|
9
10
|
props: {
|
|
10
11
|
linearApp,
|
|
11
12
|
query: {
|
|
@@ -85,7 +86,7 @@ export default {
|
|
|
85
86
|
includeArchived,
|
|
86
87
|
} = this;
|
|
87
88
|
|
|
88
|
-
|
|
89
|
+
const issues = [];
|
|
89
90
|
let hasNextPage;
|
|
90
91
|
let after;
|
|
91
92
|
const filter = this.buildFilter();
|
|
@@ -101,10 +102,11 @@ export default {
|
|
|
101
102
|
orderBy,
|
|
102
103
|
after,
|
|
103
104
|
includeArchived,
|
|
105
|
+
first: constants.DEFAULT_LIMIT,
|
|
104
106
|
},
|
|
105
107
|
});
|
|
106
108
|
|
|
107
|
-
issues
|
|
109
|
+
issues.push(...nodes);
|
|
108
110
|
after = pageInfo.endCursor;
|
|
109
111
|
hasNextPage = pageInfo.hasNextPage;
|
|
110
112
|
} while (hasNextPage);
|
|
@@ -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.0.
|
|
8
|
+
version: "0.0.3",
|
|
9
9
|
props: {
|
|
10
10
|
linearApp,
|
|
11
11
|
issueId: {
|
|
@@ -62,11 +62,10 @@ export default {
|
|
|
62
62
|
},
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
65
|
+
const summary = response.summary
|
|
66
|
+
? `Updated issue ${response._issue.id}`
|
|
67
|
+
: "Failed to update issue";
|
|
68
|
+
$.export("summary", summary);
|
|
70
69
|
|
|
71
70
|
return response;
|
|
72
71
|
},
|
package/linear_app.app.mjs
CHANGED
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
teamId: {
|
|
26
26
|
type: "string",
|
|
27
27
|
label: "Team ID",
|
|
28
|
-
description: "The identifier or key of the team associated with the issue
|
|
28
|
+
description: "The identifier or key of the team associated with the issue",
|
|
29
29
|
async options({ prevContext }) {
|
|
30
30
|
return this.listResourcesOptions({
|
|
31
31
|
prevContext,
|
|
@@ -42,7 +42,7 @@ export default {
|
|
|
42
42
|
projectId: {
|
|
43
43
|
type: "string",
|
|
44
44
|
label: "Project ID",
|
|
45
|
-
description: "The identifier or key of the project associated with the issue
|
|
45
|
+
description: "The identifier or key of the project associated with the issue",
|
|
46
46
|
optional: true,
|
|
47
47
|
async options({ prevContext }) {
|
|
48
48
|
return this.listResourcesOptions({
|
|
@@ -65,7 +65,7 @@ export default {
|
|
|
65
65
|
assigneeId: {
|
|
66
66
|
type: "string",
|
|
67
67
|
label: "Assignee ID",
|
|
68
|
-
description: "The identifier of the user to assign the issue to
|
|
68
|
+
description: "The identifier of the user to assign the issue to",
|
|
69
69
|
optional: true,
|
|
70
70
|
async options({ prevContext }) {
|
|
71
71
|
return this.listResourcesOptions({
|
|
@@ -83,19 +83,19 @@ export default {
|
|
|
83
83
|
boardOrder: {
|
|
84
84
|
type: "string",
|
|
85
85
|
label: "Board order",
|
|
86
|
-
description: "The position of the issue in its column on the board view
|
|
86
|
+
description: "The position of the issue in its column on the board view",
|
|
87
87
|
optional: true,
|
|
88
88
|
},
|
|
89
89
|
issueDescription: {
|
|
90
90
|
type: "string",
|
|
91
91
|
label: "Description",
|
|
92
|
-
description: "The issue description in markdown format
|
|
92
|
+
description: "The issue description in markdown format",
|
|
93
93
|
optional: true,
|
|
94
94
|
},
|
|
95
95
|
issueLabels: {
|
|
96
96
|
type: "string[]",
|
|
97
97
|
label: "Issue Labels",
|
|
98
|
-
description: "The labels in the issue
|
|
98
|
+
description: "The labels in the issue",
|
|
99
99
|
optional: true,
|
|
100
100
|
async options({ prevContext }) {
|
|
101
101
|
return this.listResourcesOptions({
|
|
@@ -108,7 +108,7 @@ export default {
|
|
|
108
108
|
query: {
|
|
109
109
|
type: "string",
|
|
110
110
|
label: "Query",
|
|
111
|
-
description: "Search string to look for
|
|
111
|
+
description: "Search string to look for",
|
|
112
112
|
},
|
|
113
113
|
orderBy: {
|
|
114
114
|
type: "string",
|
|
@@ -120,7 +120,7 @@ export default {
|
|
|
120
120
|
includeArchived: {
|
|
121
121
|
type: "boolean",
|
|
122
122
|
label: "Include archived",
|
|
123
|
-
description: "Should archived resources be included (default: `false`)
|
|
123
|
+
description: "Should archived resources be included? (default: `false`)",
|
|
124
124
|
optional: true,
|
|
125
125
|
},
|
|
126
126
|
},
|
|
@@ -153,6 +153,9 @@ export default {
|
|
|
153
153
|
}) {
|
|
154
154
|
return this.client().issueSearch(query, variables);
|
|
155
155
|
},
|
|
156
|
+
async getIssue(id) {
|
|
157
|
+
return this.client().issue(id);
|
|
158
|
+
},
|
|
156
159
|
async listTeams(variables = {}) {
|
|
157
160
|
return this.client().teams(variables);
|
|
158
161
|
},
|
package/package.json
CHANGED
|
@@ -95,9 +95,10 @@ export default {
|
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
if (this.isRelevant(body)) {
|
|
99
|
-
|
|
100
|
-
this.$emit(body, meta);
|
|
98
|
+
if (!this.isRelevant(body)) {
|
|
99
|
+
return;
|
|
101
100
|
}
|
|
101
|
+
const meta = this.getMetadata(resource);
|
|
102
|
+
this.$emit(body, meta);
|
|
102
103
|
},
|
|
103
104
|
};
|
|
@@ -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.1.
|
|
10
|
+
version: "0.1.1",
|
|
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.1.
|
|
10
|
+
version: "0.1.1",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
methods: {
|
|
13
13
|
...common.methods,
|