chore: implement org-wide governance logic#29
Merged
Conversation
damaz91
reviewed
Jun 23, 2026
damaz91
reviewed
Jun 23, 2026
ptiper
reviewed
Jun 23, 2026
ptiper
reviewed
Jun 23, 2026
damaz91
approved these changes
Jun 23, 2026
ptiper
approved these changes
Jun 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
PR Description
📝 Description
This PR introduces the GitHub Org Governance Tools (specifically the PR Validator engine), adds reusable workflows for CI/CD gating, and sets up/fixes the unit testing workflows.
During local verification, several documentation paths were corrected, a stale unit test assertion was resolved, and a bug in the label-sync test workflow step was fixed to ensure 100% test coverage and passing status checks.
🚀 Key Features & Additions
1. PR Validator Engine (
org-tools/governance/)Introduces a robust Python-based rule engine to validate incoming pull requests against customized governance rules using a hierarchical clearance structure:
pr_validator.py: The entry point that fetches PR metadata (changed files, reviews, authors), queries team memberships, and evaluates reviews.governance_config_parser.py: Handles parsing and validation of rules configurations (e.g., detecting overlapping rules or files falling into default fallbacks).2. Workflows & CI/CD Gating
reusable-governance.yml: A reusable workflow designed to run the PR validator dynamically as a status check. It checks out the central governance scripts, evaluates approvals, and posts rich Markdown reports directly to the GitHub Job Summary page and inline workflow annotations.tests.yml: A workflow executing all unit tests for the governance tools and label synchronization tool on every push and pull request tomain.Note: will send a follow-up PR to refactor pr_validator and split logic into classes with better grouped logic
Category (Required)
Please select one or more categories that apply to this change.
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
Checklist
!for breaking changes).Screenshots / Logs (if applicable)