workflows/lint: require to contain a colon with a whitespace

This restricts github automatically merging master with commit message
"Merge branch 'NixOS:master' into ...". Although we don't explicitly
prohibit not space after colons, we don't use it in any of the examples.
It's also enforced in https://www.conventionalcommits.org/en/v1.0.0/
This commit is contained in:
aleksana
2026-01-09 16:40:09 +08:00
parent d410f1407c
commit c04dc5869d
+3 -2
View File
@@ -55,10 +55,11 @@ async function checkCommitMessages({ github, context, core }) {
const logMsgStart = `Commit ${commit.sha}'s message's subject ("${firstLine}")`
if (!firstLine.includes(':')) {
if (!firstLine.includes(': ')) {
core.error(
`${logMsgStart} was detected as not meeting our guidelines because ` +
'it does not contain a colon. There are likely other issues as well.',
'it does not contain a colon followed by a whitespace.' +
'There are likely other issues as well.',
)
failures.add(commit.sha)
}