-
Notifications
You must be signed in to change notification settings - Fork 15
Add Watchflow governance rules (3 rules, 1 high-priority) #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.watchflow/rules.yaml:
- Around line 18-25: The rule entry with key/title_pattern is missing the
required parameters map; add a parameters: section under the same rule and
define title_pattern as a regex string that enforces Conventional Commit titles
(e.g., allowing scopes and a description), ensuring you update the existing
block that contains key: title_pattern, name: Enforce Conventional Commit
Titles, description, severity, category, and reasoning to include parameters:
title_pattern with the regex pattern shown in the review.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.watchflow/rules.yaml
🔇 Additional comments (2)
.watchflow/rules.yaml (2)
2-9: LGTM!The
require_linked_issuerule is well-structured with clear description and reasoning. The high severity appropriately reflects the significant unlinked issue rate mentioned.
10-17: The rule configuration is correct as-is. Watchflow uses a simplified schema where rules are defined generically (key, name, description, severity, category, reasoning) without rule-specific configuration fields. Therequired_workflowsrule follows the same pattern as the other two rules in the file (require_linked_issueandtitle_pattern), and the description clearly indicates the intent: "Ensure all PRs pass CI workflows before merging."Likely an incorrect or invalid review comment.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| - key: title_pattern | ||
| name: Enforce Conventional Commit Titles | ||
| description: Require PR titles to follow Conventional Commit patterns (feat:, fix:, | ||
| etc.) for better changelog generation and clarity. | ||
| severity: medium | ||
| category: quality | ||
| reasoning: No explicit mention of commit message standards; enforcing title patterns | ||
| improves commit hygiene and project governance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Watchflow title_pattern rule pattern field required documentation
💡 Result:
In Watchflow, title_pattern is a rule parameter (a string) used to enforce a pull request title format via a regular expression in your repository’s .watchflow/rules.yaml file. Example: parameters.title_pattern: "^[A-Z]+-[0-9]+: .+". [1]
It’s not a standalone “pattern” field at the top level—Watchflow rules are defined under rules: and commonly include fields like description, severity, event_types, and a parameters: map where rule-specific inputs (like title_pattern) live. [2]
If you’re using a “PR title must match …” rule, then title_pattern is effectively required for that rule to work, because it defines what the title must match. [1]
Sources: [1] [2]
Add parameters: section with regex pattern to enforce Conventional Commit titles.
The rule lacks the required title_pattern parameter. In Watchflow, title_pattern must be defined within a parameters: map as a regex string. Without it, the rule cannot validate PR titles. Update the rule to:
- key: title_pattern
name: Enforce Conventional Commit Titles
description: Require PR titles to follow Conventional Commit patterns (feat:, fix:,
etc.) for better changelog generation and clarity.
severity: medium
category: quality
reasoning: No explicit mention of commit message standards; enforcing title patterns
improves commit hygiene and project governance.
parameters:
title_pattern: "^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\\(.+\\))?: .+"🤖 Prompt for AI Agents
In @.watchflow/rules.yaml around lines 18 - 25, The rule entry with
key/title_pattern is missing the required parameters map; add a parameters:
section under the same rule and define title_pattern as a regex string that
enforces Conventional Commit titles (e.g., allowing scopes and a description),
ensuring you update the existing block that contains key: title_pattern, name:
Enforce Conventional Commit Titles, description, severity, category, and
reasoning to include parameters: title_pattern with the regex pattern shown in
the review.
Adds Watchflow rule recommendations based on repository analysis.
Need to update rules later? Analyze your repository again to get updated recommendations.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.