HYPERFLEET-1101 - chore: add pre-commit hooks with LeakTK secret scanning#195
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughIntroduces Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Supply chain surface — flag before merging.
Recommended fix: Freeze all
install-hooks:
pre-commit installInstalls hooks into No issues with
🚥 Pre-merge checks | ✅ 5 | ❌ 6❌ Failed checks (6 inconclusive)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@AGENTS.md`:
- Line 17: The text on line 17 in AGENTS.md incorrectly states that `make
test-all` runs all of the above commands, but it actually only runs lint, test,
test-integration, and test-helm while excluding fmt and build. Update the line
17 text to accurately describe which commands `make test-all` actually executes
by either listing the specific commands it runs (lint, test, test-integration,
and test-helm) or clarifying that it does not run all the commands listed above
(specifically excluding fmt and build).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: dbf16215-112c-4be5-9051-1526587135fd
📒 Files selected for processing (3)
.pre-commit-config.yamlAGENTS.mdMakefile
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual)openshift-hyperfleet/hyperfleet-broker(manual)
1c73f31 to
1373038
Compare
Risk Score: 0 —
|
| Signal | Detail | Points |
|---|---|---|
| PR size | 58 lines | +0 |
| Sensitive paths | none | +0 |
Computed by hyperfleet-risk-scorer
|
/retest |
…ning Create standard HyperFleet pre-commit configuration from scratch: - LeakTK v0.3.3 for secret scanning (open-source, no VPN required) - hyperfleet-hooks v0.2.1 for commit message validation, gofmt, lint, vet - pre-commit-hooks v6.0.0 for file hygiene (trailing whitespace, EOF, large files) Also adds Makefile targets: install-hooks, gofmt (alias for fmt), go-vet (alias for vet).
1373038 to
120861b
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kuudori The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
0b64088
into
openshift-hyperfleet:main
Summary
Creates the standard HyperFleet pre-commit configuration from scratch:
Changes
.pre-commit-config.yaml— created with standard configMakefile— addedinstall-hooks,gofmt(alias forfmt),go-vet(alias forvet) targetsAGENTS.md— expanded pre-commit hooks section with complete hook listAfter merging
Team members should run
make install-hooksto install the new hooks. First commit after installation takes 3-5 minutes while LeakTK compiles (one-time).Ref: https://redhat.atlassian.net/browse/HYPERFLEET-1101