ci: Add config file for CodeRabbit with custom rules#129
Conversation
Sourcery that we currently use cannot read documentation files and best practices, it's rather a refactoring tool. So I want to introduce CodeRabbit that allows creating .coderabbit.yaml with custom rules and conventions. Signed-off-by: Sergei Petrosian <spetrosi@redhat.com>
Reviewer's GuideAdds a project-wide CodeRabbit configuration file to enforce PR formatting and Ansible/linux-system-roles conventions during automated code review, while disabling most non-essential CodeRabbit features. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".coderabbit.yaml" line_range="202-205" />
<code_context>
+ - path: "defaults/**/*.yml"
+ instructions: |
+ - All variables MUST be prefixed with `keylime_server_`
+ - All variables MUST be stored in the file defaults/main.yml, Ansible
+ doesn't include variables from other files.
+ - These are user-facing API variables
+ - For every new variable introduced in this file, verify that it is
</code_context>
<issue_to_address>
**suggestion:** Wording about Ansible defaults loading behavior is misleading and may confuse contributors.
"Ansible doesn't include variables from other files" is inaccurate: Ansible loads all files under `defaults/` as role defaults. If this is a project convention (using only `defaults/main.yml`), please phrase it as a policy rather than a tool limitation, e.g., "All variables MUST be stored in `defaults/main.yml`; other files under `defaults/` MUST NOT be used in this role."
```suggestion
- All variables MUST be prefixed with `keylime_server_`
- All variables MUST be stored in `defaults/main.yml`; other files under
`defaults/` MUST NOT be used for variable definitions in this role.
- These are user-facing API variables
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| - All variables MUST be prefixed with `keylime_server_` | ||
| - All variables MUST be stored in the file defaults/main.yml, Ansible | ||
| doesn't include variables from other files. | ||
| - These are user-facing API variables |
There was a problem hiding this comment.
suggestion: Wording about Ansible defaults loading behavior is misleading and may confuse contributors.
"Ansible doesn't include variables from other files" is inaccurate: Ansible loads all files under defaults/ as role defaults. If this is a project convention (using only defaults/main.yml), please phrase it as a policy rather than a tool limitation, e.g., "All variables MUST be stored in defaults/main.yml; other files under defaults/ MUST NOT be used in this role."
| - All variables MUST be prefixed with `keylime_server_` | |
| - All variables MUST be stored in the file defaults/main.yml, Ansible | |
| doesn't include variables from other files. | |
| - These are user-facing API variables | |
| - All variables MUST be prefixed with `keylime_server_` | |
| - All variables MUST be stored in `defaults/main.yml`; other files under | |
| `defaults/` MUST NOT be used for variable definitions in this role. | |
| - These are user-facing API variables |
Sourcery that we currently use cannot read documentation files and best
practices, it's rather a refactoring tool.
So I want to introduce CodeRabbit that allows creating .coderabbit.yaml with
custom rules and conventions.
Signed-off-by: Sergei Petrosian spetrosi@redhat.com
Summary by Sourcery
Add a CodeRabbit configuration file to enforce repository-specific PR conventions and review guidelines.
CI:
Documentation:
Chores: