Skip to content

Commit

Permalink
docs(workflows): add usage docs in readme and update commit norm checker
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterLaplace committed Apr 8, 2024
1 parent 94c026c commit 004222a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 19 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/commit_norm_check.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
name: Commit Name Checker
name: Commit Norm Checker

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
verify-commit-name:
runs-on: ubuntu-latest

steps:
- name: Set up Git repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Commit Name Checker
- name: Commit Norm Checker
run: |
commit_msg=$(git log --format=%B -n 1 ${{ github.sha }})
keyword_regex="^\[[A-Z][@_A-Za-z, ]+\] : "
commit_msg=$(git log --format=%B -n 1 ${{ github.sha }})
keyword_regex="^([a-z]+\([0-9A-Za-z_.-]+\)|^[a-z]+): "
if [[ ! $commit_msg =~ $keyword_regex ]]; then
if [[ $commit_msg =~ ^Merge\ .* ]]; then
echo "Skipping merge commit"
else
echo $commit_msg
echo "Commit message does not match expected format. Please use the following format:\"[Keyword] : comment\""
exit 1
fi
if [[ ! $commit_msg =~ $keyword_regex ]]; then
if [[ $commit_msg =~ ^Merge\ .* ]]; then
echo "Skipping merge commit"
else
echo $commit_msg
echo "Commit message does not match expected format. Please use the following format: \"keyword(scope): comment\""
exit 1
fi
fi
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,34 @@ Laplace Syntax Language extension for VSCode
- [Contacts](#contacts)


## **Dependencies**

- [npm](https://www.npmjs.com/)
- [Visual Studio Code](https://code.visualstudio.com/)

```bash
sudo apt-get install npm -y nodejs
nvm install node
npm install -g @vscode/vsce
```

## **Installation**

```bash
git clone https://github.com/MasterLaplace/LaplaceSyntax-Code.git
cd LaplaceSyntax-Code
vsce package
code --install-extension laplace-syntax-0.0.1.vsix
```

## **Update**

```bash
git pull
vsce package
code --install-extension laplace-syntax-0.0.1.vsix
```

<div id='release_note'/>

## :pencil: **Release Notes**
Expand Down

0 comments on commit 004222a

Please sign in to comment.