NO-JIRA: Improve commit and PR guidance in AGENTS.md#8373
NO-JIRA: Improve commit and PR guidance in AGENTS.md#8373openshift-merge-bot[bot] merged 2 commits intoopenshift:mainfrom
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@bryan-cox: This pull request explicitly references no jira issue. 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR updates AGENTS.md to replace prior gitlint/commit-message guidance with instructions to use the 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Review rate limit: 8/10 reviews remaining, refill in 7 minutes and 46 seconds. Comment |
d20975a to
298e389
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@AGENTS.md`:
- Around line 209-216: Update the "Docs" entry so it matches the stated commit
format by either making the scope explicit or marking the scope as optional:
change the line that reads “Docs (`docs:`)” to show the full pattern used
elsewhere (e.g., “Docs (`docs(<scope>):`)” or “Docs (`docs` or
`docs(<scope>):`)”), and/or add a short note in the "Commit Messages" format
rule that the scope is optional; ensure the AGENTS.md entry and the Commit
Messages rule are consistent so agents/githooks expecting `<type>(<scope>):
<description>` will not fail.
- Around line 188-196: Update AGENTS.md to correct the statement that "make
run-gitlint" enforces required footers and no trailing whitespace: inspect the
repository's .gitlint configuration and explicitly state only the actual rules
enabled (e.g., type allowlist and line-length limits) and remove or reword
claims about required-footer and trailing-whitespace enforcement; mention that
agents should run make run-gitlint to validate configured rules and point
readers to the .gitlint file for the authoritative rule set (referencing "make
run-gitlint", "gitlint", ".gitlint", and AGENTS.md to locate the change).
🪄 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 YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 6037325e-aa31-4d5b-8435-63c322d64e42
📒 Files selected for processing (1)
AGENTS.md
| 1. **API** (`feat(api):`) — `api/` types and go.mod (excluding generated files) | ||
| 2. **Vendor** (`chore(api):`) — `vendor/`, `client/`, generated files (`zz_generated*`, `zz_fixture_*`) | ||
| 3. **CLI** (`feat(cli):`) — `cmd/cluster/`, `cmd/install/`, `cmd/nodepool/`, `product-cli/` | ||
| 4. **HO** (`feat(hypershift-operator):`) — `hypershift-operator/`, `support/`, `karpenter-operator/`, `pkg/` | ||
| 5. **CPO** (`feat(control-plane-operator):`) — `control-plane-operator/`, control plane sidecars | ||
| 6. **E2E** (`test(e2e):`) — `test/`, `api/**/*_test.go` | ||
| 7. **Docs** (`docs:`) — `docs/`, `examples/` | ||
|
|
There was a problem hiding this comment.
Make “Docs” commit example consistent with the stated commit format.
Your earlier rule states commit format as <type>(<scope>): <description>. But the component mapping uses “Docs (docs:)” with no (scope) (Line 215). If gitlint requires a scope, the example will fail and agents will follow a bad pattern.
🔧 Suggested doc change
- 7. **Docs** (`docs:`) — `docs/`, `examples/`
+ 7. **Docs** (`docs(docs):`) — `docs/`, `examples/`If you intended scope to be optional for some commit types, consider explicitly stating that in the “Commit Messages” format rule.
📝 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.
| 1. **API** (`feat(api):`) — `api/` types and go.mod (excluding generated files) | |
| 2. **Vendor** (`chore(api):`) — `vendor/`, `client/`, generated files (`zz_generated*`, `zz_fixture_*`) | |
| 3. **CLI** (`feat(cli):`) — `cmd/cluster/`, `cmd/install/`, `cmd/nodepool/`, `product-cli/` | |
| 4. **HO** (`feat(hypershift-operator):`) — `hypershift-operator/`, `support/`, `karpenter-operator/`, `pkg/` | |
| 5. **CPO** (`feat(control-plane-operator):`) — `control-plane-operator/`, control plane sidecars | |
| 6. **E2E** (`test(e2e):`) — `test/`, `api/**/*_test.go` | |
| 7. **Docs** (`docs:`) — `docs/`, `examples/` | |
| 1. **API** (`feat(api):`) — `api/` types and go.mod (excluding generated files) | |
| 2. **Vendor** (`chore(api):`) — `vendor/`, `client/`, generated files (`zz_generated*`, `zz_fixture_*`) | |
| 3. **CLI** (`feat(cli):`) — `cmd/cluster/`, `cmd/install/`, `cmd/nodepool/`, `product-cli/` | |
| 4. **HO** (`feat(hypershift-operator):`) — `hypershift-operator/`, `support/`, `karpenter-operator/`, `pkg/` | |
| 5. **CPO** (`feat(control-plane-operator):`) — `control-plane-operator/`, control plane sidecars | |
| 6. **E2E** (`test(e2e):`) — `test/`, `api/**/*_test.go` | |
| 7. **Docs** (`docs(docs):`) — `docs/`, `examples/` |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@AGENTS.md` around lines 209 - 216, Update the "Docs" entry so it matches the
stated commit format by either making the scope explicit or marking the scope as
optional: change the line that reads “Docs (`docs:`)” to show the full pattern
used elsewhere (e.g., “Docs (`docs(<scope>):`)” or “Docs (`docs` or
`docs(<scope>):`)”), and/or add a short note in the "Commit Messages" format
rule that the scope is optional; ensure the AGENTS.md entry and the Commit
Messages rule are consistent so agents/githooks expecting `<type>(<scope>):
<description>` will not fail.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox 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 |
1 similar comment
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox 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 |
Replace the indirect pointer to .cursor/rules/git-commit-format.mdc with a reference to the git-commit-format skill. Add a restructuring commits subsection directing agents to use the restructure-hypershift-commits skill before creating PRs or after addressing review comments. Signed-off-by: Bryan Cox <brcox@redhat.com> Commit-Message-Assisted-by: Claude (via Claude Code)
298e389 to
61d57a2
Compare
Add guidance for agents on PR creation workflow including pre-PR checklist, PR title format with Jira IDs, draft mode workflow, and post-review commit reorganization. Signed-off-by: Bryan Cox <brcox@redhat.com> Commit-Message-Assisted-by: Claude (via Claude Code)
61d57a2 to
cb93318
Compare
|
/area ai |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
AGENTS.md (1)
188-189:⚠️ Potential issue | 🟡 MinorClarify what
make run-gitlintactually validates.The current phrasing could mislead readers into thinking gitlint validates the required footers mentioned. The actual
.gitlintconfiguration only enforces conventional commit types and line-length limits (120 chars for title, 140 for body)—not required footers or trailing whitespace. These footers are handled by thegit-commit-formatskill separately.📝 Suggested clarification
-Use the `git-commit-format` skill for formatting rules and required footers. Validate with `make run-gitlint`. Do NOT put Jira IDs in commit messages — they belong only in PR titles. +Use the `git-commit-format` skill for formatting rules and required footers (Signed-off-by, Commit-Message-Assisted-by). Validate commit format and line lengths with `make run-gitlint`. Do NOT put Jira IDs in commit messages — they belong only in PR titles.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@AGENTS.md` around lines 188 - 189, The doc wording is misleading about what make run-gitlint checks; update the sentence referencing `make run-gitlint` and `git-commit-format` to clarify that `make run-gitlint` runs the repository's .gitlint rules (enforcing conventional commit types and title/body line-length limits) while the `git-commit-format` skill enforces required footers and trailing-whitespace rules; specifically, change the line that currently reads "Validate with `make run-gitlint`. Do NOT put Jira IDs..." to explicitly state that `.gitlint` enforces commit type and length limits (120/140) and that required footers are enforced by the `git-commit-format` skill. Ensure mentions of `make run-gitlint`, `.gitlint`, and `git-commit-format` are present so readers know which tool validates which rule.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@AGENTS.md`:
- Around line 188-189: The doc wording is misleading about what make run-gitlint
checks; update the sentence referencing `make run-gitlint` and
`git-commit-format` to clarify that `make run-gitlint` runs the repository's
.gitlint rules (enforcing conventional commit types and title/body line-length
limits) while the `git-commit-format` skill enforces required footers and
trailing-whitespace rules; specifically, change the line that currently reads
"Validate with `make run-gitlint`. Do NOT put Jira IDs..." to explicitly state
that `.gitlint` enforces commit type and length limits (120/140) and that
required footers are enforced by the `git-commit-format` skill. Ensure mentions
of `make run-gitlint`, `.gitlint`, and `git-commit-format` are present so
readers know which tool validates which rule.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: f710707c-8550-4671-8584-285c11ca71e3
📒 Files selected for processing (1)
AGENTS.md
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8373 +/- ##
=======================================
Coverage 36.46% 36.46%
=======================================
Files 765 765
Lines 93256 93256
=======================================
Hits 34010 34010
Misses 56532 56532
Partials 2714 2714
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/verified bypass |
|
@bryan-cox: The 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. |
| - Proper line length limits | ||
| - Required footers | ||
| - No trailing whitespace | ||
| Use the `git-commit-format` skill for formatting rules and required footers. Validate with `make run-gitlint`. Do NOT put Jira IDs in commit messages — they belong only in PR titles. |
There was a problem hiding this comment.
I wonder if we could validate this change with #8382
|
/lgtm |
|
Pipeline controller notification No second-stage tests were triggered for this PR. This can happen when:
Use |
|
/verified bypass |
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. |
|
I now have the complete picture. Here is the analysis report: Test Failure Analysis CompleteJob Information
Test Failure AnalysisErrorSummaryThe Root CauseThe The commit This is not a product bug or a CI infrastructure issue — it is a branch-staleness guard working as designed. The PR only changes Recommendations
Evidence
|
|
/override ci/prow/verify-workflows This is just a change in the agents file. |
|
@bryan-cox: Overrode contexts on behalf of bryan-cox: ci/prow/verify-workflows 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 kubernetes-sigs/prow repository. |
|
@bryan-cox: 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 this PR does / why we need it:
Improves the Commit Messages section in AGENTS.md and adds a new Pull Requests section to guide AI agents (and contributors) through the commit restructuring and PR creation workflow.
.cursor/rules/git-commit-format.mdcwith inline key points and a reference to thegit-commit-formatskill (works across all AI coding tools, not just Cursor)restructure-hypershift-commitsskill before creating PRs or after addressing review commentsWhich issue(s) this PR fixes:
N/A
Special notes for your reviewer:
Documentation-only change to AGENTS.md.
Checklist:
Summary by CodeRabbit