Skip to content

Commit 9604f43

Browse files
committed
updates
1 parent 9c81a3c commit 9604f43

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

components/linear_app/common/queries.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,12 @@ export default {
103103
${fragments.projectUpdate}
104104
${fragments.pageInfo}
105105
`,
106+
getProjectUpdate: `
107+
query GetProjectUpdate($projectUpdateId: String!) {
108+
projectUpdate(id: $projectUpdateId) {
109+
...ProjectUpdate
110+
}
111+
}
112+
${fragments.projectUpdate}
113+
`,
106114
};

components/linear_app/linear_app.app.mjs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ export default {
7272
}),
7373
resourcesArgs: teamId && {
7474
filter: {
75-
issues: {
76-
team: {
77-
id: {
78-
eq: teamId,
79-
},
75+
accessibleTeams: {
76+
id: {
77+
eq: teamId,
8078
},
8179
},
8280
},
@@ -258,6 +256,17 @@ export default {
258256
async getProjectUpdate(id) {
259257
return this.client().projectUpdate(id);
260258
},
259+
async getProjectUpdateGraphQL(id) {
260+
const { data: { projectUpdate } } = await this.post({
261+
data: {
262+
query: queries.getProjectUpdate,
263+
variables: {
264+
projectUpdateId: id,
265+
},
266+
},
267+
});
268+
return projectUpdate;
269+
},
261270
async getState(id) {
262271
return this.client().workflowState(id);
263272
},

components/linear_app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/linear_app",
3-
"version": "0.7.2",
3+
"version": "0.7.3",
44
"description": "Pipedream Linear_app Components",
55
"main": "linear_app.app.mjs",
66
"keywords": [

components/linear_app/sources/new-projectupdate-created/new-projectupdate-created.mjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
name: "New Project Update Written (Instant)",
99
description: "Triggers instantly when a project update (status report) is created in Linear. Returns update content, author, project details, and health status. Filters by team and optionally by project. See Linear docs for additional info [here](https://developers.linear.app/docs/graphql/webhooks).",
1010
type: "source",
11-
version: "0.0.3",
11+
version: "0.0.4",
1212
dedupe: "unique",
1313
props: {
1414
linearApp,
@@ -58,11 +58,10 @@ export default {
5858
};
5959
},
6060
getResource(projectUpdate) {
61-
return this.linearApp.getProjectUpdate(projectUpdate.id);
61+
return this.linearApp.getProjectUpdateGraphQL(projectUpdate.id);
6262
},
6363
isRelevant(body) {
64-
const teamIds = body.data.infoSnapshot.teamsInfo.map(({ id }) => id);
65-
return body?.action === "create" && teamIds.includes(this.teamId);
64+
return body?.action === "create";
6665
},
6766
isRelevantPolling(resource) {
6867
const teamIds = resource.infoSnapshot.teamsInfo.map(({ id }) => id);

0 commit comments

Comments
 (0)