Skip to content

Commit

Permalink
VER 2.1.0
Browse files Browse the repository at this point in the history
$@ action
 : Now install package instead of requiring `check.js` directly.

-# fk-git-commit-msg-std
  • Loading branch information
ForkKILLET committed Jul 19, 2021
1 parent a14343a commit 690288e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
14 changes: 7 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
on: [push, pull_request]
jobs:
check:
name: Check Commit Info
name: Check Commit Msg
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.x
- name: check
- name: install fk-git-commit-msg-std
run: |
yarn add -D fk-git-commit-msg-std
- name: run check
run: |
node << 'CODE'
const { S, I } = require("./check.js")
const { S, I } = require("fk-git-commit-msg-std/check.js")
const M = ${{ toJson(github.event.commits.*.message) }}
const F = I(M, {
debug: false,
// TODO: more configuration here
})
const F = I(M, A)
process.exit(F)
CODE
4 changes: 3 additions & 1 deletion check.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ const C = {
}

const I = (msgs, args) => {
Object.assign(S, args)
for (const [ k, v ] of Object.entries(args))
S[k] = typeof v == "function" ? v(S[k]) : v

if (S.debug) L("🔎 Debugging is on")

let fail = 0
Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "fk-git-commit-msg-std",
"version": "0.0.1",
"description": "Check if git commit messages meet ForkKILLET standard.",
"main": "check.js",
"repository": "https://github.com/ForkFG/FkGitCommitInfoStd.git",
"author": "ForkΨKILLET <[email protected]>",
"license": "MIT"
}

0 comments on commit 690288e

Please sign in to comment.