Skip to content

Commit

Permalink
Merge branch 'develop' into feature/feature-1
Browse files Browse the repository at this point in the history
  • Loading branch information
killmenot committed Apr 15, 2024
2 parents 29ff3c4 + 6f42f8a commit f08dcce
Show file tree
Hide file tree
Showing 13 changed files with 2,132 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 120

[*.md]
trim_trailing_whitespace = false
53 changes: 53 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches:
- develop
- releases/**
pull_request:
branches:
- develop
- features/**
- bug/**
- hotfix/**

jobs:
commitlint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'

- name: Install commitlint
run: |
npm install @commitlint/cli
npm install @commitlint/config-conventional
- name: Print versions
run: |
git --version
node --version
npm --version
npx commitlint --version
- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: npx commitlint --last --verbose

- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

# TODO:
# - name: Validate PR title with commitlint
# if: github.event_name == 'pull_request'
# uses: JulienKode/[email protected]


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no-install commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github
node_modules
package-lock.json
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "all",
"proseWrap": "always"
}
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# github-test

feat: feature1
### Description

Voilà! In view, a humble vaudevillian veteran cast vicariously as both victim and villain by the vicissitudes of Fate.
This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valourous
visitation of a bygone vexation stands vivified and has vowed to vanquish these venal and virulent vermin vanguarding
vice and vouchsafing the violently vicious and voracious violation of volition! The only verdict is vengeance; a
vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the
virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honour to
meet you and you may call me V.

### Features

- feat: feature1
- feature2
- feature3
7 changes: 7 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const test = (r) => r.test.bind(r);

module.exports = {
defaultIgnores: false,
extends: ['@commitlint/config-conventional'],
ignores: [test(/Merge branch (.*?)(in|into) (.*)/)],
};
5 changes: 5 additions & 0 deletions docs/commitlint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Conventional commits

- https://www.conventionalcommits.org/
- https://github.com/conventionalcommit/commitlint
- https://github.com/conventionalcommit/commitlint?tab=readme-ov-file#default-config
3 changes: 3 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
'**/*.{js,jsx,ts,tsx,html,css,json,md}': ['npx prettier --write'],
};
Loading

0 comments on commit f08dcce

Please sign in to comment.