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(transfer): strip domain from page key by default #873

Merged
merged 1 commit into from
May 15, 2024

Conversation

qwqcode
Copy link
Member

@qwqcode qwqcode commented May 15, 2024

Artrans 文件的评论 PageKey 可能是完整的 URL(包含 domain 部分),然而我们希望迁移到 Artalk 后 PageKey 使用相对路径以便于部署和后期迁移。

此 PR 修改 Transfer 功能:在导入评论时,默认会去掉 PageKey 中的 Domain 部分

(如果需要保留 PageKey 中的 domain,可以将导入参数 url_keep_domain 设置为 true


The PageKey for Artrans file comments might be a complete URL (including the domain part). However, we hope to migrate to using relative paths for PageKey in Artalk for easier deployment and future migrations.

This PR modifies the Transfer function: when importing comments, it will, by default, remove the domain part from the PageKey.

(If it's necessary to retain the domain in the PageKey, you can set the import parameter url_keep_domain to true)

Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 25.15%. Comparing base (9c85a85) to head (6fc9f8a).
Report is 10 commits behind head on master.

Files Patch % Lines
internal/artransfer/importer.go 50.00% 2 Missing and 1 partial ⚠️
internal/artransfer/base.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #873      +/-   ##
==========================================
+ Coverage   25.00%   25.15%   +0.15%     
==========================================
  Files         196      196              
  Lines        8083     8089       +6     
==========================================
+ Hits         2021     2035      +14     
+ Misses       5940     5927      -13     
- Partials      122      127       +5     
Flag Coverage Δ
go 25.15% <66.66%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qwqcode qwqcode merged commit 984071d into master May 15, 2024
8 checks passed
@qwqcode qwqcode deleted the refactor/transfer branch May 15, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant