forked from opendatahub-io/notebooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
71 lines (64 loc) · 3.39 KB
/
.coderabbit.yaml
File metadata and controls
71 lines (64 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
# Inherits from org-wide config: https://github.com/opendatahub-io/coderabbit
# Only overrides listed below differ from the org baseline.
inheritance: true
reviews:
auto_review:
base_branches:
- main
- stable
# opendatahub-io/notebooks
- 2024a
- 2024b
# red-hat-data-services/notebooks
- rhoai-.*
- release-.*
pre_merge_checks:
title:
mode: warning # change to "error" to block merges (with Request Changes Workflow)
requirements: |
EXEMPT from all rules below:
- Titles starting with "Revert " (GitHub UI reverts, e.g. Revert "chore(...): ...")
- Titles starting with "Update lock files" or "Update BuildConfigs"
- Titles starting with "Sync PipelineRuns"
- Titles starting with "Merge pull request"
- Any PR authored by a bot account (username ending in [bot])
For human-authored PRs, apply these rules in order of priority:
STRICT - Imperative mood (always warn if violated):
The title description MUST use imperative mood ("add", "remove", "fix", "update")
not past tense ("added", "removed", "fixed", "updated") or gerund ("adding", etc.).
No trailing period.
STRONG SUGGESTION - Issue/ticket reference:
Titles SHOULD include a ticket reference in one of these forms:
- RHAIENG-XXXX (one or more, comma-separated)
- NO-JIRA (for infrastructure, CI, docs, dev workflow changes)
- ISSUE #NNN (GitHub issue reference)
- [RHAIENG-XXXX] (bracket style, used in downstream repos)
If missing, suggest adding one but do not treat as a hard failure.
GENTLE NUDGE - Preferred format:
The ideal format is: "<TICKET>: <scope>: <description>"
where <scope> is one of: chore, feat, fix, docs, refactor, test, build,
ci, style, perf, revert (optionally scoped like chore(.tekton/)).
If the title doesn't follow this format but satisfies the strict rules
above, just mention the preferred format as a suggestion.
Valid examples:
- "RHAIENG-3019: chore: remove tf2onnx from pyproject.toml(s)"
- "NO-JIRA: chore(.tekton): update multiarch pipeline"
- "ISSUE #2944: chore(base-images/aipcc.sh): enable COPR repo"
- "[release-2.11] RHAIENG-3019: chore: remove tf2onnx"
- "[rhoai-2.25][RHAIENG-3209] chore(workbenches/runtimes): update llmcompressor"
custom_checks:
- name: "Branch prefix policy"
mode: warning # change to "error" once confirmed with the team
instructions: |
Validate the PR title's [branch] prefix against the base branch:
- If baseRefName is "main": the title MUST NOT start with a branch
prefix like "[release-2.11] " or "[rhoai-2.25] ". However, JIRA
references in brackets like "[RHAIENG-1234]" are perfectly fine
and should NOT be flagged.
- If baseRefName is not "main": the title MUST start with "["
followed by the base branch name and "] ".
Exempt: titles starting with "Revert ", "Update lock files",
"Update BuildConfigs", "Sync PipelineRuns", "Merge pull request",
or PRs authored by bot accounts.
On failure, show the expected prefix and a one-line fix hint.