Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/linear/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/linear",
"version": "0.5.8",
"version": "0.6.0",
"description": "Pipedream Linear Components",
"main": "linear.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import projectUpdatedInstant from "@pipedream/linear_app/sources/project-updated-instant/project-updated-instant.mjs";
import utils from "../../common/utils.mjs";

/* eslint-disable pipedream/required-properties-type */
/* eslint-disable pipedream/required-properties-name */
/* eslint-disable pipedream/required-properties-version */

export default {
...projectUpdatedInstant,
...utils.getAppProps(projectUpdatedInstant),
key: "linear-project-updated-instant",
description: "Emit new event when a project is updated (OAuth). [See the documentation](https://developers.linear.app/docs/graphql/webhooks)",
version: "0.0.1",
};
35 changes: 35 additions & 0 deletions components/linear_app/common/fragments.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,39 @@ export default {
}
}
`,
project: `
fragment Project on Project {
id
name
creator {
id
}
lead {
id
}
status {
id
}
color
completedIssueCountHistory
completedScopeHistory
createdAt
description
inProgressScopeHistory
issueCountHistory
name
priority
progress
scope
scopeHistory
slackIssueComments
slackIssueStatuses
slackNewIssue
slugId
sortOrder
state
updatedAt
url
}
`,
};
18 changes: 14 additions & 4 deletions components/linear_app/common/queries.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,23 @@ export default {
${fragments.comment}
`,
listProjects: `
query ListProjects {
projects {
query ListProjects(
$filter: ProjectFilter,
$orderBy: PaginationOrderBy
) {
projects(
filter: $filter,
orderBy: $orderBy
) {
pageInfo {
...PageInfo
}
nodes {
id
name
...Project
}
}
}
${fragments.project}
${fragments.pageInfo}
`,
};
2 changes: 1 addition & 1 deletion components/linear_app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/linear_app",
"version": "0.5.7",
"version": "0.6.0",
"description": "Pipedream Linear_app Components",
"main": "linear_app.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import common from "../common/webhook.mjs";
import constants from "../../common/constants.mjs";
import linearApp from "../../linear_app.app.mjs";

export default {
...common,
key: "linear_app-project-updated-instant",
name: "New Updated Project (Instant)",
description: "Emit new event when a project is updated. [See the documentation](https://developers.linear.app/docs/graphql/webhooks)",
type: "source",
version: "0.0.1",
dedupe: "unique",
props: {
linearApp,
teamIds: {
label: "Team IDs",
type: "string[]",
propDefinition: [
linearApp,
"teamId",
],
reloadProps: true,
},
db: "$.service.db",
},
methods: {
...common.methods,
getResourceTypes() {
return [
constants.RESOURCE_TYPE.PROJECT,
];
},
getWebhookLabel() {
return "Project updated";
},
getResourcesFn() {
return this.linearApp.listProjects;
},
getResourcesFnArgs() {
return {
orderBy: "updatedAt",
filter: {
accessibleTeams: {
id: {
in: this.teamIds,
},
},
},
};
},
getResource(project) {
return this.linearApp.getProject(project.id);
},
getMetadata(resource) {
const {
name,
data,
updatedAt,
} = resource;
const ts = Date.parse(data?.updatedAt || updatedAt);
return {
id: `${resource.id}-${ts}`,
summary: `Project Updated: ${data?.name || name}`,
ts,
};
},
},
};
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading