Skip to content

Commit 3a4c580

Browse files
authored
Merge pull request #3 from aschbacd/feature-enhance-default-values
Enhance default values
2 parents f82c9bf + 6065791 commit 3a4c580

File tree

5 files changed

+415
-28
lines changed

5 files changed

+415
-28
lines changed

README.md

+23-24
Original file line numberDiff line numberDiff line change
@@ -21,41 +21,40 @@ jobs:
2121
name: GitLint
2222
steps:
2323
- name: Lint commits, branches, and pull requests
24-
uses: aschbacd/[email protected].1
24+
uses: aschbacd/[email protected].2
2525
with:
26-
github-token: ${{ secrets.GITHUB_TOKEN }}
2726
commit-message-body-max-length: 72
2827
commit-message-subject-max-length: 50
2928
prohibit-unknown-commit-authors: true
3029
prohibit-unknown-commit-committers: true
31-
re-commit-message-subject: "^[A-Z].*((?!\\.).)$"
32-
re-pull-request-title: "^[A-Z].*((?!\\.).)$"
30+
re-commit-message-subject: ^[A-Z].*((?!\.).)$
31+
re-pull-request-title: ^[A-Z].*((?!\.).)$
3332
```
3433
3534
## Customization
3635
3736
The following input keys can be used in your GitHub Actions workflow (shown above).
3837
39-
| Key | Description | Default | Recommended |
40-
| ---------------------------------- | ------------------------------------------------------------ | ----------------------- | ----------------------------- |
41-
| commit-message-body-max-length | Max. characters for line in commit message body | -1 (disabled) | 72 |
42-
| commit-message-body-min-length | Min. characters for line in commit message body | -1 (disabled) | -1 (disabled) |
43-
| commit-message-subject-max-length | Max. characters for commit message subject | -1 (disabled) | 50 |
44-
| commit-message-subject-min-length | Min. characters for commit message subject | -1 (disabled) | -1 (disabled) |
45-
| github-token | Token used to authenticate against GitHub api | `-` | `${{ secrets.GITHUB_TOKEN }}` |
46-
| prohibit-blank-lines-cm-body | Commit message body cannot include blank lines | `false` | `false` |
47-
| prohibit-unknown-commit-authors | Commit author must be GitHub user | `false` | `true` |
48-
| prohibit-unknown-commit-committers | Commit committer must be GitHub user | `false` | `true` |
49-
| prohibit-unsigned-commits | Commits without a valid signature are invalid | `false` | `false` |
50-
| re-branch-name | Regex used to check branch name | `.*` | `[a-z]+\/.+` |
51-
| re-commit-author-email | Regex used to check commit author email | `.*` | `.*` |
52-
| re-commit-author-name | Regex used to check commit author name | `.*` | `.*` |
53-
| re-commit-committer-email | Regex used to check commit committer email | `.*` | `.*` |
54-
| re-commit-committer-name | Regex used to check commit committer name | `.*` | `.*` |
55-
| re-commit-message-body | Regex used to check commit message body (DotAll) | `.*` | `.*` |
56-
| re-commit-message-split | Regex used to split commit message subject and body (DotAll) | `([^\n]*)(?:\n\n(.*))?` | `([^\n]*)(?:\n\n(.*))?` |
57-
| re-commit-message-subject | Regex used to check commit message subject | `.*` | `^[A-Z].*((?!\.).)$` |
58-
| re-pull-request-title | Regex used to check pull request title | `.*` | `^[A-Z].*((?!\.).)$` |
38+
| Key | Description | Default | Recommended |
39+
| ---------------------------------- | ------------------------------------------------------------ | ----------------------- | ----------------------- |
40+
| commit-message-body-max-length | Max. characters for line in commit message body | -1 (disabled) | 72 |
41+
| commit-message-body-min-length | Min. characters for line in commit message body | -1 (disabled) | -1 (disabled) |
42+
| commit-message-subject-max-length | Max. characters for commit message subject | -1 (disabled) | 50 |
43+
| commit-message-subject-min-length | Min. characters for commit message subject | -1 (disabled) | -1 (disabled) |
44+
| github-token | Token used to authenticate against GitHub api | `${{ github.token }}` | `${{ github.token }}` |
45+
| prohibit-blank-lines-cm-body | Commit message body cannot include blank lines | `false` | `false` |
46+
| prohibit-unknown-commit-authors | Commit author must be GitHub user | `false` | `true` |
47+
| prohibit-unknown-commit-committers | Commit committer must be GitHub user | `false` | `true` |
48+
| prohibit-unsigned-commits | Commits without a valid signature are invalid | `false` | `false` |
49+
| re-branch-name | Regex used to check branch name | `.*` | `.*` |
50+
| re-commit-author-email | Regex used to check commit author email | `.*` | `.*` |
51+
| re-commit-author-name | Regex used to check commit author name | `.*` | `.*` |
52+
| re-commit-committer-email | Regex used to check commit committer email | `.*` | `.*` |
53+
| re-commit-committer-name | Regex used to check commit committer name | `.*` | `.*` |
54+
| re-commit-message-body | Regex used to check commit message body (DotAll) | `.*` | `.*` |
55+
| re-commit-message-split | Regex used to split commit message subject and body (DotAll) | `([^\n]*)(?:\n\n(.*))?` | `([^\n]*)(?:\n\n(.*))?` |
56+
| re-commit-message-subject | Regex used to check commit message subject | `.*` | `^[A-Z].*((?!\.).)$` |
57+
| re-pull-request-title | Regex used to check pull request title | `.*` | `^[A-Z].*((?!\.).)$` |
5958

6059
## Resources
6160

action.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: "GitLint Action"
2-
description: "Check if naming conventions for commits, branches, and PRs are respected"
2+
description: "Check if naming conventions for commits, branches, and pull requests are respected"
33
branding:
44
icon: "check"
55
color: "blue"
@@ -23,6 +23,7 @@ inputs:
2323
github-token:
2424
description: "GitHub token used to access api"
2525
required: true
26+
default: ${{ github.token }}
2627
prohibit-blank-lines-cm-body:
2728
description: "Prohibit blank lines in commit message body"
2829
required: false

node_modules/.package-lock.json

+192
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)