https://github.com/khulnasoft-lab/action-commit-lint
https://github.com/khulnasoft-lab/action-commit-lint
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/khulnasoft-lab/action-commit-lint
- Owner: khulnasoft-lab
- License: mit
- Created: 2024-07-28T19:11:05.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-03-07T19:40:11.000Z (3 months ago)
- Last Synced: 2025-03-07T20:31:03.770Z (3 months ago)
- Language: JavaScript
- Size: 448 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action: commitlint
commitlint as a GitHub Action
[![license][license-img]][license-url]
[![release][release-img]][release-url]## Usage
###### simple
``` yaml
name: commit-linton: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-lateststeps:
- uses: khulnasoft-lab/action-commit-lint@v2
```###### use different built-in config
``` yaml
name: commit-linton: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-lateststeps:
- uses: khulnasoft-lab/action-commit-lint@v2
with:
config: angular
```###### use your own rules
``` yaml
name: commit-linton: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4
- uses: khulnasoft-lab/action-commit-lint@v2
with:
config: ./path/to/commitlint.config
```> **Notes** *for custom rules*:
>
> - must use `action/checkout` first\_
> - `config` is relative to your repo's root
> - config file format must follow [`commitlint` configuration format][]### Inputs & Outputs
| output | type | required | default | description |
|----------|--------|----------|----------------|-----------------------------------------------------------|
| `token` | input | ❌ | `-` | The GitHub token used to inspect the pull-request commits |
| `config` | input | ❌ | `conventional` | name of config to use, or path to config file |
| `report` | output | `N/A` | `-` | a JSON object with the full `commitlint` report data |#### built-in configs
the following are available without any additional requirement
- [`angular-type-enum`][]
- [`angular`][]
- [`conventional`][]
- [`lerna-scopes`][]
- [`patternplate`][][`commitlint` configuration format]: https://commitlint.js.org/#/reference-configuration
[`angular-type-enum`]: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-angular-type-enum
[`angular`]: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-angular
[`conventional`]: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
[`lerna-scopes`]: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-lerna-scopes
[`patternplate`]: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-patternplate----
> Author: [KhulnaSoft DevOps](https://www.khulnasoft.com/) •
> Twitter: [@khulnasoft](https://twitter.com/khulnasoft)[license-url]: LICENSE
[license-img]: https://badgen.net/github/license/khulnasoft-lab/action-commit-lint[release-url]: https://github.com/khulnasoft-lab/action-commit-lint/releases
[release-img]: https://badgen.net/github/release/khulnasoft-lab/action-commit-lint