feat: support default-status-checks at repository level#1112
Conversation
Code Review by Qodo
Context used 1.
|
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Branch Management
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
Security Checks
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
PR Summary by QodoEnable per-repository default-status-checks override via config schema WalkthroughsDescription• Allow default-status-checks under per-repository config by extending YAML schema. • Add example repo-level override configuration for external CI required checks. • Validate schema acceptance and runtime resolution with a dedicated Config-based test. Diagramgraph TD
A["docs/repository-overrides.md"] --> B["examples/config.yaml"] --> C["webhook_server/config/schema.yaml"] --> D["webhook_server/tests/test_config_schema.py"] --> E["Config(repository=repo)"] --> F["get_value(default-status-checks)"] --> G["Merge gate checks"]
High-Level AssessmentThe chosen approach is optimal: runtime already supported per-repo overrides, so extending the schema (plus adding an example, documentation, and a focused regression test) fixes the real blocker without introducing new configuration semantics. A deeper schema refactor (e.g., factoring common property definitions via File ChangesEnhancement (1)
Tests (1)
Documentation (2)
|
|
Code review by qodo was updated up to the latest commit 5336771 |
|
@qodo-code-review[bot] The following review comments were reviewed and a decision was made:
|
|
@qodo-code-review[bot] The following review comments were reviewed and a decision was made:
|
|
@qodo-code-review[bot] The following review comments were reviewed and a decision was made:
|
|
@qodo-code-review[bot] The following review comments were reviewed and a decision was made:
|
|
@qodo-code-review[bot] The following review comments were reviewed and a decision was made:
|
|
@coderabbitai review |
|
@qodo-code-review[bot] The following review comments were reviewed and a decision was made:
|
|
@coderabbitai full review |
|
@qodo-code-review[bot] The following review comments were reviewed and a decision was made:
|
|
/build-and-push-container |
|
New container for ghcr.io/myk-org/github-webhook-server:pr-1112 published |
|
/verified |
|
@qodo-code-review re-review |
|
@coderabbitai review |
|
@qodo-code-review re-review |
Config.get_value() already resolves per-repo → global config, so the runtime code already supported per-repo default-status-checks. Only the YAML schema was missing the property at the per-repo level, causing schema validation to reject it. Add default-status-checks to the per-repo properties in the schema, add a per-repo example in examples/config.yaml, add a schema validation test that exercises Config() constructor and get_value() resolution, and document the override in repository-overrides.md. Closes #1111 Signed-off-by: rnetser <rnetser@redhat.com> Assisted-by: Claude <noreply@anthropic.com>
…-status-checks Addresses Qodo review findings — adds global fallback, repo-override precedence, and direct schema assertion tests. Also adds default-status-checks to validator array_fields. Signed-off-by: rnetser <rnetser@redhat.com> Assisted-by: Claude <noreply@anthropic.com>
5336771 to
9985cf5
Compare
|
Code review by qodo was updated up to the latest commit 9985cf5 |
|
Clean rebase detected — no code changes compared to previous head ( |
|
@qodo-code-review[bot] The following review comments were reviewed and a decision was made:
|
|
Successfully removed PR tag: ghcr.io/myk-org/github-webhook-server:pr-1112. |
|
New container for ghcr.io/myk-org/github-webhook-server:latest published |
Problem
default-status-checkswas only accepted at the global config level. Different repos need different external CI checks required forcan-be-merged, but there was no way to configure this per-repo.Solution
The runtime code (
Config.get_value()) already resolves per-repo → global config, so per-repodefault-status-checksalready worked at runtime. Only the YAML schema was missing the property at the per-repo level, causing schema validation to reject it.Changes
webhook_server/config/schema.yaml— addeddefault-status-checksto per-repo propertiesexamples/config.yaml— added per-repo usage examplewebhook_server/tests/test_config_schema.py— added test validating schema acceptance and runtime resolution viaConfig()constructordocs/repository-overrides.md— added row to overrides tableConfig example
Closes #1111
Assisted-by: Claude noreply@anthropic.com