Skip to content

Commit

Permalink
Use "external_links" (array of URLs) rather than "external_tickets" (#23
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Eric Tipton authored May 31, 2021
1 parent 2dbfd05 commit 741f078
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 28 deletions.
7 changes: 1 addition & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,12 +585,7 @@ function createClubhouseStory(payload, http) {
name: title,
description,
project_id: clubhouseProject.id,
external_tickets: [
{
external_id: payload.pull_request.id.toString(),
external_url: payload.pull_request.html_url,
},
],
external_links: [payload.pull_request.html_url],
};
if (clubhouseUserId) {
body.owner_ids = [clubhouseUserId];
Expand Down
18 changes: 2 additions & 16 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,6 @@ export interface ClubhouseCommit {
url: string;
}

/** A External Ticket allows you to create a link between an external system, like Zendesk, and a Clubhouse story. */
export interface ClubhouseExternalTicket {
epic_ids: number[];
external_id: string;
external_url: string;
id: string;
story_ids: number[];
}

/** A File is any document uploaded to your Clubhouse. Files attached from a third-party service can be accessed using the Linked Files endpoint. */
export interface ClubhouseFile {
content_type: string;
Expand Down Expand Up @@ -310,7 +301,7 @@ export interface ClubhouseStory {
epic_id: number | null;
estimate: number | null;
external_id: string | null;
external_tickets: ClubhouseExternalTicket[];
external_links: string[];
files: ClubhouseFile[];
follower_ids: string[];
group_mention_ids: string[];
Expand Down Expand Up @@ -349,11 +340,6 @@ export interface ClubhouseCreateStoryCommentParams {
updated_at?: string;
}

export interface ClubhouseCreateExternalTicketParams {
external_id: string;
external_url: string;
}

/** Request parameters for creating a Label on a Clubhouse story. */
export interface ClubhouseCreateLabelParams {
color: string;
Expand Down Expand Up @@ -386,7 +372,7 @@ export interface ClubhouseCreateStoryBody {
epic_id?: number | null;
estimate?: number | null;
external_id?: string;
external_tickets?: ClubhouseCreateExternalTicketParams[];
external_links?: string[];
file_ids?: number[];
follower_ids?: string[];
iteration_id?: number | null;
Expand Down
7 changes: 1 addition & 6 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,7 @@ export async function createClubhouseStory(
name: title,
description,
project_id: clubhouseProject.id,
external_tickets: [
{
external_id: payload.pull_request.id.toString(),
external_url: payload.pull_request.html_url,
},
],
external_links: [payload.pull_request.html_url],
};
if (clubhouseUserId) {
body.owner_ids = [clubhouseUserId];
Expand Down

0 comments on commit 741f078

Please sign in to comment.