You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
- generate and ignore the canonical pre-commit config instead of
tracking a stale copy
- refresh it atomically on every make test
- install pre-commit and commit-msg hooks
- add full-tree Gitleaks scanning configuration
## Validation
- make test
- canonical pre-commit run --all-files
Copy file name to clipboardExpand all lines: AGENTS.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,30 +13,34 @@ requested.
13
13
14
14
## Pre-commit Configuration
15
15
16
-
Pre-commit configuration is **centralized** in `makeitworkcloud/images/tfroot-runner/pre-commit-config.yaml`. The CI workflow fetches this config at runtime.
17
-
18
-
**Do not** create or modify `.pre-commit-config.yaml`in this repository.
16
+
Pre-commit configuration is centralized at
17
+
`https://raw.githubusercontent.com/makeitworkcloud/images/main/tfroot-runner/pre-commit-config.yaml`. The root
18
+
`.pre-commit-config.yaml`is generated and ignored; do not edit it.
19
19
20
20
For local development, run:
21
21
```bash
22
22
make test
23
23
```
24
24
25
-
This automatically fetches the canonical config if not present.
25
+
This refreshes the generated config from the canonical source on every run and
26
+
replaces it only when the content changed.
26
27
27
28
## CI/CD
28
29
29
30
This repo uses the shared `opentofu.yml` workflow from `shared-workflows`. Jobs
30
31
run natively on `arc-tf`; the runner pod already uses the `tfroot-runner` image,
31
-
so the workflow does not start a nested container.
32
+
so the workflow does not start a nested container. The shared workflow fetches
33
+
the canonical pre-commit config at runtime; this repository does not provide a
34
+
tracked copy.
32
35
33
36
### Failure Modes
34
37
35
38
**"manifest unknown" error:** The `tfroot-runner:latest` image doesn't exist in GHCR. Check if the `images` repo Build workflow succeeded.
36
39
37
-
**Pre-commit failures:** If hooks fail unexpectedly, the canonical config may have changed. Delete `.pre-commit-config.yaml` locally and re-run `make test` to fetch the latest.
40
+
**Pre-commit failures:** If hooks fail unexpectedly, the canonical config may
41
+
have changed. Re-run `make test` to refresh it and run the checks.
38
42
39
43
## Related Repositories
40
44
41
45
-`images` - Contains tfroot-runner image and canonical pre-commit config
42
-
-`shared-workflows` - Contains the reusable OpenTofu workflow and canonical pre-commit config
46
+
-`shared-workflows` - Contains the reusable OpenTofu workflow
0 commit comments