Skip to content

Commit 6cb6585

Browse files
committed
fix incorrect typing of Linear GraphQL response
1 parent 132d494 commit 6cb6585

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed

dist/index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -51698,9 +51698,7 @@ function reportDeployedPrsToLinear(pullRequests) {
5169851698
(pullRequest) => getCommentBody(pullRequest).pipe(
5169951699
Effect_exports.andThen(
5170051700
(commentBody) => linearClient2.getIssueViewForAttachmentUrl(pullRequest.url, commentBody).pipe(
51701-
Effect_exports.map(
51702-
(issueView) => issueView.data.attachmentsForURL.nodes
51703-
),
51701+
Effect_exports.map((issueView) => issueView.attachmentsForURL.nodes),
5170451702
Effect_exports.tap(
5170551703
(attachments) => Effect_exports.logDebug(
5170651704
`${attachments.length} attachment${attachments.length === 1 ? "" : "s"} found for pull request ${pullRequest.url}`,

dist/index.js.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/report-deployed-prs-to-linear.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ export function reportDeployedPrsToLinear(pullRequests: PullRequest[]) {
1717
linearClient
1818
.getIssueViewForAttachmentUrl(pullRequest.url, commentBody)
1919
.pipe(
20-
Effect.map(
21-
(issueView) => issueView.data.attachmentsForURL.nodes,
22-
),
20+
Effect.map((issueView) => issueView.attachmentsForURL.nodes),
2321
Effect.tap((attachments) =>
2422
Effect.logDebug(
2523
`${attachments.length} attachment${attachments.length === 1 ? '' : 's'} found for pull request ${pullRequest.url}`,

src/services/linear-client.ts

+11-13
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,18 @@ export const LinearClientLive = Layer.effect(LinearClient, linearClient)
6969
const gql = String.raw
7070

7171
interface IssueViewForAttachmentUrlQueryResponse {
72-
data: {
73-
attachmentsForURL: {
74-
nodes: {
75-
issue: {
76-
id: string
77-
identifier: string
78-
comments: {
79-
nodes: {
80-
id: string
81-
}[]
82-
}
72+
attachmentsForURL: {
73+
nodes: {
74+
issue: {
75+
id: string
76+
identifier: string
77+
comments: {
78+
nodes: {
79+
id: string
80+
}[]
8381
}
84-
}[]
85-
}
82+
}
83+
}[]
8684
}
8785
}
8886

0 commit comments

Comments
 (0)