Skip to content

Commit

Permalink
fix(linear): fix types (#148)
Browse files Browse the repository at this point in the history
## Describe your changes

## Issue ticket number and link

## Checklist before requesting a review (skip if just adding/editing
APIs & templates)

-   [ ] I added tests, otherwise the reason is:
-   [ ] External API requests have `retries`
-   [ ] Pagination is used where appropriate
- [ ] The built in `nango.paginate` call is used instead of a `while
(true)` loop
- [ ] Third party requests are NOT parallelized (this can cause issues
with rate limits)
- [ ] If a sync requires metadata the `nango.yaml` has `auto_start:
false`
-   [ ] If the sync is a `full` sync then `track_deletes: true` is set
- [ ] I followed the best practices and guidelines from the [Writing
Integration
Scripts](/NangoHQ/integration-templates/blob/main/WRITING_INTEGRATION_SCRIPTS.md)
doc
  • Loading branch information
khaliqgant authored Dec 11, 2024
1 parent fb8f773 commit 06c35ef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion flows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8875,7 +8875,8 @@ integrations:
id: string
assigneeId: string | null
creatorId: string | null
createdAt: date
createdAt: string
updatedAt: string
description: string | null
dueDate: date | null
projectId: string | null
Expand Down
3 changes: 2 additions & 1 deletion integrations/linear/nango.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ models:
id: string
assigneeId: string | null
creatorId: string | null
createdAt: date
createdAt: string
updatedAt: string
description: string | null
dueDate: date | null
projectId: string | null
Expand Down
6 changes: 3 additions & 3 deletions integrations/linear/syncs/issues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default async function fetchData(nango: NangoSync) {
baseUrlOverride: 'https://api.linear.app',
endpoint: '/graphql',
data: {
query: query
query
},
retries: 10
});
Expand All @@ -84,8 +84,8 @@ function mapIssues(records: any[]): LinearIssue[] {
id: record.id,
assigneeId: record.assignee?.id ? record.assignee.id : null,
creatorId: record.creator?.id ? record.creator.id : null,
createdAt: new Date(record.createdAt),
updatedAt: new Date(record.updatedAt),
createdAt: new Date(record.createdAt).toISOString(),
updatedAt: new Date(record.updatedAt).toISOString(),
description: record.description,
dueDate: record.dueDate ? new Date(record.dueDate) : null,
projectId: record.project?.id ? record.project.id : null,
Expand Down

0 comments on commit 06c35ef

Please sign in to comment.