Skip to content

Commit

Permalink
1362 custom display confluence url (#1423)
Browse files Browse the repository at this point in the history
* chore: confluence data connector can now handle custom urls, in addition to default {subdomain}.atlassian.net ones

* chore: formatting as per yarn lint

* chore: adding /display/ url matching to confluence data connector
  • Loading branch information
cope committed May 16, 2024
1 parent a796830 commit cf969ad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion collector/utils/extensions/Confluence/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ function validSpaceUrl(spaceUrl = "") {
"https\\://(:subdomain.):domain.:tld/wiki/spaces/(:spaceKey)/*"
);
const customMatch = customPattern.match(spaceUrl);
if (customMatch) {

// Custom "display" Confluence URL match
const customDisplayPattern = new UrlPattern(
"https\\://(:subdomain.):domain.:tld/display/(:spaceKey)/*"
);
const customDisplayMatch = customDisplayPattern.match(spaceUrl);

if (customMatch || customDisplayMatch) {
customMatch.customDomain =
(customMatch.subdomain ? `${customMatch.subdomain}.` : "") + //
`${customMatch.domain}.${customMatch.tld}`;
Expand Down

0 comments on commit cf969ad

Please sign in to comment.