这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@cope
Copy link
Contributor

@cope cope commented May 11, 2024

Pull Request Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #1347

What is in this change?

Confluence Data Connector used to only handle the hardcoded {subdomain}.atlassian.net/wiki/spaces/(:spaceKey)/*. Now it also handles custom confluence URLs like (:subdomain.):domain.:tld/wiki/spaces/(:spaceKey)/*.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

@timothycarambat timothycarambat self-assigned this May 13, 2024
@timothycarambat timothycarambat added the PR:needs review Needs review by core team label May 13, 2024
Copy link

@TheMattBin TheMattBin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! It works well to me

@timothycarambat timothycarambat merged commit 78e3e35 into Mintplex-Labs:master May 14, 2024
@timothycarambat
Copy link
Member

@cope LMK you discord username and I can give you contributor badge in there if you dont already have one!

@cope cope deleted the 1347-confluence-custom-urls branch May 14, 2024 18:07
@cope
Copy link
Contributor Author

cope commented May 14, 2024

@cope LMK you discord username and I can give you contributor badge in there if you dont already have one!

😃
image

@cope
Copy link
Contributor Author

cope commented May 16, 2024

so, I made a mistake, here...

basically, I was at home over the weekend, on my personal comp, and not able to VPN (don't ask) so I was unable to verify that my company custom URL is also using {subdomain}.{domain}.{tld}/wiki/spaces/{spaceKey}/*... I stupidely assumed they are. (how often do you examine long URLs, frankly)

which, it turns out, we are not 😭

instead, for some reason, our IT clearly had ideas, so we are using {subdomain}.{domain}.{tld}/display/{spaceKey}/*, instead...
kill me...

@timothycarambat do you think we can solve this, somehow?

I do not think that adding the explicit handling for /display/ makes sense, tbh. It is way to specific...

But, maybe if the match fails, we try to use the passed URL as is, assuming it is a proper SPACE URL and not just any PAGE url? The ConfluencePagesLoader will throw an error for a non-space URL, this I have confirmed already.

Alternatively, I would have to scrape all the pages myself and push them through the /document/upload API...

@timothycarambat
Copy link
Member

It looks like the display is not specific to your IT team, I think it is actually how they do human-readable names.

If it makes no sense, is clunky, and leads to a bad DX you can guarantee it's an Atlassian product:
https://confluence.atlassian.com/doc/space-keys-829076188.html

So adding an edge case for that display URL is not crazy it appears. We can either modify the pattern or make it a function that basically runs a list of patterns and returns on first match

@cope
Copy link
Contributor Author

cope commented May 16, 2024

OH, awesome! PR comming up 😄

@cope cope mentioned this pull request May 16, 2024
10 tasks
@cope
Copy link
Contributor Author

cope commented May 16, 2024

Created 1423

@cope cope mentioned this pull request May 17, 2024
10 tasks
@cope
Copy link
Contributor Author

cope commented May 17, 2024

@timothycarambat we forgot to adjust line 64: baseUrl = 'https://${customDomain}/wiki';

In a human readable form, the baseUrl needs to be only https://${customDomain}, so I had to distinguish between the two...

Created 1434

CrackerCat pushed a commit to CrackerCat/anything-llm that referenced this pull request Jul 31, 2024
…plex-Labs#1362)

* chore: confluence data connector can now handle custom urls, in addition to default {subdomain}.atlassian.net ones

* chore: formatting as per yarn lint
CrackerCat pushed a commit to CrackerCat/anything-llm that referenced this pull request Aug 1, 2024
…plex-Labs#1362)

* chore: confluence data connector can now handle custom urls, in addition to default {subdomain}.atlassian.net ones

* chore: formatting as per yarn lint
CrackerCat pushed a commit to CrackerCat/anything-llm that referenced this pull request Aug 2, 2024
…plex-Labs#1362)

* chore: confluence data connector can now handle custom urls, in addition to default {subdomain}.atlassian.net ones

* chore: formatting as per yarn lint
CrackerCat pushed a commit to CrackerCat/anything-llm that referenced this pull request Aug 3, 2024
…plex-Labs#1362)

* chore: confluence data connector can now handle custom urls, in addition to default {subdomain}.atlassian.net ones

* chore: formatting as per yarn lint
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
…plex-Labs#1362)

* chore: confluence data connector can now handle custom urls, in addition to default {subdomain}.atlassian.net ones

* chore: formatting as per yarn lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR:needs review Needs review by core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Confluence Data Connector URLs

3 participants