Skip to content

Commit 381b1fb

Browse files
committed
chore: update pre-commit configurations
1 parent 19a389a commit 381b1fb

File tree

7 files changed

+30
-16
lines changed

7 files changed

+30
-16
lines changed

.pre-commit-config.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
1+
default_install_hook_types:
2+
- pre-commit
3+
- commit-msg
4+
15
repos:
26
- repo: https://github.com/antonbabenko/pre-commit-terraform
37
rev: v1.97.4
48
hooks:
59
- id: terraform_fmt
10+
name: (terraform) Format .tf files with `terraform fmt`
611
args:
712
- --args=-diff
813
- id: terraform_validate
14+
name: (terraform) Check with `terraform validate`
915
args:
10-
- --tf-init-args=-upgrade
1116
- --hook-config=--retry-once-with-cleanup=true
12-
- id: terraform_providers_lock
13-
args:
14-
- --hook-config=--mode=always-regenerate-lockfile
17+
- --tf-init-args=-upgrade
1518
- id: terraform_tflint
19+
name: (terraform) Check with `tflint`
1620
args:
1721
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
1822
files: ^modules/
1923
- id: terraform_docs
24+
name: (terraform) Generate docs with `terraform-docs`
2025
args: ["--args=--sort-by required"]
2126

2227
- repo: https://github.com/adrienverge/yamllint
2328
rev: v1.36.2
2429
hooks:
2530
- id: yamllint
31+
name: (yaml) Check with `yamllint`
32+
33+
- repo: https://github.com/compilerla/conventional-pre-commit
34+
rev: v4.0.0
35+
hooks:
36+
- id: conventional-pre-commit
37+
name: (commit-message) Check conventional commit
38+
stages: [commit-msg]
39+
args: []

modules/enterprise-organization/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This module creates following resources.
55
- `github_membership` (optional)
66
- `github_organization_block` (optional)
77

8-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
8+
<!-- BEGIN_TF_DOCS -->
99
## Requirements
1010

1111
| Name | Version |
@@ -53,4 +53,4 @@ No modules.
5353
| <a name="output_id"></a> [id](#output\_id) | The ID of the organization. |
5454
| <a name="output_name"></a> [name](#output\_name) | The name of the organization. |
5555
| <a name="output_owners"></a> [owners](#output\_owners) | A list of organization owner usernames. |
56-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
56+
<!-- END_TF_DOCS -->

modules/org-organization/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This module creates following resources.
66
- `github_organization_block` (optional)
77
- `github_organization_security_manager` (optional)
88

9-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
9+
<!-- BEGIN_TF_DOCS -->
1010
## Requirements
1111

1212
| Name | Version |
@@ -59,4 +59,4 @@ No modules.
5959
| <a name="output_repositories"></a> [repositories](#output\_repositories) | A list of the repositories of the organization. |
6060
| <a name="output_security_manager_teams"></a> [security\_manager\_teams](#output\_security\_manager\_teams) | A list of team slugs to add as security manager teams. |
6161
| <a name="output_users"></a> [users](#output\_users) | A list of all members of the organization. |
62-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
62+
<!-- END_TF_DOCS -->

modules/org-team/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This module creates following resources.
88
- `github_team_members` (optional)
99
- `github_team_membership` (optional)
1010

11-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
11+
<!-- BEGIN_TF_DOCS -->
1212
## Requirements
1313

1414
| Name | Version |
@@ -70,4 +70,4 @@ No modules.
7070
| <a name="output_node_id"></a> [node\_id](#output\_node\_id) | The Node ID of the team. |
7171
| <a name="output_parent_id"></a> [parent\_id](#output\_parent\_id) | The ID of the parent team. |
7272
| <a name="output_slug"></a> [slug](#output\_slug) | The slug of the team. |
73-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
73+
<!-- END_TF_DOCS -->

modules/project/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This module creates following resources.
66
- `github_organization_project` (optional)
77
- `github_project_column` (optional)
88

9-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
9+
<!-- BEGIN_TF_DOCS -->
1010
## Requirements
1111

1212
| Name | Version |
@@ -53,4 +53,4 @@ No modules.
5353
| <a name="output_name"></a> [name](#output\_name) | The name of the project. |
5454
| <a name="output_repository"></a> [repository](#output\_repository) | The repository which the project is created. |
5555
| <a name="output_url"></a> [url](#output\_url) | The URL of the project. |
56-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
56+
<!-- END_TF_DOCS -->

modules/repository/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This module creates following resources.
1212
- `github_issue_label` (optional)
1313
- `github_branch_default` (optional)
1414

15-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
15+
<!-- BEGIN_TF_DOCS -->
1616
## Requirements
1717

1818
| Name | Version |
@@ -102,4 +102,4 @@ No modules.
102102
| <a name="output_url"></a> [url](#output\_url) | The URL of the repository. |
103103
| <a name="output_visibility"></a> [visibility](#output\_visibility) | The visibility of the repository. Can be `public`, `private` or `internal`. |
104104
| <a name="output_vulnerability_alerts"></a> [vulnerability\_alerts](#output\_vulnerability\_alerts) | Whether the security alerts are enabled for vulnerable dpendencies. |
105-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
105+
<!-- END_TF_DOCS -->

modules/webhook/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This module creates following resources.
55
- `github_organization_webhook` (optional)
66
- `github_repository_webhook` (optional)
77

8-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
8+
<!-- BEGIN_TF_DOCS -->
99
## Requirements
1010

1111
| Name | Version |
@@ -52,4 +52,4 @@ No modules.
5252
| <a name="output_repositories"></a> [repositories](#output\_repositories) | A list of repositories which the webhook is for. |
5353
| <a name="output_ssl_enabled"></a> [ssl\_enabled](#output\_ssl\_enabled) | Whether SSL verification is enabled. |
5454
| <a name="output_url"></a> [url](#output\_url) | The URL of the webhook. |
55-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
55+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)