docs, feat(SREP-4460, SREP-4926: Add Standardized Claude hooks, skill, agents. Update standardised docs)#329
Conversation
|
@devppratik: This pull request references SREP-4460 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. This pull request references SREP-4926 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Warning Review limit reached
More reviews will be available in 9 minutes and 23 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (21)
WalkthroughAdds Claude agents/skills documentation, Prek hook configs and scripts (pre-edit/stop/cleanup), gitleaks config and Prek pin, expanded Claude settings, CI entry updates, and developer guides (CONTRIBUTING/DEVELOPMENT/TESTING). ChangesClaude AI Framework and Developer Tooling
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #329 +/- ##
=======================================
Coverage 58.34% 58.34%
=======================================
Files 26 26
Lines 1942 1942
=======================================
Hits 1133 1133
Misses 731 731
Partials 78 78 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 14
🧹 Nitpick comments (1)
.claude/agents/ci-agent.md (1)
149-150: ⚡ Quick winReplace placeholder version diff with a real CI source comparison.
This compares pre-commit revisions against a static placeholder, so it can’t detect drift. Point the right-hand side to the actual CI source (or remove this check to avoid false confidence).
Suggested fix
-# Compare pre-commit and CI tools -diff <(grep "rev:" .pre-commit-config.yaml) <(echo "# CI versions from boilerplate") +# Compare pre-commit tool revisions with boilerplate-pinned revisions (example path) +# Adjust the CI file path to the actual mirrored pipeline definition in this repo. +diff \ + <(grep "rev:" .pre-commit-config.yaml | sort) \ + <(grep -E "golangci-lint|gitleaks|rev:" .tekton/*.yaml | sort)🤖 Prompt for 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. In @.claude/agents/ci-agent.md around lines 149 - 150, The current diff compares "rev:" from .pre-commit-config.yaml to a static placeholder via diff <(grep "rev:" .pre-commit-config.yaml) <(echo "# CI versions from boilerplate"); update this to compare against the real CI source or remove the check: replace the right-hand process substitution (echo "# CI versions from boilerplate") with a command that outputs the actual CI versions (e.g., cat or grep on the real CI config file) so the diff detects drift, or delete the comparison step entirely if you don't want this validation; ensure you update the command invoked in the script that runs this diff so it references the actual CI file instead of the placeholder.
🤖 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 @.claude/agents/docs-agent.md:
- Around line 179-180: The current pipeline that starts with "grep '```bash'
*.md | grep 'make '" wrongly filters to fence markers and never captures actual
make commands; replace that pipeline (the line containing the grep of fenced
bash blocks) with a command that recursively searches Markdown files for literal
"make <target>" occurrences, extracts the second token (the target name) and
then sorts unique results — i.e., use a recursive/whole-match grep (restricting
to *.md), then pull the second field (awk or cut) and pipe to sort -u so make
targets are correctly extracted.
- Line 188: The fenced output block currently ends with a plain triple-backtick
and lacks a language tag; update the fenced block in
.claude/agents/docs-agent.md (the Markdown fenced output block containing the
changelog snippet) to include a language identifier such as "text" or "diff"
(e.g., change ``` to ```text) so the block declares its language for markdown
lint compliance and consistent rendering.
In @.claude/agents/lint-agent.md:
- Around line 23-24: Replace the invalid `go fmt -l .` invocations with `gofmt
-l .` in the markdown (specifically change the lines that read "Run `go fmt -l
.`" to "Run `gofmt -l .`") and update the repeated instance later in the file
(the same "Run `go fmt -l .`" occurrence around the second block) so both
occurrences use `gofmt -l .`; leave the `go fmt ./...` auto-fix line unchanged.
In @.claude/agents/test-agent.md:
- Around line 31-39: The script currently pipes CHANGED_FILES into xargs to
compute PACKAGES and will misbehave or error when CHANGED_FILES is empty; add an
early guard after computing CHANGED_FILES (and before using xargs dirname) to
check if CHANGED_FILES is empty and exit successfully (or skip tests) to avoid
calling xargs with no input; update the block that sets PACKAGES and the
subsequent for pkg loop to be skipped when CHANGED_FILES is empty so the go test
invocation only runs when there are changed .go files.
In @.claude/hooks/README.md:
- Around line 182-183: Update the README doc text to match the actual stop hook
implementation: replace the stated command `prek run --all-files` with the real
invocation used in .claude/hooks/stop-prek-validation.sh (`prek run --config
hack/prek.ci.toml`) and describe that the script runs the command conditionally
(only when relevant files are present/when the environment detects CI),
mirroring the script's behavior rather than the old blanket `--all-files`
description.
- Line 3: The README line currently reads "OCM Agent Operator" but should use
this repository's actual project name ("GCP Project Operator"); update the text
on that line in .claude/hooks/README.md to replace "OCM Agent Operator" with the
correct project name so wording is consistent across docs and contributors
aren't confused.
In @.claude/hooks/stop-prek-validation.sh:
- Around line 69-72: The current PREK invocation in
.claude/hooks/stop-prek-validation.sh stores output in PREK_OUTPUT and exit code
in PREK_EXIT but calls `prek run --config hack/prek.ci.toml` which only checks
the default (staged) scope and thus misses unstaged/untracked edits; update the
PREK command to include all working-tree files (e.g., add prek's --all-files
flag) or build an explicit file list from git (git status/ls-files + untracked)
and pass those paths to prek so unstaged/untracked changes are validated, and
keep using PREK_OUTPUT and PREK_EXIT for reporting/exit behavior.
In @.claude/settings.json:
- Around line 37-39: Replace the overly specific deny entries "Bash(git commit
--no-verify)", "Bash(git push --force origin master)" and "Bash(git push --force
origin main)" with broader wildcard-deny patterns to prevent bypassing via
argument order or alternate refs; update the deny rules to match any git command
using --no-verify (e.g., use a pattern like Bash(git * --no-verify *)) and any
force-push invocation (e.g., Bash(git * push * --force *)) so that
functions/matches around those entries will catch all variations instead of only
the exact strings.
In @.claude/skills/README.md:
- Around line 66-72: The README directory-structure code fence is missing a
language tag which triggers MD040; edit the fenced block in
.claude/skills/README.md (the directory-structure block that starts with ``` )
and change it to declare a language such as text (i.e., use ```text) so the
block becomes a labeled text code block while keeping the same contents.
- Line 3: Update the README intro that currently reads "Reusable workflow skills
for OCM Agent Operator development." to reference the correct repository name;
replace "OCM Agent Operator" with "gcp-project-operator" (or an appropriate
description for gcp-project-operator) so the opening line accurately describes
this repo; modify the string in .claude/skills/README.md (the intro sentence
containing "OCM Agent Operator") accordingly.
In @.gitleaks.toml:
- Around line 25-32: The global allowlist in .gitleaks.toml currently contains
the broad pattern '.*_test\.go' inside the paths = [...] array which causes all
Go test files to be skipped; remove that pattern from the paths array and keep
only the intended specific exclusions (for example the existing
'''test/fixtures/.*''', '''test/deploy/.*''', '''boilerplate/.*''',
'''vendor/.*''', '''zz_generated\..*\.go''') so gitleaks will scan *_test.go
files; update the paths array in .gitleaks.toml accordingly and run a quick
gitleaks scan to verify tests are no longer globally excluded.
In `@CONTRIBUTING.md`:
- Around line 1-3: Update the heading and intro to use the canonical product
name and remove the duplicated word: change the heading text "# Contributing to
Gcp Project" to "# Contributing to GCP Project Operator" and edit the intro line
"Thank you for your interest in contributing to the Gcp Project project." to
"Thank you for your interest in contributing to GCP Project Operator." Ensure
both occurrences use the exact same capitalization and phrasing "GCP Project
Operator".
In `@hack/ci.sh`:
- Line 9: The prek invocation uses a relative path "hack/prek.ci.toml" which
breaks when the script is run from a non-root working directory; change the
script to resolve the config file path relative to the script location (e.g.,
compute the script directory/REPO_ROOT and construct an absolute path to
hack/prek.ci.toml) and use that absolute path in the "prek run --config ...
--all-files" call so config resolution is independent of the caller's cwd.
In `@TESTING.md`:
- Around line 266-275: The TESTING.md section is contradictory about whether the
pre-commit hook id "go-test" (entry: make go-test) runs automatically; either
remove the YAML snippet and clearly state that "go-test" is not enabled and
contributors must run "make go-test" manually, or add the hook to the
repository's pre-commit configuration and update the text to say it runs
automatically; update the lines that mention the pre-commit behavior and the
"go-test" id and the "make go-test" command so they consistently reflect the
single correct workflow.
---
Nitpick comments:
In @.claude/agents/ci-agent.md:
- Around line 149-150: The current diff compares "rev:" from
.pre-commit-config.yaml to a static placeholder via diff <(grep "rev:"
.pre-commit-config.yaml) <(echo "# CI versions from boilerplate"); update this
to compare against the real CI source or remove the check: replace the
right-hand process substitution (echo "# CI versions from boilerplate") with a
command that outputs the actual CI versions (e.g., cat or grep on the real CI
config file) so the diff detects drift, or delete the comparison step entirely
if you don't want this validation; ensure you update the command invoked in the
script that runs this diff so it references the actual CI file instead of the
placeholder.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: ee0c90e8-a1b5-4e59-a528-811ac93235ed
📒 Files selected for processing (21)
.claude/agents/README.md.claude/agents/ci-agent.md.claude/agents/docs-agent.md.claude/agents/lint-agent.md.claude/agents/security-agent.md.claude/agents/test-agent.md.claude/hooks/README.md.claude/hooks/cleanup.sh.claude/hooks/pre-edit.sh.claude/hooks/stop-prek-validation.sh.claude/settings.json.claude/skills/README.md.claude/skills/prow-ci/SKILL.md.gitleaks.toml.prek-versionCONTRIBUTING.mdDEVELOPMENT.mdTESTING.mdhack/ci.shhack/prek.ci.tomlprek.toml
| grep '```bash' *.md | grep 'make ' | sed 's/.*make \([a-z-]*\).*/\1/' | sort -u | ||
|
|
There was a problem hiding this comment.
Fix target extraction command; current pipeline cannot capture make commands.
At Line 179, grep '```bash' *.md filters to fence lines, so downstream extraction of make targets won’t work.
Suggested fix
-grep '```bash' *.md | grep 'make ' | sed 's/.*make \([a-z-]*\).*/\1/' | sort -u
+grep -RhoE 'make [a-zA-Z0-9_.-]+' --include="*.md" . | awk '{print $2}' | sort -u🤖 Prompt for 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.
In @.claude/agents/docs-agent.md around lines 179 - 180, The current pipeline
that starts with "grep '```bash' *.md | grep 'make '" wrongly filters to fence
markers and never captures actual make commands; replace that pipeline (the line
containing the grep of fenced bash blocks) with a command that recursively
searches Markdown files for literal "make <target>" occurrences, extracts the
second token (the target name) and then sorts unique results — i.e., use a
recursive/whole-match grep (restricting to *.md), then pull the second field
(awk or cut) and pipe to sort -u so make targets are correctly extracted.
| ## Output Format | ||
|
|
||
| When updating docs, report: | ||
| ``` |
There was a problem hiding this comment.
Add a language tag to the fenced output block.
The fenced block at Line 188 should declare a language for markdown lint compliance and consistency.
Suggested fix
-```
+```text
Updated: DEVELOPMENT.md
- Added section on new make target: go-bench
...</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 188-188: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for 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.
In @.claude/agents/docs-agent.md at line 188, The fenced output block currently
ends with a plain triple-backtick and lacks a language tag; update the fenced
block in .claude/agents/docs-agent.md (the Markdown fenced output block
containing the changelog snippet) to include a language identifier such as
"text" or "diff" (e.g., change ``` to ```text) so the block declares its
language for markdown lint compliance and consistent rendering.
| 2. Run `go fmt -l .` to detect formatting issues | ||
| 3. Auto-fix formatting: `go fmt ./...` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify supported flags and command semantics for go fmt/gofmt.
set -euo pipefail
go help fmt | sed -n '1,140p'
echo "----"
gofmt -h | sed -n '1,120p'Repository: openshift/gcp-project-operator
Length of output: 1058
Fix formatting-check command in .claude/agents/lint-agent.md
go fmt -l . is not a valid go fmt invocation (go fmt accepts only [-n] [-x] [packages]; -l is a gofmt flag). Replace it with gofmt -l . (and apply the same change to the repeated instance at lines 55-59).
🤖 Prompt for 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.
In @.claude/agents/lint-agent.md around lines 23 - 24, Replace the invalid `go
fmt -l .` invocations with `gofmt -l .` in the markdown (specifically change the
lines that read "Run `go fmt -l .`" to "Run `gofmt -l .`") and update the
repeated instance later in the file (the same "Run `go fmt -l .`" occurrence
around the second block) so both occurrences use `gofmt -l .`; leave the `go fmt
./...` auto-fix line unchanged.
| CHANGED_FILES=$(git diff --name-only HEAD | grep "\.go$") | ||
|
|
||
| # Extract packages | ||
| PACKAGES=$(echo "$CHANGED_FILES" | xargs -n1 dirname | sort -u | tr '\n' ' ') | ||
|
|
||
| # Run targeted tests | ||
| for pkg in $PACKAGES; do | ||
| go test -v ./$pkg/... | ||
| done |
There was a problem hiding this comment.
Guard empty changed-file sets before xargs dirname.
If no Go files changed, the current snippet can error or run unnecessarily. Add an early exit.
Suggested fix
CHANGED_FILES=$(git diff --name-only HEAD | grep "\.go$")
+if [ -z "$CHANGED_FILES" ]; then
+ echo "No changed Go files."
+ exit 0
+fi
# Extract packages
PACKAGES=$(echo "$CHANGED_FILES" | xargs -n1 dirname | sort -u | tr '\n' ' ')📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| CHANGED_FILES=$(git diff --name-only HEAD | grep "\.go$") | |
| # Extract packages | |
| PACKAGES=$(echo "$CHANGED_FILES" | xargs -n1 dirname | sort -u | tr '\n' ' ') | |
| # Run targeted tests | |
| for pkg in $PACKAGES; do | |
| go test -v ./$pkg/... | |
| done | |
| CHANGED_FILES=$(git diff --name-only HEAD | grep "\.go$") | |
| if [ -z "$CHANGED_FILES" ]; then | |
| echo "No changed Go files." | |
| exit 0 | |
| fi | |
| # Extract packages | |
| PACKAGES=$(echo "$CHANGED_FILES" | xargs -n1 dirname | sort -u | tr '\n' ' ') | |
| # Run targeted tests | |
| for pkg in $PACKAGES; do | |
| go test -v ./$pkg/... | |
| done |
🤖 Prompt for 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.
In @.claude/agents/test-agent.md around lines 31 - 39, The script currently
pipes CHANGED_FILES into xargs to compute PACKAGES and will misbehave or error
when CHANGED_FILES is empty; add an early guard after computing CHANGED_FILES
(and before using xargs dirname) to check if CHANGED_FILES is empty and exit
successfully (or skip tests) to avoid calling xargs with no input; update the
block that sets PACKAGES and the subsequent for pkg loop to be skipped when
CHANGED_FILES is empty so the go test invocation only runs when there are
changed .go files.
| ``` | ||
| .claude/skills/ | ||
| ├── README.md | ||
| └── skillname/ | ||
| ├── SKILL.md # Required: skill definition | ||
| └── reference/ # Optional: supporting docs | ||
| ``` |
There was a problem hiding this comment.
Add fenced code block language to satisfy markdown lint.
The directory-structure block should declare a language (e.g., text) to address MD040.
Suggested update
-```
+```text
.claude/skills/
├── README.md
└── skillname/
├── SKILL.md # Required: skill definition
└── reference/ # Optional: supporting docs</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 66-66: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for 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.
In @.claude/skills/README.md around lines 66 - 72, The README
directory-structure code fence is missing a language tag which triggers MD040;
edit the fenced block in .claude/skills/README.md (the directory-structure block
that starts with ``` ) and change it to declare a language such as text (i.e.,
use ```text) so the block becomes a labeled text code block while keeping the
same contents.
| paths = [ | ||
| '''test/fixtures/.*''', | ||
| '''test/deploy/.*''', | ||
| '''.*_test\.go''', | ||
| '''boilerplate/.*''', | ||
| '''vendor/.*''', | ||
| '''zz_generated\..*\.go''', | ||
| ] |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
In gitleaks v8, does a global allowlist paths regex skip scanning of matching files entirely?
💡 Result:
Yes, in Gitleaks v8, defining paths in a global allowlist (configured via [[allowlists]] in your configuration file) causes Gitleaks to skip scanning those files entirely [1][2]. When a file path matches a pattern defined in the paths array of a global allowlist, Gitleaks effectively ignores that file during the scan, preventing any secrets from being detected within it [2][3]. This mechanism functions with high precedence [2][3]. Key points regarding this behavior: - Configuration: Global allowlists are defined at the top level of the gitleaks.toml configuration file using [[allowlists]] [2][4]. - Functionality: The paths field accepts regex patterns [1][3]. If a file path matches one of these regex patterns, the file is excluded from the scanning process [2][3]. - Precedence: Global allowlists have a higher order of precedence than rule-specific allowlists [2][3]. If a file is matched by a global allowlist path, it is skipped regardless of other individual rule configurations [2][3]. Note: Ensure your regex patterns in the paths array are correctly formatted (often using triple-quoted raw strings in TOML for ease of escaping, e.g., paths = ['''path/to/ignore/.*''']) to ensure they match the intended file paths accurately [1][2].
Citations:
- 1: https://pkg.go.dev/github.com/zricethezav/gitleaks/v8
- 2: https://github.com/gitleaks/gitleaks
- 3: https://openaitx.github.io/projects/gitleaks/gitleaks/README-en.html
- 4: https://deepwiki.com/gitleaks/gitleaks/4.4-allowlists-and-baselines
Tighten the gitleaks global allowlist to avoid skipping all Go test files.
.*_test\.go in .gitleaks.toml (lines 25-32, line 28) causes gitleaks v8 to skip scanning every matching *_test.go file entirely, creating a blind spot where real secrets in tests could be missed. Remove this broad exemption and only exclude the specific fixture/deploy paths you already intend to ignore.
🔐 Suggested tightening
paths = [
'''test/fixtures/.*''',
'''test/deploy/.*''',
- '''.*_test\.go''',
'''boilerplate/.*''',
'''vendor/.*''',
'''zz_generated\..*\.go''',
]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| paths = [ | |
| '''test/fixtures/.*''', | |
| '''test/deploy/.*''', | |
| '''.*_test\.go''', | |
| '''boilerplate/.*''', | |
| '''vendor/.*''', | |
| '''zz_generated\..*\.go''', | |
| ] | |
| paths = [ | |
| '''test/fixtures/.*''', | |
| '''test/deploy/.*''', | |
| '''boilerplate/.*''', | |
| '''vendor/.*''', | |
| '''zz_generated\..*\.go''', | |
| ] |
🤖 Prompt for 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.
In @.gitleaks.toml around lines 25 - 32, The global allowlist in .gitleaks.toml
currently contains the broad pattern '.*_test\.go' inside the paths = [...]
array which causes all Go test files to be skipped; remove that pattern from the
paths array and keep only the intended specific exclusions (for example the
existing '''test/fixtures/.*''', '''test/deploy/.*''', '''boilerplate/.*''',
'''vendor/.*''', '''zz_generated\..*\.go''') so gitleaks will scan *_test.go
files; update the paths array in .gitleaks.toml accordingly and run a quick
gitleaks scan to verify tests are no longer globally excluded.
| # Contributing to Gcp Project | ||
|
|
||
| Thank you for your interest in contributing to the GCP Project Operator! This guide provides comprehensive instructions for setting up your development environment, running tests, and contributing code. | ||
| Thank you for your interest in contributing to the Gcp Project project. |
There was a problem hiding this comment.
Fix project naming and duplicated wording in the heading/intro.
Gcp Project and Gcp Project project are inconsistent and read as a typo. Use the canonical repo/product name consistently (e.g., GCP Project Operator).
🤖 Prompt for 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.
In `@CONTRIBUTING.md` around lines 1 - 3, Update the heading and intro to use the
canonical product name and remove the duplicated word: change the heading text
"# Contributing to Gcp Project" to "# Contributing to GCP Project Operator" and
edit the intro line "Thank you for your interest in contributing to the Gcp
Project project." to "Thank you for your interest in contributing to GCP Project
Operator." Ensure both occurrences use the exact same capitalization and
phrasing "GCP Project Operator".
| fi | ||
|
|
||
| prek run --all-files | ||
| prek run --config hack/prek.ci.toml --all-files |
There was a problem hiding this comment.
Make prek config resolution independent of caller working directory.
Line 9 uses a relative config path, but this script no longer cds to repo root. Invocations from non-root directories can fail to find hack/prek.ci.toml.
Suggested fix
if ! command -v prek &>/dev/null; then
echo "Error: prek is not installed. Install with: uv tool install prek" >&2
exit 1
fi
-prek run --config hack/prek.ci.toml --all-files
+script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
+repo_root="$(cd -- "${script_dir}/.." && pwd)"
+prek run --config "${repo_root}/hack/prek.ci.toml" --all-files📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| prek run --config hack/prek.ci.toml --all-files | |
| if ! command -v prek &>/dev/null; then | |
| echo "Error: prek is not installed. Install with: uv tool install prek" >&2 | |
| exit 1 | |
| fi | |
| script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" | |
| repo_root="$(cd -- "${script_dir}/.." && pwd)" | |
| prek run --config "${repo_root}/hack/prek.ci.toml" --all-files |
🤖 Prompt for 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.
In `@hack/ci.sh` at line 9, The prek invocation uses a relative path
"hack/prek.ci.toml" which breaks when the script is run from a non-root working
directory; change the script to resolve the config file path relative to the
script location (e.g., compute the script directory/REPO_ROOT and construct an
absolute path to hack/prek.ci.toml) and use that absolute path in the "prek run
--config ... --all-files" call so config resolution is independent of the
caller's cwd.
cba58f6 to
d0c98c0
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: devppratik The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
d0c98c0 to
baf3bc1
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 @.claude/agents/README.md:
- Line 3: Update the opening sentence in .claude/agents/README.md by replacing
the incorrect phrase "this operator development workflows" with the
grammatically correct "this operator's development workflows" (or "the
operator's development workflows") so the description reads naturally; edit the
top line of the README to use the possessive form.
In @.claude/skills/prow-ci/SKILL.md:
- Line 7: Update the heading text to use the standard acronym casing: replace
"Prow CI Access for Gcp Project" with "Prow CI Access for GCP Project" so the
acronym GCP matches repository/product naming conventions; ensure any other
occurrences of "Gcp" in SKILL.md are similarly corrected.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 692c0833-5cdf-446c-b7fb-e8b119d55e5e
📒 Files selected for processing (21)
.claude/agents/README.md.claude/agents/ci-agent.md.claude/agents/docs-agent.md.claude/agents/lint-agent.md.claude/agents/security-agent.md.claude/agents/test-agent.md.claude/hooks/README.md.claude/hooks/cleanup.sh.claude/hooks/pre-edit.sh.claude/hooks/stop-prek-validation.sh.claude/settings.json.claude/skills/README.md.claude/skills/prow-ci/SKILL.md.gitleaks.toml.prek-versionCONTRIBUTING.mdDEVELOPMENT.mdTESTING.mdhack/ci.shhack/prek.ci.tomlprek.toml
✅ Files skipped from review due to trivial changes (8)
- .prek-version
- .claude/agents/test-agent.md
- TESTING.md
- .claude/agents/lint-agent.md
- CONTRIBUTING.md
- DEVELOPMENT.md
- .claude/agents/ci-agent.md
- .claude/agents/security-agent.md
🚧 Files skipped from review as they are similar to previous changes (6)
- hack/ci.sh
- .claude/hooks/cleanup.sh
- prek.toml
- .claude/hooks/pre-edit.sh
- .gitleaks.toml
- .claude/settings.json
| @@ -0,0 +1,244 @@ | |||
| # Claude Agents | |||
|
|
|||
| Specialized agents for this operator development workflows. | |||
There was a problem hiding this comment.
Fix grammar in the opening description.
“this operator development workflows” is grammatically incorrect and reads awkwardly. Consider: “this operator’s development workflows.”
🤖 Prompt for 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.
In @.claude/agents/README.md at line 3, Update the opening sentence in
.claude/agents/README.md by replacing the incorrect phrase "this operator
development workflows" with the grammatically correct "this operator's
development workflows" (or "the operator's development workflows") so the
description reads naturally; edit the top line of the README to use the
possessive form.
| trigger: prow, prow-ci, /prow-ci, ci results, check ci | ||
| --- | ||
|
|
||
| # Prow CI Access for Gcp Project |
There was a problem hiding this comment.
Use standard acronym casing in the heading.
“Gcp” should be “GCP” for consistency with the repository and product naming.
🤖 Prompt for 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.
In @.claude/skills/prow-ci/SKILL.md at line 7, Update the heading text to use
the standard acronym casing: replace "Prow CI Access for Gcp Project" with "Prow
CI Access for GCP Project" so the acronym GCP matches repository/product naming
conventions; ensure any other occurrences of "Gcp" in SKILL.md are similarly
corrected.
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 @.claude/skills/prow-ci/SKILL.md:
- Around line 114-116: Replace the mention and command that reference pre-commit
with the repository's documented tool `prek`; specifically update the
heading/title "OR use pre-commit for comprehensive linting" and the example
command line `pre-commit run --all-files` to use `prek` (e.g., adjust the
heading text and change the command to `prek run --all-files`) so the doc
matches the repo's tooling.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: c8c0923d-059e-4d5d-aeee-9979035e0543
📒 Files selected for processing (21)
.claude/agents/README.md.claude/agents/ci-agent.md.claude/agents/docs-agent.md.claude/agents/lint-agent.md.claude/agents/security-agent.md.claude/agents/test-agent.md.claude/hooks/README.md.claude/hooks/cleanup.sh.claude/hooks/pre-edit.sh.claude/hooks/stop-prek-validation.sh.claude/settings.json.claude/skills/README.md.claude/skills/prow-ci/SKILL.md.gitleaks.toml.prek-versionCONTRIBUTING.mdDEVELOPMENT.mdTESTING.mdhack/ci.shhack/prek.ci.tomlprek.toml
✅ Files skipped from review due to trivial changes (7)
- .claude/agents/lint-agent.md
- .claude/agents/test-agent.md
- TESTING.md
- .claude/agents/security-agent.md
- CONTRIBUTING.md
- DEVELOPMENT.md
- .claude/agents/ci-agent.md
🚧 Files skipped from review as they are similar to previous changes (8)
- hack/ci.sh
- .gitleaks.toml
- .prek-version
- hack/prek.ci.toml
- .claude/settings.json
- .claude/hooks/stop-prek-validation.sh
- prek.toml
- .claude/hooks/pre-edit.sh
| # OR use pre-commit for comprehensive linting | ||
| pre-commit run --all-files | ||
|
|
There was a problem hiding this comment.
Use prek command here to match repository tooling.
This section currently tells contributors to run pre-commit, but this repo’s documented hook manager in this PR is prek.
Suggested doc fix
-# OR use pre-commit for comprehensive linting
-pre-commit run --all-files
+# OR use prek for comprehensive linting
+prek run --all-files🤖 Prompt for 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.
In @.claude/skills/prow-ci/SKILL.md around lines 114 - 116, Replace the mention
and command that reference pre-commit with the repository's documented tool
`prek`; specifically update the heading/title "OR use pre-commit for
comprehensive linting" and the example command line `pre-commit run --all-files`
to use `prek` (e.g., adjust the heading text and change the command to `prek run
--all-files`) so the doc matches the repo's tooling.
baf3bc1 to
d83b6a5
Compare
- Add .claude/ directory with agents, hooks, and skills - Add prek validation framework (prek.toml, hack/prek.ci.toml) - Add gitleaks secret scanning (.gitleaks.toml) - Add CONTRIBUTING.md, DEVELOPMENT.md, TESTING.md - Add CLAUDE.md (if not already present) - Add stop hook for automatic validation Based on ocm-agent-operator PR openshift#257 (SREP-4410, SREP-4411) Brings the repo up to Agentic SDLC contribution standard
d83b6a5 to
fa70215
Compare
|
@devppratik: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
What type of PR is this?
docs/feature
What this PR does / why we need it?
References
Summary by CodeRabbit