-
Notifications
You must be signed in to change notification settings - Fork 507
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
chore: use cz-git commitizen adapter #847
Conversation
ok, 欢迎贡献,等我空下来,我仔细看一下 |
另外一点,如果可以拿git缓冲区里面修改了的文件路径,自动加入到scope里面会更好 |
这可能可以自动添加🤔。不过我添加这一排除在配置中,可以自行添加修改。
很棒的提议!这可以自定义实现,我大致完成了整体效果你可以看一下,可以根据团队习惯需要进行调整 |
ok |
tdesign-vue-next/commitlint.config.js Lines 11 to 16 in 9e15b79
这个地方还是要改一下比较好。命令处理 | 兼容windows enjoy it~~ // precomputed scope
const scopeComplete = execSync('git status -s || true')
.toString()
.trim()
.split('\n')
.find((r) => r.indexOf('M ') !== -1)
?.replace(/(\/|\\\\)/g, '%%')
?.match(/src%%((\w|-)*)/); |
https://github.com/Tencent/tdesign-vue-next/pull/867/files 可以看一下这个PR,试一下更改一下配置
|
刚看到,加上去可以了 |
有权限的话,可以帮忙过一下PR~ 🤩🤩🤩 |
🤔 这个 PR 的性质是?
🔗 相关 Issue
无
💡 需求背景和解决方案
Hi 我是
cz-git
commitizen 适配器的作者,偶尔之间我查看了这个项目,发现他非常适合使用cz-git
, 来提升你们的日常开发主要特点:
欢迎尝试使用体验,有任何问题或需求可以告诉我
随带一提
可以考虑删除
.husky/prepare-commit-msg
文件我在提交的过程中发现了你们使用 强制转换的 git hook
.husky/prepare-commit-msg
。我个人认为这个是非常不好的。这会改变原有 git commit 命令的行为,并且在每次commit过后会自动打开编辑模式。这丧失了使用命令行工具提供的便利性。
BTW: 使用
cz-git
可以在最终提交确认时输入e
进入编辑模式。直接回车就提交📝 更新日志
☑️ 请求合并前的自查清单