A simple Python script to validate and check the existence of paths defined in a .github/CODEOWNERS
file.
- Reads
.github/CODEOWNERS
file. - Skips empty lines and comments.
- Extracts paths before the first
@
symbol. - Checks if the paths exist in the repository.
- Outputs results with β (exists) or β (missing).
A single bash line that will download the script and run it using Python (either python or python3 depending on what is available):
curl -sSL https://raw.githubusercontent.com/BaseMax/codeowners-validator/refs/heads/main/codeowners_validator.py -o codeowners_validator.py && (python3 codeowners_validator.py || python codeowners_validator.py)
Clone the repository:
git clone https://github.com/BaseMax/codeowners-validator.git
cd codeowners-validator
Run the script from the root of your repository:
python codeowners_validator.py
Testing on https://github.com/apache/airflow
repository at https://github.com/apache/airflow/tree/2055aeedb7fa62366907a90c78f7709da612ed25 commit:
C:\Users\ALI\Projects\airflow>python codeowners_validator.py
β
Exists: airflow-core/src/airflow/executors/
β
Exists: airflow-core/src/airflow/jobs/
β
Exists: airflow-core/src/airflow/models/
β
Exists: airflow-core/src/airflow/serialization/
β
Exists: airflow-core/src/airflow/dag_processing
β
Exists: providers/cncf/kubernetes/
β
Exists: chart/
β Missing: docs/*.py
β Missing: docs/apache-airflow
β Missing: docs/docker-stack
β Missing: docs/helm-chart
β
Exists: airflow-core/src/airflow/api/
β
Exists: airflow-core/src/airflow/api_fastapi/
β
Exists: airflow-core/src/airflow/api_fastapi/execution_api/
β
Exists: airflow-ctl/
β
Exists: airflow-core/src/airflow/api_fastapi/auth/
β
Exists: airflow-core/src/airflow/ui/
β
Exists: airflow-core/src/airflow/security/permissions.py
β
Exists: airflow-core/src/airflow/timetables/
β Missing: docs/apache-airflow/concepts/timetable.rst
β
Exists: airflow-core/src/airflow/models/abstractoperator.py
β
Exists: airflow-core/src/airflow/models/baseoperator.py
β
Exists: airflow-core/src/airflow/models/expandinput.py
β
Exists: airflow-core/src/airflow/models/mappedoperator.py
β
Exists: airflow-core/src/airflow/models/operator.py
β
Exists: airflow-core/src/airflow/models/xcom_arg.py
β Missing: docs/apache-airflow/concepts/dynamic-task-mapping.rst
β
Exists: airflow-core/src/airflow/cli/commands/triggerer_command.py
β Missing: airflow-core/src/airflow/jobs/triggerer_job.py
β
Exists: airflow-core/src/airflow/jobs/triggerer_job_runner.py
β Missing: docs/apache-airflow/authoring-and-scheduling/deferring.rst
β
Exists: airflow-core/src/airflow/secrets
β
Exists: providers/amazon/
β
Exists: providers/celery/
β
Exists: providers/cncf/kubernetes
β
Exists: providers/common/messaging/
β
Exists: providers/common/sql/
β
Exists: providers/dbt/cloud/
β
Exists: providers/edge/
β
Exists: providers/fab/
β
Exists: providers/hashicorp/
β
Exists: providers/openlineage/
β
Exists: providers/slack/
β
Exists: providers/smtp/
β
Exists: providers/snowflake/
β
Exists: providers/apache/iceberg/
β
Exists: .github/workflows/
β
Exists: dev/
β
Exists: docker-tests/
β
Exists: kubernetes-tests/
β
Exists: helm-tests/
β
Exists: scripts/
β
Exists: Dockerfile
β
Exists: Dockerfile.ci
β
Exists: dev/PROJECT_GUIDELINES.md
β Missing: dev/PROVIDER_PACKAGE_DETAILS.md
β
Exists: dev/README.md
β Missing: dev/README_RELEASE_*.md
β
Exists: dev/README_RELEASE_PROVIDERS.md
β
Exists: ISSUE_TRIAGE_PROCESS.rst
β
Exists: airflow-core/src/airflow/decorators/setup_teardown.py
β Missing: airflow-core/src/airflow/example_dags/example_setup_teardown*.py
β
Exists: airflow-core/src/airflow/utils/setup_teardown.py
β
Exists: airflow-core/src/airflow/io/
β Missing: providers/**/fs/
β
Exists: providers/common/io/
β Missing: docs/apache-airflow/core-concepts/objectstorage.rst
β
Exists: airflow-core/src/airflow/migrations/
β Missing: providers/fab/src/airflow-core/src/airflow/providers/fab/migrations/
β
Exists: task-sdk/
- Python 3.x
This project is licensed under the MIT License.
Copyright (c) 2025, Max Base.