Repository navigation
v0.5.0
v0.5.0
这一版没有改规则,改的是规则说话的方式,以及一个此前只能靠人记住的约定。
新增
- 两个 PR 同时在飞时,创建第二个就会提醒你。 从同一基线切出的两个分支都会在更新日志的未发布段落下面加行,各自对基线干净,后合并的那个才冲突。现在
gh pr create之前会比对本地其它未合并分支,点名会冲突的分支与文件——这是合并顺序还没定下来时唯一能提醒的地方。判定用git merge-tree,只写对象库,不碰工作区、索引与网络。
改进了什么
- 更新日志条目限定在一两句、120 字以内。此前的发布页是把逐条更新的长文原样搬过去,读者要先读完内部叙述才找得到「我升级要做什么」。
- 发布页改成交付说明:中英双语,除逐条更新外还写升级步骤、已知问题与致谢。只关心能不能升级的读者,看完前两段就够。
gh pr create读七节 PR 模板,段落名可以用prSections配置——用中文段落名的仓库不必再整体关掉触发器。- 发版检查的三条约定可配置:哪些命令算发版、未发布段落叫什么、分类标题有哪些。
scope: 'marked'让规则只在项目根带.dsh/dev-workflow.yml的仓库生效。默认仍是all:默认改成marked等于悄悄放过所有未标记的仓库,那是把安全检查降级伪装成默认值。git commit -a的提交信息与文档检查改看git diff HEAD。-a在提交那一刻才填索引,命令执行前读索引会把一次正确的提交拦下来。- 守卫与触发器现在能看见
timeout 120 <命令>之类包装下的命令。 - 会话记忆的目标按 LRU 淘汰之外,会话桶本身也有了上限。
升级
dsh plugin --profile <profile> add @melosic/dsh-dev-workflow@0.5.0
- 配置无破坏性变更,现有
cordis.patch.yml里的设置原样有效。 - DSH 版本要求未变(
>=0.2.0-rc.2)。 - 想用新的
scope,在项目根放一个.dsh/dev-workflow.yml并把scope设为marked;不设就是原来的行为。
已知问题
gh pr merge仍然没有守卫。冲突提醒发生在 PR 创建那一刻,是作者的问题;合并时再问已经晚了,这条留给后续版本。gh release create不在发版检查的识别范围内,这是文档里「我们看不见什么」一节明确列出的边界。
致谢
感谢在本机反复落盘的整整一天里读过日志、提过反对意见、并坚持「先别发版,先看看还有什么可修」的人——这一版的十条里有七条来自那些反对意见。
Full Changelog: v0.4.2...v0.5.0
v0.5.0
This release changes no rule. It changes how the rules speak, and turns one
convention that used to live in somebody's memory into a check.
New
- When two pull requests are in flight, opening the second one now says so.
Two branches cut from the same base both add a line under the same unreleased
heading; each is clean against that base, and the second one to merge pays for
the conflict. Beforegh pr create, the local branches this one would conflict
with are compared and named, along with the files — the one moment the merge
order is still open to change. The check runsgit merge-tree, which writes
objects only: no worktree, no index, no network.
What improved
- Changelog entries are capped at a sentence or two and 120 characters. Release
pages used to be the long-form changelog pasted verbatim; readers had to work
through internal narration to find out what upgrade required of them. - Release pages are now handoff notes: bilingual, covering upgrade steps,
known issues and thanks alongside the itemised changes. A reader who only wants
to know whether they can upgrade is done after the first two sections. gh pr createreads a seven-section template whose names are configurable
throughprSections, so a repository writing its pull requests in another
language no longer has to switch the trigger off entirely.- Three release contracts are configurable: which commands count as a release,
what the unreleased heading is called, and which categories are allowed. scope: 'marked'enables the rules only in repositories whose root carries
.dsh/dev-workflow.yml. The default staysall: makingmarkedthe default
would silently stop checking every unmarked repository, which is a relaxed
security default wearing a default's clothes.- The message and documentation checks for
git commit -areadgit diff HEAD.
-afills the index at commit time, so reading the index before the command
runs would block a correct commit. - Guards and triggers now see through
timeout 120 <command>and similar
wrappers. - Session memory caps apply to both the target map (LRU) and the session buckets
themselves, so a long-lived process no longer keeps an empty bucket per ended
session.
Upgrading
dsh plugin --profile <profile> add @melosic/dsh-dev-workflow@0.5.0
- No breaking configuration changes; existing settings in
cordis.patch.yml
keep working. - The DSH version requirement is unchanged (
>=0.2.0-rc.2). - To use the new
scope, put.dsh/dev-workflow.ymlat the project root and set
scope: marked; leaving it out keeps the previous behaviour.
Known issues
gh pr mergestill has no guard. The conflict warning belongs at creation
time, where the author can act on it; asking at merge time is too late, and
that gap is left for a later release.gh release createis not recognised by the release check. This is the
boundary already listed in the documentation's "what we cannot see" section.
Thanks
To everyone who read logs, pushed back, and insisted on not cutting the release
before looking at what else could be fixed — seven of these ten items came out of
that pushback.
Full Changelog: v0.4.2...v0.5.0