Repository navigation
[SREP-4485] add pre-commit hooks to golang-osd-operator convention - #723
Conversation
Adds .pre-commit-config.yaml deployment to all operators subscribing to the golang-osd-operator boilerplate convention. Files added to convention: - pre-commit-config.yaml: Tier 1 common hooks mirroring ci/prow/lint (file hygiene, gitleaks, golangci-lint, go-build, go-mod-tidy, RBAC wildcard check) - commands/pre-commit.md: /pre-commit Claude Code agent with golden rule compliance (2-retry limit, security escalation, structured output) update script now deploys both files to operator repos: - .pre-commit-config.yaml at repo root - .claude/commands/pre-commit.md for Claude Code agent support Golden rules: SREP-4450 Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (3)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/hold Putting on hold to finalize on how we rollout the changes |
Claude Code skill (.claude/commands/pre-commit.md) moved to SREP-4410. This MR now contains only the pre-commit-config.yaml addition. Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
/lgtm |
|
/hold cancel |
| @@ -0,0 +1,136 @@ | |||
| # ============================================================================= | |||
| # Tier 1 — Common Pre-Commit Hooks for OSD Operators | |||
| # SREP-4485 | Golden rules: SREP-4450 | |||
There was a problem hiding this comment.
What is the golden rules here?
There was a problem hiding this comment.
There was a problem hiding this comment.
would be better if we can put the document in the repo, and link to the doc rather than the card ID?
- Merge duplicate pre-commit-hooks repo entries into one block - Move RBAC wildcard check logic to make target rbac-wildcard-check in standard.mk for readability and reuse; hook now calls make target - Clean up inline comments Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
- Renumber hooks 1-6 after merging file hygiene and YAML syntax sections - Clean up inline golden-rule references from comments - Make rbac-wildcard-check warn-only (exit 0) to avoid blocking repos with pre-existing wildcard RBAC; will promote to blocking after cleanup - Add go-build binary note: compile-only, no artifacts written to repo Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
|
/lgtm |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bmeng, charlesgong, devppratik 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 |
Adds .pre-commit-config.yaml deployment to all operators subscribing to the golang-osd-operator boilerplate convention.
Files added to convention:
update script now deploys both files to operator repos:
Golden rules ticket: SREP-4450
Rules document: Doc