Skip to content

Commit d804d82

Browse files
authored
Merge pull request #96 from linear/leela/usp-7872-delete-old-polling-triggers-from-zapier-2
Mark old triggers as legacy
2 parents 6bcc156 + e122744 commit d804d82

18 files changed

+2115
-2112
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "linear-zapier",
3-
"version": "4.8.5",
3+
"version": "4.8.6",
44
"description": "Linear's Zapier integration",
55
"main": "index.js",
66
"license": "MIT",

src/index.ts

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
import { addBearerHeader, authentication } from "./authentication";
22
import { createIssue } from "./creates/createIssue";
3-
import { newIssueComment } from "./triggers/commentIssue";
4-
import { newProjectUpdateComment } from "./triggers/commentProjectUpdate";
5-
import { newDocumentComment } from "./triggers/commentDocument";
6-
import { newIssue, updatedIssue } from "./triggers/issue";
3+
import { newIssueCommentLegacy } from "./triggers/legacy/commentIssue";
4+
import { newProjectUpdateCommentLegacy } from "./triggers/legacy/commentProjectUpdate";
5+
import { newDocumentCommentLegacy } from "./triggers/legacy/commentDocument";
6+
import { newIssueLegacy, updatedIssueLegacy } from "./triggers/legacy/issue";
77
import { team } from "./triggers/team";
88
import { status } from "./triggers/status";
99
import { label } from "./triggers/label";
1010
import { user } from "./triggers/user";
1111
import { project } from "./triggers/project";
12-
import { newProjectUpdate, updatedProjectUpdate } from "./triggers/projectUpdate";
12+
import { newProjectUpdateLegacy, updatedProjectUpdateLegacy } from "./triggers/legacy/projectUpdate";
1313
import { projectMilestone } from "./triggers/projectMilestone";
1414
import { HttpResponse, ZObject } from "zapier-platform-core";
1515
import { createComment } from "./creates/createComment";
1616
import { estimate } from "./triggers/estimate";
17-
import { newDocumentCommentInstant } from "./triggers/commentDocumentV2";
18-
import { newIssueCommentInstant } from "./triggers/commentIssueV2";
19-
import { newProjectUpdateCommentInstant } from "./triggers/commentProjectUpdateV2";
20-
import { newProjectUpdateInstant, updatedProjectUpdateInstant } from "./triggers/projectUpdateV2";
17+
import { newDocumentCommentInstant } from "./triggers/commentDocument";
18+
import { newIssueCommentInstant } from "./triggers/commentIssue";
19+
import { newProjectUpdateCommentInstant } from "./triggers/commentProjectUpdate";
20+
import { newProjectUpdateInstant, updatedProjectUpdateInstant } from "./triggers/projectUpdate";
2121
import { projectWithoutTeam } from "./triggers/projectWithoutTeam";
22-
import { newIssueInstant, updatedIssueInstant } from "./triggers/issueV2";
22+
import { newIssueInstant, updatedIssueInstant } from "./triggers/issue";
2323
import { initiative } from "./triggers/initiative";
2424
import { projectStatus } from "./triggers/projectStatus";
2525
import { newProjectInstant, updatedProjectInstant } from "./triggers/newProject";
@@ -71,19 +71,22 @@ const App = {
7171
[createCustomerNeed.key]: createCustomerNeed,
7272
},
7373
triggers: {
74-
[newIssue.key]: newIssue,
74+
// Legacy triggers are all hidden and no longer used, but we can't remove them because Zapier considers that a breaking change.
75+
[newIssueLegacy.key]: newIssueLegacy,
7576
[newIssueInstant.key]: newIssueInstant,
76-
[updatedIssue.key]: updatedIssue,
77+
[updatedIssueLegacy.key]: updatedIssueLegacy,
7778
[updatedIssueInstant.key]: updatedIssueInstant,
78-
[newIssueComment.key]: newIssueComment,
79+
[newIssueCommentLegacy.key]: newIssueCommentLegacy,
7980
[newIssueCommentInstant.key]: newIssueCommentInstant,
80-
[newProjectUpdate.key]: newProjectUpdate,
81+
[newProjectUpdateLegacy.key]: newProjectUpdateLegacy,
82+
[updatedProjectUpdateLegacy.key]: updatedProjectUpdateLegacy,
83+
84+
// New triggers are all visible and used
8185
[newProjectUpdateInstant.key]: newProjectUpdateInstant,
82-
[newProjectUpdateComment.key]: newProjectUpdateComment,
86+
[newProjectUpdateCommentLegacy.key]: newProjectUpdateCommentLegacy,
8387
[newProjectUpdateCommentInstant.key]: newProjectUpdateCommentInstant,
84-
[newDocumentComment.key]: newDocumentComment,
88+
[newDocumentCommentLegacy.key]: newDocumentCommentLegacy,
8589
[newDocumentCommentInstant.key]: newDocumentCommentInstant,
86-
[updatedProjectUpdate.key]: updatedProjectUpdate,
8790
[updatedProjectUpdateInstant.key]: updatedProjectUpdateInstant,
8891
[newInitiativeUpdateInstant.key]: newInitiativeUpdateInstant,
8992
[updatedInitiativeUpdateInstant.key]: updatedInitiativeUpdateInstant,

src/searches/issue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ZObject, Bundle } from "zapier-platform-core";
2-
import { IssueCommon } from "../triggers/issueV2";
2+
import { IssueCommon } from "../triggers/issue";
33
import sample from "../samples/issue.json";
44

55
interface IssueResponse {

0 commit comments

Comments
 (0)