@pipedream/linear_app 0.9.2 → 0.10.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.
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import linearApp from "../../linear_app.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "linear_app-list-labels",
|
|
5
|
+
name: "List Labels",
|
|
6
|
+
description: "List issue labels in Linear. Use this to retrieve label IDs and names for filtering or label-management flows. [See the documentation](https://studio.apollographql.com/public/Linear-API/variant/current/schema/reference/objects/Query?query=issueLabels).",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
linearApp,
|
|
16
|
+
orderBy: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
linearApp,
|
|
19
|
+
"orderBy",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
first: {
|
|
23
|
+
type: "integer",
|
|
24
|
+
label: "First",
|
|
25
|
+
description: "The number of labels to return",
|
|
26
|
+
optional: true,
|
|
27
|
+
},
|
|
28
|
+
after: {
|
|
29
|
+
type: "string",
|
|
30
|
+
label: "After",
|
|
31
|
+
description: "Cursor for pagination to fetch the next page (example: \"label_01J8XYZABCDEF123456789\").",
|
|
32
|
+
optional: true,
|
|
33
|
+
},
|
|
34
|
+
before: {
|
|
35
|
+
type: "string",
|
|
36
|
+
label: "Before",
|
|
37
|
+
description: "Cursor for pagination to fetch the previous page (example: \"label_01J8XYZABCDEF123456789\").",
|
|
38
|
+
optional: true,
|
|
39
|
+
},
|
|
40
|
+
last: {
|
|
41
|
+
type: "integer",
|
|
42
|
+
label: "Last",
|
|
43
|
+
description: "The number of items to backward paginate (used with before). Defaults to 50.",
|
|
44
|
+
optional: true,
|
|
45
|
+
},
|
|
46
|
+
includeArchived: {
|
|
47
|
+
propDefinition: [
|
|
48
|
+
linearApp,
|
|
49
|
+
"includeArchived",
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
filter: {
|
|
53
|
+
type: "object",
|
|
54
|
+
label: "Filter",
|
|
55
|
+
description: "Filter returned issue labels. [See the documentation](https://studio.apollographql.com/public/Linear-API/variant/current/schema/reference/inputs/IssueLabelFilter) for more details. Example: `{ \"name\": { \"contains\": \"Bug\" } }`",
|
|
56
|
+
optional: true,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
async run({ $ }) {
|
|
60
|
+
const filter = typeof this.filter === "string"
|
|
61
|
+
? JSON.parse(this.filter)
|
|
62
|
+
: this.filter;
|
|
63
|
+
const {
|
|
64
|
+
nodes, pageInfo,
|
|
65
|
+
} = await this.linearApp.listIssueLabels({
|
|
66
|
+
orderBy: this.orderBy,
|
|
67
|
+
first: this.first,
|
|
68
|
+
after: this.after,
|
|
69
|
+
before: this.before,
|
|
70
|
+
last: this.last,
|
|
71
|
+
includeArchived: this.includeArchived,
|
|
72
|
+
filter,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
$.export("$summary", `Found ${nodes.length} labels`);
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
nodes,
|
|
79
|
+
pageInfo,
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
};
|