Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat: add github actions for commit lint (#113)

ecmadaofb603e86d737
diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml
new file mode 100644
index 0000000000..dcb06c4b4b
--- /dev/null
+++ b/.github/workflows/commitlint.yml
@@ -0,0 +1,11 @@
+name: Lint Commit Messages
+on: [pull_request, push]
+
+jobs:
+ commitlint:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - uses: wagoid/commitlint-github-action@v4
diff --git a/.github/workflows/pr-name.yml b/.github/workflows/pr-name.yml
new file mode 100644
index 0000000000..14c2707522
--- /dev/null
+++ b/.github/workflows/pr-name.yml
@@ -0,0 +1,13 @@
+name: pr-name-linter
+on:
+ pull_request:
+ types: ['opened', 'edited', 'reopened', 'synchronize']
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: Install Dependencies
+ run: npm install @commitlint/config-conventional
+ - uses: JulienKode/[email protected]
diff --git a/README.md b/README.md
index f3bf7d3e1b..6749446912 100644
--- a/README.md
+++ b/README.md
@@ -132,7 +132,12 @@ working on the code:
1. Set up pre-commit hooks
- Install [pre-commit](https://pre-commit.com/index.html#install)
- - Run `pre-commit install` inside the `bytebase` directory
+
+ ```bash
+ cd bytebase
+ pre-commit install
+ pre-commit install --hook-type commit-msg
+ ```
1. Start backend using air (with live reload)