Skip to content

Commit

Permalink
feat(ci): add check the PRs title
Browse files Browse the repository at this point in the history
  • Loading branch information
draedful committed Oct 4, 2024
1 parent 26937e7 commit e306529
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PR Title

on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited

jobs:
verify_title:
name: Verify Title
runs-on: ubuntu-latest
if: ${{github.event.action != 'edited' || github.event.changes.title}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install Packages
run: npm ci
- name: Run Commitlint
run: echo "${{github.event.pull_request.title}}" | npx commitlint
6 changes: 6 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
"subject-case": [0],
},
};
97 changes: 97 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
"keywords": [],
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/gravity-ui/graph"
},
"type": "git",
"url": "https://github.com/gravity-ui/graph"
},
"files": [
"build",
"tsconfig.json"
],
"engines": {
"yarn": "Please use npm instead of yarn to install dependencies",
"pnpm": "Please use npm instead of pnpm to install dependencies"
},
"yarn": "Please use npm instead of yarn to install dependencies",
"pnpm": "Please use npm instead of pnpm to install dependencies"
},
"scripts": {
"typecheck": "npm run build:publish -- --noEmit",
"lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
Expand Down Expand Up @@ -56,6 +56,7 @@
"@babel/preset-react": "^7.22.5",
"@babel/preset-typescript": "^7.22.5",
"@chromatic-com/storybook": "^1.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@gravity-ui/eslint-config": "^2.1.1",
"@gravity-ui/tsconfig": "^1.0.0",
"@gravity-ui/uikit": "^5.26.0",
Expand Down

0 comments on commit e306529

Please sign in to comment.