feat(drone): block commits on ruff lint errors — catch unfixable issues before CI

This commit is contained in:
AIOSAI
2026-05-15 14:21:21 -07:00
parent 57ca9abc65
commit b58825c6b6
@@ -99,6 +99,18 @@ def commit_changes(
text=True,
cwd=str(repo_root),
)
lint_check = subprocess.run(
[ruff_bin, "check", "src/", "tests/"],
capture_output=True,
text=True,
cwd=str(repo_root),
)
if lint_check.returncode != 0:
return {
"stdout": "",
"stderr": f"Lint errors — fix before committing:\n{lint_check.stdout.strip()}",
"exit_code": 1,
}
add_result = subprocess.run(
["git", "add", "-A"],
capture_output=True,