generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 180c46e
Showing
7 changed files
with
48,791 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 GitHub, Inc. and contributors | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<!-- start title --> | ||
|
||
# GitHub Action: verify conventional commits | ||
|
||
<!-- end title --> | ||
|
||
# Description | ||
|
||
<!-- start description --> | ||
|
||
Check if commits of a PR match against the conventional commits specification. | ||
|
||
See: https://conventionalcommits.org/ | ||
|
||
<!-- end description --> | ||
|
||
# Usage | ||
|
||
<!-- start usage --> | ||
|
||
```yaml | ||
- uses: taskmedia/action-conventional-commits@v1.1.18 | ||
with: | ||
# token to access GitHub API to receive PR commits | ||
# Default: ${{ github.token }} | ||
token: "" | ||
|
||
# skip merge commits | ||
# Default: true | ||
skip_merge: "" | ||
|
||
# skip revert commits | ||
# Default: true | ||
skip_revert: "" | ||
|
||
# allow different types in commit message | ||
# Default: fix|feat|revert | ||
types: "" | ||
``` | ||
<!-- end usage --> | ||
# Inputs | ||
<!-- start inputs --> | ||
| **Input** | **Description** | **Default** | **Required** | | ||
| ----------------- | ------------------------------------------------ | ------------------------------ | ------------ | | ||
| **`token`** | token to access GitHub API to receive PR commits | `${{ github.token }}` | **false** | | ||
| **`skip_merge`** | skip merge commits | `true` | **false** | | ||
| **`skip_revert`** | skip revert commits | `true` | **false** | | ||
| **`types`** | allow different types in commit message | <code>fix\|feat\|revert</code> | **false** | | ||
|
||
<!-- end inputs --> | ||
|
||
# Outputs | ||
|
||
<!-- start outputs --> | ||
|
||
| **Output** | **Description** | | ||
| --------------------- | ----------------------------------------------------------------------------------------------- | | ||
| **`breaking_commit`** | indicates if a breaking commit was found | | ||
| **`breaking_msg`** | returns the breaking message of the last breaking commit | | ||
| **`commits`** | JSON list of commits in PR | | ||
| **`count_commits`** | count of commits in PR | | ||
| **`invalid_commits`** | indicates if this commit does not match with conventional commits (other values might be empty) | | ||
| **`version_type`** | semantic versioning indicator (patch, minor or major) | | ||
|
||
<!-- end outputs --> | ||
|
||
### JSON format example output `commits` | ||
|
||
```json | ||
[ | ||
{ | ||
"invalid": false, | ||
"full": "fix(app)!: changed something\n\nThis is a big change\r\n\r\nBREAKING CHANGE: API changed", | ||
"type": "fix", | ||
"breaking": true, | ||
"scope": "app", | ||
"message": "changed something", | ||
"body": "This is a big change", | ||
"breaking_change": "API changed" | ||
} | ||
] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: "verify conventional commits" | ||
description: | | ||
Check if commits of a PR match against the conventional commits specification. | ||
See: https://conventionalcommits.org/ | ||
author: "taskmedia" | ||
inputs: | ||
token: | ||
default: "${{ github.token }}" | ||
description: "token to access GitHub API to receive PR commits" | ||
required: false | ||
skip_merge: | ||
default: "true" | ||
description: "skip merge commits" | ||
required: false | ||
skip_revert: | ||
default: "true" | ||
description: "skip revert commits" | ||
required: false | ||
types: | ||
default: "fix|feat|revert" | ||
description: "allow different types in commit message" | ||
required: false | ||
outputs: | ||
breaking_commit: | ||
description: "indicates if a breaking commit was found" | ||
breaking_msg: | ||
description: "returns the breaking message of the last breaking commit" | ||
commits: | ||
description: "JSON list of commits in PR" | ||
count_commits: | ||
description: "count of commits in PR" | ||
invalid_commits: | ||
description: "indicates if this commit does not match with conventional commits (other values might be empty)" | ||
version_type: | ||
description: "semantic versioning indicator (patch, minor or major)" | ||
runs: | ||
using: "node16" | ||
main: "dist/index.js" | ||
branding: | ||
icon: "git-pull-request" | ||
color: "green" |
Oops, something went wrong.