Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wd-148: Add commitlint #160

Merged
merged 4 commits into from
Oct 9, 2023
Merged
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
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ rules:
overrides:
- files:
- gulpfile.js
- commitlint.config.js
rules:
import/no-default-export:
- off
45 changes: 45 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Continuous Integration Pull Request

on:
pull_request:
types:
- assigned
- unassigned
- opened
- edited
- synchronize
- reopened
- labeled
- unlabeled
- ready_for_review

concurrency:
group: ci-pr-${{ github.ref }}
cancel-in-progress: true

jobs:
ci-pr:
permissions:
contents: read
pull-requests: write

runs-on: ubuntu-latest

steps:
- name: Checkout Source Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Install Dependencies
run: |
npm install

- name: Lint Commits
run: |
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Continuous Integration

env:
JAVA_VERSION: 8
Expand All @@ -9,16 +9,20 @@ on:
- development
- production

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: CI
runs-on: ubuntu-latest

steps:
- name: Code Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install NodeJS
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/notify.yml

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
engine-strict=true
save-exact=true
File renamed without changes.
16 changes: 16 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ProjectPrefix } from './project.config.js'

/** @type {import('@commitlint/types').UserConfig} */
const configuration = {
parserPreset: {
parserOpts: {
issuePrefixes: ProjectPrefix.APPS.map((it) => `${it}-`),
},
},
extends: [`@commitlint/config-conventional`],
rules: {
'references-empty': [2, `never`],
},
}

export default configuration
Loading