Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

permissions:
contents: read
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -78,4 +79,36 @@ jobs:
run: npm run lint -w @auth0/auth0-fastify

- name: Lint @auth0/auth0-fastify-api
run: npm run lint -w @auth0/auth0-fastify-api
run: npm run lint -w @auth0/auth0-fastify-api

commitlint:
name: Commitlint
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0

- name: Validate conventional commits
uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1
with:
configFile: commitlint.config.js

pr-title:
name: PR Title
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Validate PR title follows conventional commits
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
scopes: |
auth0-fastify
auth0-fastify-api
ci
security
deps
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
13 changes: 13 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [2, 'always', [
'auth0-fastify',
'auth0-fastify-api',
'ci',
'security',
'deps',
]],
'scope-empty': [1, 'never'],
},
};
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "auth0-fastify",
"version": "1.0.0",
"type": "module",
"workspaces": [
"packages/*",
"examples/*"
Expand All @@ -10,13 +11,17 @@
"clean": "turbo run clean",
"test": "turbo run test",
"lint": "turbo run lint",
"docs": "typedoc"
"docs": "typedoc",
"prepare": "husky"
},
"author": "",
"license": "ISC",
"description": "",
"packageManager": "npm@10.1.0",
"devDependencies": {
"@commitlint/cli": "^21.0.2",
"@commitlint/config-conventional": "^21.0.2",
"husky": "^9.1.7",
"turbo": "^2.4.4",
"typedoc": "^0.27.9"
}
Expand Down
Loading