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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user