1362 custom display confluence url (#1423)

* 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
This commit is contained in:
Predrag Stojadinović 2024-05-16 19:46:18 +02:00 committed by GitHub
parent a79683065f
commit cf969adf37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}`;