Skip to content

Commit

Permalink
feat: Set up repo.
Browse files Browse the repository at this point in the history
Closes #1
  • Loading branch information
joberstein committed Feb 8, 2023
1 parent 5b19f33 commit 03a1c15
Show file tree
Hide file tree
Showing 10 changed files with 595 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": ["@joberstein12"],
"rules": {
"scope-enum": [2, "always", [
"action",
"ci",
"deps",
"docs",
"index",
"setup",
"tests",
"types"
]]
}
}
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
fail_fast: true
default_install_hook_types:
- pre-commit
- prepare-commit-msg
- commit-msg
repos:
- repo: https://github.com/milin/giticket
rev: v1.4
hooks:
- id: giticket
stages:
- prepare-commit-msg
args:
- "--regex=#\\d+"
- "--format={commit_msg}\n\nCloses {ticket}"
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.0.0
hooks:
- id: commitlint
stages:
- commit-msg
additional_dependencies:
- '@joberstein12/commitlint-config'
7 changes: 7 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github"
]
}
29 changes: 29 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Validate Commits
description: Validate commits with commitlint using Github Actions.
author: Jesse Oberstein
runs:
using: 'node16'
pre: 'dist/setup.js'
main: 'dist/index.js'
inputs:
commitlint_version:
description: The version of commitlint to use. If unspecified, the latest version will be installed.

config_path:
description: The relative path to the commitlint config file.

event:
description: The Github event that triggered the workflow that uses this action.
required: true

base_ref:
description: The source of pull request that triggered this workflow (required for pull requests).

head_ref:
description: The destination of the pull request that triggered this workflow (required for pull requests).

target_ref:
description: The commit sha of the event that triggered this workflow (required for push).

extra_config:
description: A newline-separated list of commitlint-config npm packages to install.
273 changes: 273 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "actions-commitlint-validation",
"version": "1.0.0",
"description": "A Github action that validates commits on different events.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc"
},
"repository": {
"type": "git",
"url": "git+https://github.com/joberstein/actions-commitlint-validation.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/joberstein/actions-commitlint-validation/issues"
},
"homepage": "https://github.com/joberstein/actions-commitlint-validation#readme",
"dependencies": {
"@actions/core": "^1.10.0",
"@commitlint/config-angular": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2"
},
"devDependencies": {
"@types/node": "^18.11.19",
"typescript": "^4.9.5"
}
}
Loading

0 comments on commit 03a1c15

Please sign in to comment.