Skip to content

Commit

Permalink
fixed issue where the domain was not being used
Browse files Browse the repository at this point in the history
  • Loading branch information
syj67507 committed May 18, 2024
1 parent c8b2ed1 commit cfcd06c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ export default class GitHubClient {
url: data.url,
isJiraConfigured,
pullRequests: data.pullRequests.nodes.map((node) => {
// Parse jira tickets if detected
const ticketTags: ConfiguredRepo["jiraTags"] = [];
configuredRepo?.jiraTags?.forEach((jiraTag) => {
const regex = new RegExp(`${jiraTag}-\\d+`, "g");
Expand All @@ -241,8 +242,16 @@ export default class GitHubClient {
ticketTags.push(...ticketsInBody);
}
});
let jiraUrl;
if (
configuredRepo?.jiraDomain !== undefined &&
ticketTags.length > 0
) {
jiraUrl = `${configuredRepo.jiraDomain}/${ticketTags[0]}`;
}

return {
jiraUrl: ticketTags[0],
jiraUrl,
draft: node.isDraft,
number: node.number,
title: node.title,
Expand Down

0 comments on commit cfcd06c

Please sign in to comment.