@@ -7,10 +7,10 @@ created or when it gets updated.
7
7
8
8
## Usage
9
9
10
- Create the file ` .github/workflows/gitlint .yaml ` in your repository and add the following workflow:
10
+ Create the file ` .github/workflows/linters .yaml ` in your repository and add the following workflow:
11
11
12
12
``` yaml
13
- name : GitLint
13
+ name : Linters
14
14
15
15
on :
16
16
pull_request :
@@ -21,40 +21,33 @@ jobs:
21
21
name : GitLint
22
22
steps :
23
23
- name : Lint commits, branches, and pull requests
24
-
25
- with :
26
- commit-message-body-max-length : 72
27
- commit-message-subject-max-length : 50
28
- prohibit-unknown-commit-authors : true
29
- prohibit-unknown-commit-committers : true
30
- re-commit-message-subject : ^[A-Z].*((?!\.).)$
31
- re-pull-request-title : ^[A-Z].*((?!\.).)$
24
+
32
25
` ` `
33
26
34
27
## Customization
35
28
36
29
The following input keys can be used in your GitHub Actions workflow (shown above).
37
30
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].*((?!\.).)$` |
31
+ | Key | Description | Default |
32
+ | ---------------------------------- | ------------------------------------------------------------ | ----------------------- |
33
+ | commit-message-body-max-length | Max. characters for line in commit message body | 72 |
34
+ | commit-message-body-min-length | Min. characters for line in commit message body | -1 (disabled) |
35
+ | commit-message-subject-max-length | Max. characters for commit message subject | 50 |
36
+ | commit-message-subject-min-length | Min. characters for commit message subject | -1 (disabled) |
37
+ | github-token | Token used to authenticate against GitHub api | ` ${{ github.token }}` |
38
+ | prohibit-blank-lines-cm-body | Commit message body cannot include blank lines | `false` |
39
+ | prohibit-unknown-commit-authors | Commit author must be GitHub user | `true` |
40
+ | prohibit-unknown-commit-committers | Commit committer must be GitHub user | `true` |
41
+ | prohibit-unsigned-commits | Commits without a valid signature are invalid | `false` |
42
+ | re-branch-name | Regex used to check branch name | `.*` |
43
+ | re-commit-author-email | Regex used to check commit author email | `.*` |
44
+ | re-commit-author-name | Regex used to check commit author name | `.*` |
45
+ | re-commit-committer-email | Regex used to check commit committer email | `.*` |
46
+ | re-commit-committer-name | Regex used to check commit committer name | `.*` |
47
+ | re-commit-message-body | Regex used to check commit message body (DotAll) | `.*` |
48
+ | re-commit-message-split | Regex used to split commit message subject and body (DotAll) | `([^\n]*)(?:\n\n(.*))?` |
49
+ | re-commit-message-subject | Regex used to check commit message subject | `^[A-Z].*((?!\\ .).)$` |
50
+ | re-pull-request-title | Regex used to check pull request title | `^[A-Z].*((?!\\ .).)$` |
58
51
59
52
# # Resources
60
53
0 commit comments