📝 优化 Issue 模板并添加 YAML 校验#1524
Merged
Merged
Conversation
Collaborator
Author
Member
|
写正确了,不需要校验吧 |
Collaborator
Author
日后写其他 yaml 文件不会踩坑 |
CodFrm
reviewed
Jul 2, 2026
| exit 0 | ||
| fi | ||
|
|
||
| pnpm run validate:yaml || exit 1 |
Member
|
已补了一个提交:40ffa78a 🔧 fix issue template config 处理内容:
我本地验证过:
PR 已推送到 |
Member
CodFrm
added a commit
that referenced
this pull request
Jul 3, 2026
以 azizaktas:develop/new-ui 为准解决 src/locales 冲突: - 新增 tr-TR 翻译(12 个命名空间)与 chrome _locales/tr - locales.ts / relative-date.ts 注册 tr - 采纳 en-US 拼写修正(exclude_off / export_success / normal-tabs / incognito-tabs) 保留上游改动:#1524 issue 模板与 validate-yaml、README/赞助商更新、package.json validate:yaml 脚本。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

本 PR 优化 ScriptCat 的 GitHub Issue Templates,并新增 YAML / YML 校验脚本接入 pre-commit,避免 issue form 模板因 YAML 语法错误而失效。
Checklist / 检查清单
Description / 描述
Issue 模板改动
优化 Bug Report 模板
优化 Userscript Compatibility 模板
@match、@connect、@require等选项未加引号导致的解析问题优化 Feature Request 与 Technical Proposal 模板
新增 Documentation 模板
新增 Translation 模板
更新 Issue Template config
YAML 校验改动
新增
scripts/validate-yaml.mjs.yaml/.yml文件语法--all参数检查仓库内所有 YAML / YML 文件yaml包解析文件,并输出具体错误位置新增 package scripts
validate:yaml:校验 staged YAML / YML 文件validate:yaml:all:校验所有 YAML / YML 文件更新 pre-commit hook
pnpm run lint前先运行pnpm run validate:yaml背景
ScriptCat 是浏览器用户脚本管理器,问题来源涉及浏览器扩展、MV2/MV3、用户脚本兼容性、GM/CAT API、同步备份、移动端适配、后台/定时脚本、编辑器和多语言文档等多个维度。
原有模板较难收集这些项目特有信息,导致 issue triage 时经常需要反复追问版本、浏览器、脚本链接、metadata、日志来源和复现步骤。
同时,GitHub Issue Form 使用 YAML 格式,语法错误会导致模板无法正常显示或加载。例如以下以
@开头且未加引号的选项会导致 YAML 解析失败:Screenshots / 截图
P.S. 1.4 使用的 pre-commit 跟 main 的不一样。到时候要注意合并!