Skip to content

Commit 1a7d7c0

Browse files
committed
feat(project): add git hooks
1 parent 5bd0934 commit 1a7d7c0

57 files changed

Lines changed: 253 additions & 114 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"code-review@claude-plugins-official": true,
55
"pr-review-toolkit@claude-plugins-official": true
66
}
7-
}
7+
}

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
## File must end with CODEOWNERS file
88

9-
.github/CODEOWNERS @aws-samples/coding-agents-admin
9+
.github/CODEOWNERS @aws-samples/coding-agents-admin

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ body:
3434
id: use-case
3535
attributes:
3636
label: Use case
37-
description: Why do you need this? For example: "I'm always frustrated when..."
37+
description: "Why do you need this? For example: I'm always frustrated when..."
3838
validations:
3939
required: true
4040
- type: textarea

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com.
44

55
> [!IMPORTANT]
6-
> Please do not create a GitHub issue, pull request, or other public announcements.
6+
> Please do not create a GitHub issue, pull request, or other public announcements.

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.pre-commit-config.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Git hooks via https://github.com/j178/prek (installed by `mise run install` in a Git checkout; re-run `mise run hooks:install` after edits).
2+
# Config format matches pre-commit; run hooks with `prek` from mise (`mise.toml` [tools]).
3+
4+
default_install_hook_types: [pre-commit, pre-push]
5+
fail_fast: false
6+
exclude: ^\.threat-composer/
7+
8+
repos:
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
10+
rev: v6.0.0
11+
hooks:
12+
- id: trailing-whitespace
13+
# Skip generated trees and paths often checked in read-only (0444); mutating hooks must not touch them.
14+
exclude: (cdk/cdk\.out/|node_modules/|(^|/)LICENSE$|(^|/)\.gitattributes$|(^|/)\.npmignore$|(^|/)\.gitignore$|^cli/header\.js$|^docs/astro\.config\.mjs$|^docs/tsconfig\.json$|^docs/src/content\.config\.ts$|\.(snap|lock)$)
15+
- id: end-of-file-fixer
16+
exclude: (cdk/cdk\.out/|node_modules/|(^|/)LICENSE$|(^|/)\.gitattributes$|(^|/)\.npmignore$|(^|/)\.gitignore$|^cli/header\.js$|^docs/astro\.config\.mjs$|^docs/tsconfig\.json$|^docs/src/content\.config\.ts$)
17+
- id: check-merge-conflict
18+
- id: check-yaml
19+
exclude: ^(cdk/cdk\.out/|cdk\.out/|node_modules/|agent/\.venv/)
20+
- id: check-json
21+
exclude: ^(cdk/cdk\.out/|node_modules/)
22+
23+
- repo: local
24+
hooks:
25+
- id: gitleaks-staged
26+
name: gitleaks (staged)
27+
entry: bash -lc 'cd "$(git rev-parse --show-toplevel)" && mise run security:secrets:staged'
28+
language: system
29+
pass_filenames: false
30+
stages: [pre-commit]
31+
32+
- id: cdk-eslint
33+
name: eslint (cdk)
34+
entry: bash -lc 'cd "$(git rev-parse --show-toplevel)" && export MISE_EXPERIMENTAL=1 && mise //cdk:eslint'
35+
language: system
36+
pass_filenames: false
37+
files: ^cdk/.*\.(ts|tsx|cjs|mjs|js)$
38+
exclude: ^cdk/cdk\.out/
39+
stages: [pre-commit]
40+
41+
- id: cli-eslint
42+
name: eslint (cli)
43+
entry: bash -lc 'cd "$(git rev-parse --show-toplevel)" && export MISE_EXPERIMENTAL=1 && mise //cli:eslint'
44+
language: system
45+
pass_filenames: false
46+
files: ^cli/.*\.(ts|tsx|cjs|mjs|js)$
47+
stages: [pre-commit]
48+
49+
- id: agent-quality
50+
name: quality (agent)
51+
entry: bash -lc 'cd "$(git rev-parse --show-toplevel)/agent" && mise run quality'
52+
language: system
53+
pass_filenames: false
54+
files: ^agent/.*\.py$
55+
stages: [pre-commit]
56+
57+
- id: docs-astro-check
58+
name: astro check (docs)
59+
entry: bash -lc 'cd "$(git rev-parse --show-toplevel)/docs" && ./node_modules/.bin/astro check'
60+
language: system
61+
pass_filenames: false
62+
files: ^docs/
63+
exclude: ^docs/node_modules/
64+
stages: [pre-commit]
65+
66+
- id: monorepo-security-pre-push
67+
name: security scans (pre-push)
68+
entry: bash -lc 'cd "$(git rev-parse --show-toplevel)" && mise run security'
69+
language: system
70+
pass_filenames: false
71+
stages: [pre-push]

.threat-composer/20260331-1834/components/applicationInfo.tc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@
9292
"threats": [],
9393
"mitigations": [],
9494
"mitigationLinks": []
95-
}
95+
}

.threat-composer/20260331-1834/components/architectureDescription.tc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@
123123
"threats": [],
124124
"mitigations": [],
125125
"mitigationLinks": []
126-
}
126+
}

.threat-composer/20260331-1834/components/dataflowDescription.tc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@
123123
"threats": [],
124124
"mitigations": [],
125125
"mitigationLinks": []
126-
}
126+
}

.threat-composer/20260331-1834/components/mitigations.tc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,4 +450,4 @@
450450
"linkedId": "30b38afc-9930-4602-8637-56ddb166d2a5"
451451
}
452452
]
453-
}
453+
}

0 commit comments

Comments
 (0)