Skip to content

Commit 33d8061

Browse files
committed
Fix adding comments to Linear and Jira tickets
1 parent 6417d16 commit 33d8061

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

connectors/jira/src/jira.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { Version3Client } from "jira.js";
33
import {
44
type Action,
55
ActionType,
6+
type Note,
7+
type Thread,
68
type NewLinkWithNotes,
79
NewContact,
810
} from "@plotday/twister";
@@ -552,6 +554,13 @@ export class Jira extends Connector<Jira> {
552554
}
553555
}
554556

557+
/**
558+
* Called when a note is created on a thread owned by this connector.
559+
*/
560+
async onNoteCreated(note: Note, thread: Thread): Promise<void> {
561+
await this.addIssueComment(thread.meta ?? {}, note.content ?? "");
562+
}
563+
555564
/**
556565
* Add a comment to a Jira issue
557566
*

connectors/linear/src/linear.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import {
1010
type Action,
1111
ActionType,
1212
type Link,
13+
type Note,
14+
type Thread,
1315
ThreadMeta,
1416
type NewLinkWithNotes,
1517
} from "@plotday/twister";
@@ -614,6 +616,13 @@ export class Linear extends Connector<Linear> {
614616
}
615617
}
616618

619+
/**
620+
* Called when a note is created on a thread owned by this connector.
621+
*/
622+
async onNoteCreated(note: Note, thread: Thread): Promise<void> {
623+
await this.addIssueComment(thread.meta ?? {}, note.content ?? "");
624+
}
625+
617626
/**
618627
* Add a comment to a Linear issue
619628
*

connectors/slack/src/slack.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ import {
6161
*/
6262
export class Slack extends Connector<Slack> {
6363
static readonly PROVIDER = AuthProvider.Slack;
64-
static readonly handleReplies = true;
6564
static readonly SCOPES = [
6665
"channels:history",
6766
"channels:read",

0 commit comments

Comments
 (0)