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

ci: run commitlint on PR title (#88)

This commit is contained in:
Gao Sun 2021-08-25 23:36:11 +08:00 committed by GitHub
parent 6280ca282d
commit 27ec6fcb00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 2 deletions

View file

@ -1,6 +1,8 @@
name: Commitlint
on: [pull_request]
on:
pull_request:
types: [opened, edited, synchronize, reopened]
jobs:
lint-commits:
@ -20,3 +22,6 @@ jobs:
- name: Commitlint
run: commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD
- name: Commitlint on PR title
run: echo ${{ github.event.pull_request.title }} | commitlint

View file

@ -1,5 +1,6 @@
const { rules } = require('@commitlint/config-conventional');
/** @type {import('@commitlint/types').UserConfig} **/
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {

View file

@ -12,6 +12,7 @@
"devDependencies": {
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@commitlint/types": "^13.1.0",
"husky": "^7.0.1",
"lerna": "^4.0.0",
"typescript": "^4.3.5"

View file

@ -6,12 +6,14 @@ importers:
specifiers:
'@commitlint/cli': ^13.1.0
'@commitlint/config-conventional': ^13.1.0
'@commitlint/types': ^13.1.0
husky: ^7.0.1
lerna: ^4.0.0
typescript: ^4.3.5
devDependencies:
'@commitlint/cli': 13.1.0
'@commitlint/config-conventional': 13.1.0
'@commitlint/types': 13.1.0
husky: 7.0.1
lerna: 4.0.0
typescript: 4.3.5
@ -1660,7 +1662,7 @@ packages:
resolution: {integrity: sha512-zcVjuT+OfKt8h91vhBxt05RMcTGEx6DM7Q9QZeuMbXFk6xgbsSEDMMapbJPA1bCZ81fa/1OQBijSYPrKvtt06g==}
engines: {node: '>=v12'}
dependencies:
chalk: 4.1.1
chalk: 4.1.2
dev: true
/@eslint/eslintrc/0.4.3: