Skip to content

tools: move configure-repo config to JSON - #119

Closed
Simon Beaudoin (simonbeaudoin0935) wants to merge 1 commit into
mainfrom
issue-22-repo-config-script
Closed

tools: move configure-repo config to JSON#119
Simon Beaudoin (simonbeaudoin0935) wants to merge 1 commit into
mainfrom
issue-22-repo-config-script

Conversation

@simonbeaudoin0935

@simonbeaudoin0935 Simon Beaudoin (simonbeaudoin0935) commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • move the required variables, prerequisites, default branch, and per-environment reviewer/protection settings that configure-repo checks and applies out of Python constants and into tools/repo-configs.json, so the configuration can be read and audited without going through the script
  • generalize ensure_required_reviewers() to take an allow_admin_bypass parameter instead of always requiring bypass disabled
  • fold the Staging-specific "no protection rules" check into the same per-environment loop as the reviewer-enforced environments, both driven by the new config data
  • note repo-configs.json in tools/README.md

No functional change other than this (one cosmetic output diff: a blank line now separates every environment's protection-rule section, including Staging, since it's part of the same loop).

This lays the groundwork for further configure-repo checks (tracked in #22) to be added as config data rather than hardcoded Python.

Validation

  • python3 -m py_compile tools/configure-repo
  • python3 -c "import json; json.load(open('tools/repo-configs.json'))"
  • ./tools/configure-repo --check pkg-example — output matches pre-refactor behavior aside from the noted blank-line difference

Refs qualcomm-linux/qli-ci#22

Move the required variables, prerequisites, default branch, and
per-environment reviewer/protection settings that configure-repo
checks and applies out of Python constants and into
tools/repo-configs.json, so the configuration can be read and audited
without going through the script.

ensure_required_reviewers() now takes an allow_admin_bypass parameter
instead of always requiring bypass disabled, and the Staging-specific
"no protection rules" check is folded into the same per-environment
loop as the reviewer-enforced environments, both driven by the new
config data. No functional change other than this.

Signed-off-by: Simon Beaudoin <sbeaudoi@qti.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant