mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
ci: add Guard review config
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
disabled_labels = ["conflicts"]
|
||||
|
||||
[context]
|
||||
repos = ["frappe/frappe"]
|
||||
|
||||
[[rules]]
|
||||
id = "tests-only-when-warranted"
|
||||
rule = "Ask for a test only when the change needs one. Ask when the change adds or changes Python behaviour that a test can check: a bug fix with a reproducible scenario, new server-side logic, or a change to GL, stock or payment ledger values. Do not ask for tests for JS, Vue, HTML, CSS or DocType JSON changes, because ERPNext has no frontend tests. Do not ask for tests for label or translation changes, refactors that keep the same behaviour, or one-line guards where the test only repeats the code. When you ask for a test, name the scenario it must cover."
|
||||
|
||||
[[rules]]
|
||||
id = "postgres-compatibility"
|
||||
rule = "ERPNext runs on MariaDB and PostgreSQL from one codebase. Check that every new or changed query works on PostgreSQL. The change must not alter the values, row count or row order that MariaDB returns. Replacing an arbitrary result with a deterministic one is allowed if the row count stays the same."
|
||||
scope = ["**/*.py", "**/*.sql", "**/report/**/*.json"]
|
||||
|
||||
[[rules]]
|
||||
id = "realistic-failures-only"
|
||||
rule = "Before you report a bug, find the inputs and state that trigger it, and judge how often that happens in real use. Do not report it if it needs data that existing validation already blocks, a settings combination nobody uses, a hand-edited database, or a chain of unlikely events. If you report it, state the trigger in one line. Security and permission holes are an exception: report them even when the trigger is rare, because an attacker can cause it on purpose."
|
||||
|
||||
[auto_approve]
|
||||
enabled = true
|
||||
risk_ceiling = "low"
|
||||
Reference in New Issue
Block a user