-
Notifications
You must be signed in to change notification settings - Fork 26
Add Watchflow governance rules (4 rules, 3 high-priority) #45
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,31 @@ | ||
| rules: | ||
| # Essential Open Source Rules | ||
| - description: "Pull requests must have descriptive titles following conventional commit format" | ||
| enabled: true | ||
| severity: "medium" | ||
| event_types: ["pull_request"] | ||
| parameters: | ||
| title_pattern: "^feat|^fix|^docs|^style|^refactor|^test|^chore|^perf|^ci|^build|^revert" | ||
|
|
||
| - description: "New contributors require approval from at least one past contributor" | ||
| enabled: true | ||
| severity: "medium" | ||
| event_types: ["pull_request"] | ||
| parameters: | ||
| min_past_contributors: 1 | ||
|
|
||
| - description: "Code changes must include corresponding tests" | ||
| enabled: true | ||
| severity: "medium" | ||
| event_types: ["pull_request"] | ||
| parameters: | ||
| pattern: "tests/.*\\.py$|test_.*\\.py$" | ||
| condition_type: "files_match_pattern" | ||
|
|
||
| - description: "Changes to critical files require review from code owners" | ||
| enabled: true | ||
| severity: "high" | ||
| event_types: ["pull_request"] | ||
|
|
||
| - description: "No direct pushes to main branch - all changes must go through PRs" | ||
| enabled: true | ||
| severity: "critical" | ||
| event_types: ["push"] | ||
| parameters: | ||
| allow_force_push: false | ||
| - description: 'code_owners: Enforce CODEOWNERS approval for critical paths to reduce | ||
| the 35% codeowner bypass rate, improving governance and code quality.' | ||
| enabled: true | ||
| severity: high | ||
| event_types: | ||
| - pull_request | ||
| parameters: {} | ||
| - description: 'required_workflows: Ensure CI passes before merge to maintain quality | ||
| and prevent regressions, supporting the existing CI/CD setup.' | ||
| enabled: true | ||
| severity: medium | ||
| event_types: | ||
| - pull_request | ||
| parameters: {} | ||
| - description: 'required_labels: Enforce categorization of PRs (bug, enhancement, | ||
| etc.) to improve issue-diff alignment and clarity, addressing the 15% mismatch | ||
| rate.' | ||
| enabled: true | ||
| severity: medium | ||
| event_types: | ||
| - pull_request | ||
| parameters: {} | ||
| - description: 'title_pattern: Enforce Conventional Commits (feat:, fix:, etc.) to | ||
| clarify PR content and ensure meaningful change tracking, especially given zero | ||
| lines changed in many PRs.' | ||
| enabled: true | ||
| severity: medium | ||
| event_types: | ||
| - pull_request | ||
| parameters: {} | ||
|
Comment on lines
1
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing rule for test coverage despite Critical severity finding. The Health Analysis Report flags "0% new-code test coverage" as Critical severity, yet no rule enforces test requirements. According to the AI summary, the previous ruleset included "tests required for code changes" which was removed in this update. Consider adding a rule to require tests for new code, especially given this is the highest-severity finding in the analysis: Suggested addition- description: 'require_tests: Require test coverage for new code to prevent regressions
and maintain code quality.'
enabled: true
severity: critical
event_types:
- pull_request
parameters: {}🤖 Prompt for AI Agents |
||
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.
Severity mismatch with PR objectives.
The PR description lists
required_workflowsas High priority, but the implementation usesmediumseverity. If CI passing is critical to prevent regressions, consider aligning the severity.Suggested fix
- description: 'required_workflows: Ensure CI passes before merge to maintain quality and prevent regressions, supporting the existing CI/CD setup.' enabled: true - severity: medium + severity: high event_types: - pull_request parameters: {}📝 Committable suggestion
🤖 Prompt for AI Agents