0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

ci: increase commitlint length tolerance in CI (#2094)

This commit is contained in:
Gao Sun 2022-10-10 16:41:02 +08:00 committed by GitHub
parent 6146230a09
commit 3537d30e63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,10 +1,14 @@
const { rules } = require('@commitlint/config-conventional'); const { rules } = require('@commitlint/config-conventional');
const isCi = process.env.CI === 'true';
/** @type {import('@commitlint/types').UserConfig} **/ /** @type {import('@commitlint/types').UserConfig} **/
module.exports = { module.exports = {
extends: ['@commitlint/config-conventional'], extends: ['@commitlint/config-conventional'],
rules: { rules: {
'type-enum': [2, 'always', [...rules['type-enum'][2], 'api', 'release']], 'type-enum': [2, 'always', [...rules['type-enum'][2], 'api', 'release']],
'scope-enum': [2, 'always', ['connector', 'console', 'core', 'demo-app', 'test', 'phrases', 'schemas', 'shared', 'ui', 'deps', 'connector-core', 'cli']] 'scope-enum': [2, 'always', ['connector', 'console', 'core', 'demo-app', 'test', 'phrases', 'schemas', 'shared', 'ui', 'deps', 'connector-core', 'cli']],
// Slightly increase the tolerance to allow the appending PR number
...(isCi && { 'header-max-length': [2, 'always', 110] })
}, },
}; };