Skip to content

ci: add autocorrect - #27

Merged
taoky merged 2 commits into
mirrorz-org:mainfrom
definfo:autocorrect
Sep 11, 2025
Merged

ci: add autocorrect#27
taoky merged 2 commits into
mirrorz-org:mainfrom
definfo:autocorrect

Conversation

@definfo

@definfo definfo commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

Copy from https://github.com/mirrorz-org/mirrorz-help/blob/master/.github/workflows/autocorrect.yml

However I am not sure why autocorrect is fetched using script from a short link, and even requires sudo bash ?

IMO this can be replaced by a manual fetch command for release tarball.

Comment thread deb-multimedia/intro.zh.md Outdated
本项目是 Debian 第三方多媒体软件源。

该项目以前的名字为 Debian Multimedia,现改名为 Deb Multimedia。注意这不是 Debian 官方项目,是为 deb-multimedia.org 的镜像,与 Debian 官方的 Multimedia 小组的区别见 https://wiki.debian.org/DebianMultimedia/FAQ
该项目以前的名字为 Debian Multimedia,现改名为 Deb Multimedia。注意这不是 Debian 官方项目,是为 deb-multimedia.org 的镜像,与 Debian 官方的 Multimedia 小组的区别见 https://wiki.debian.org/DebianMultimedia/FAQ。

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

这里的问题是句号可能会被当成 URL 的一部分,需要手工修改。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

我写文档的时候也发现经常有这种问题,好像 autocorrect 可以设置规则避开?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

我一般会用 <> 包裹起来。不过 mirrorz-help 用的 mdx 不支持这个语法,得写全。

@definfo definfo Sep 10, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

.autocorrectrc 设置了 no-space-fullwidth: 0 以暂时规避这一问题。

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

我觉得不应该做规避。参考的做法是:

该项目以前的名字为 Debian Multimedia,现改名为 Deb Multimedia。注意这不是 Debian 官方项目,是为 deb-multimedia.org 的镜像,与 Debian 官方的 Multimedia 小组的区别见 <https://wiki.debian.org/DebianMultimedia/FAQ>

@definfo definfo Sep 10, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

也可以,需要改动所有 URL 了 🫤
或者只改动全角句号结尾的若干1处?

Comment thread .github/workflows/autocorrect.yml Outdated

- name: AutoCorrect check
run: |
curl -sSL https://git.io/JcGER | sudo bash

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

确实我也觉得这样不是很好,可以改。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ref: mirrorz-org/mirrorz-help#220

这里可以用 single-user $HOME/.local/bin 规避 sudo mv <file> /usr/local/bin?这样就不需要提权了

@definfo definfo Sep 10, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

改成了用 yarn 安装 autocorrect,上游没有在 crates.io 发布二进制,因此不能用 cargo 安装。
另一个方案是用 single-user Nix 管理,考虑到用量过少没有优势就放弃了。
不对,single-user Nix 比 yarn 快,依赖还少(

@definfo
definfo force-pushed the autocorrect branch 4 times, most recently from e46dcd4 to b9456f4 Compare September 10, 2025 16:01
Signed-off-by: definfo <hjsdbb1@gmail.com>
Signed-off-by: definfo <hjsdbb1@gmail.com>
@taoky

taoky commented Sep 11, 2025

Copy link
Copy Markdown
Member

相关的修改也和 mirrorz-help 同步一下吧。

@taoky
taoky merged commit f11bb23 into mirrorz-org:main Sep 11, 2025
2 checks passed
definfo added a commit to definfo/mirrorz-help that referenced this pull request Sep 13, 2025
port of github.com/mirrorz-org/mirrorz-docs/pull/27

Signed-off-by: definfo <hjsdbb1@gmail.com>
definfo added a commit to definfo/mirrorz-help that referenced this pull request Sep 13, 2025
port of github.com/mirrorz-org/mirrorz-docs/pull/27

Signed-off-by: definfo <hjsdbb1@gmail.com>
definfo added a commit to definfo/mirrorz-help that referenced this pull request Sep 13, 2025
port of mirrorz-org/mirrorz-docs#27

Signed-off-by: definfo <hjsdbb1@gmail.com>
taoky pushed a commit to mirrorz-org/mirrorz-help that referenced this pull request Sep 13, 2025
github-actions Bot pushed a commit to mirrorz-org/mirrorz-help that referenced this pull request Sep 13, 2025
[7c0af61] chore(ci): fetch autocorrect using single-user Nix

port of mirrorz-org/mirrorz-docs#27

Signed-off-by: definfo <hjsdbb1@gmail.com>
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.

3 participants