Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(document): add web document service api #2904

Merged
merged 13 commits into from
Aug 19, 2024

Conversation

xxs-wallace
Copy link
Contributor

one of #2898

Signed-off-by: xxs-wallace <[email protected]>
Signed-off-by: xxs-wallace <[email protected]>
Signed-off-by: xxs-wallace <[email protected]>
Signed-off-by: xxs-wallace <[email protected]>
Signed-off-by: xxs-wallace <[email protected]>
Signed-off-by: xxs-wallace <[email protected]>
Copy link
Member

@wsxiaoys wsxiaoys left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

Signed-off-by: xxs-wallace <[email protected]>
Signed-off-by: xxs-wallace <[email protected]>
Signed-off-by: xxs-wallace <[email protected]>
@@ -5,6 +5,7 @@ lazy_static! {
pub static ref REPOSITORY_NAME_REGEX: Regex = Regex::new("^[a-zA-Z][\\w.-]+$").unwrap();
pub static ref USERNAME_REGEX: Regex =
Regex::new(r"^[^0-9±!@£$%^&*_+§¡€#¢¶•ªº«\\/<>?:;|=.,]{2,20}$").unwrap();
pub static ref DOCUMENT_NAME_REGEX: Regex = Regex::new(r"^[A-Za-z][A-Za-z0-9]*$").unwrap();
Copy link
Member

@wsxiaoys wsxiaoys Aug 19, 2024

Choose a reason for hiding this comment

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

let's create a separate regex for web doc name (e.g starts with [a-zA-Z], can only contains space and [a-zA-Z0-9]

space got missed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Signed-off-by: xxs-wallace <[email protected]>
Signed-off-by: xxs-wallace <[email protected]>
@wsxiaoys wsxiaoys merged commit c5c6b3f into refactor-web-cralwer-db Aug 19, 2024
2 checks passed
@wsxiaoys wsxiaoys deleted the add-web-doc-api branch August 19, 2024 06:07
xxs-wallace added a commit that referenced this pull request Aug 24, 2024
* add api

Signed-off-by: xxs-wallace <[email protected]>

* fmt

Signed-off-by: xxs-wallace <[email protected]>

* refactor some name

Signed-off-by: xxs-wallace <[email protected]>

* fix generate example

Signed-off-by: xxs-wallace <[email protected]>

* fmt

Signed-off-by: xxs-wallace <[email protected]>

* rename

Signed-off-by: xxs-wallace <[email protected]>

* fix method

Signed-off-by: xxs-wallace <[email protected]>

* add updated at field

Signed-off-by: xxs-wallace <[email protected]>

* add regex

Signed-off-by: xxs-wallace <[email protected]>

* Update ee/tabby-schema/src/schema/web_documents.rs

* fix doc

Signed-off-by: xxs-wallace <[email protected]>

* add test

Signed-off-by: xxs-wallace <[email protected]>

* fix space

Signed-off-by: xxs-wallace <[email protected]>

---------

Signed-off-by: xxs-wallace <[email protected]>
Co-authored-by: Meng Zhang <[email protected]>
wsxiaoys added a commit that referenced this pull request Aug 24, 2024
* add web document change

Signed-off-by: xxs-wallace <[email protected]>

* [autofix.ci] apply automated fixes

* add to schema.sql

Signed-off-by: xxs-wallace <[email protected]>

* move to new file

Signed-off-by: xxs-wallace <[email protected]>

* update schema.sql

* update

* commit suggestion

Signed-off-by: xxs-wallace <[email protected]>

* refactor(document): add web document service api (#2904)

* add api

Signed-off-by: xxs-wallace <[email protected]>

* fmt

Signed-off-by: xxs-wallace <[email protected]>

* refactor some name

Signed-off-by: xxs-wallace <[email protected]>

* fix generate example

Signed-off-by: xxs-wallace <[email protected]>

* fmt

Signed-off-by: xxs-wallace <[email protected]>

* rename

Signed-off-by: xxs-wallace <[email protected]>

* fix method

Signed-off-by: xxs-wallace <[email protected]>

* add updated at field

Signed-off-by: xxs-wallace <[email protected]>

* add regex

Signed-off-by: xxs-wallace <[email protected]>

* Update ee/tabby-schema/src/schema/web_documents.rs

* fix doc

Signed-off-by: xxs-wallace <[email protected]>

* add test

Signed-off-by: xxs-wallace <[email protected]>

* fix space

Signed-off-by: xxs-wallace <[email protected]>

---------

Signed-off-by: xxs-wallace <[email protected]>
Co-authored-by: Meng Zhang <[email protected]>

* [autofix.ci] apply automated fixes

* [autofix.ci] apply automated fixes (attempt 2/3)

* feat(document): support crawl preset document (#2907)

* finish api

Signed-off-by: xxs-wallace <[email protected]>

* fix delete by id

Signed-off-by: xxs-wallace <[email protected]>

* fix active

Signed-off-by: xxs-wallace <[email protected]>

* fix name

Signed-off-by: xxs-wallace <[email protected]>

* fix api

Signed-off-by: xxs-wallace <[email protected]>

* add ut

Signed-off-by: xxs-wallace <[email protected]>

---------

Signed-off-by: xxs-wallace <[email protected]>

* add more test

Signed-off-by: xxs-wallace <[email protected]>

---------

Signed-off-by: xxs-wallace <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Meng Zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants