Skip to content

Commit

Permalink
chore: update jira.js and linear@sdk (#1305)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaMilosa authored Feb 25, 2025
1 parent 06830ee commit c9858bb
Show file tree
Hide file tree
Showing 8 changed files with 33,711 additions and 4,833 deletions.
2 changes: 2 additions & 0 deletions linear-jira/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
buildbuddy-io/5.0.138
7.4.1
6 changes: 6 additions & 0 deletions linear-jira/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################
110 changes: 110 additions & 0 deletions linear-jira/MODULE.bazel.lock

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

6 changes: 3 additions & 3 deletions linear-jira/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Issue.prototype.createLinearLink = async function (this: Issue, jiraIssueKey: st
}

Issue.prototype.jiraEpic = async function (this: Issue): Promise<string | undefined> {
return (await (await this.project)?.links())?.nodes.find(a => a.label === JIRA_ISSUE_LINK_TITLE || a.label === JIRA_ISSUE_LINK_IMPORTED_TITLE)?.url?.split('/').pop()
return (await (await this.project)?.externalLinks())?.nodes.find(a => a.label === JIRA_ISSUE_LINK_TITLE || a.label === JIRA_ISSUE_LINK_IMPORTED_TITLE)?.url?.split('/').pop()
}

Issue.prototype.assigneeEmail = async function (this: Issue): Promise<string | undefined> {
Expand Down Expand Up @@ -160,11 +160,11 @@ Project.prototype.stateName = async function (this: Project): Promise<string | u
}

Project.prototype.jiraKey = async function (this: Project): Promise<string | undefined> {
return this.links().then(a => a.nodes.find(a => a.label === JIRA_ISSUE_LINK_TITLE || a.label === JIRA_ISSUE_LINK_IMPORTED_TITLE)?.url?.split('/').pop())
return this.externalLinks().then(a => a.nodes.find(a => a.label === JIRA_ISSUE_LINK_TITLE || a.label === JIRA_ISSUE_LINK_IMPORTED_TITLE)?.url?.split('/').pop())
}

Project.prototype.createLinearLink = async function (this: Project, jiraIssueKey: string): Promise<void> {
await linearClient.createProjectLink({
await linearClient.createEntityExternalLink({
label: JIRA_ISSUE_LINK_TITLE,
url: jiraIssueUrl(jiraIssueKey),
projectId: this.id,
Expand Down
Loading

0 comments on commit c9858bb

Please sign in to comment.