Skip to content

feat(repo-cache, repo-policy-sync): support glob repository selection - #33

Merged
AlexanderLanin merged 2 commits into
mainfrom
globs
Sep 10, 2026
Merged

feat(repo-cache, repo-policy-sync): support glob repository selection#33
AlexanderLanin merged 2 commits into
mainfrom
globs

Conversation

@AlexanderLanin

Copy link
Copy Markdown
Member

Why

Repository Policy Sync could only target exact repository names, which made organization-wide rollouts require a manually maintained allowlist. Supporting stable shell-style patterns lets newly created repositories be included automatically while still surfacing invalid selectors clearly.

What changed

  • Support case-sensitive Python fnmatch patterns for --repo and TOML repos values.
  • Match selectors against the organization listing before any checkout or policy evaluation.
  • Distinguish unmatched patterns from missing exact repository names in diagnostics.
  • Prevent --recreate from operating on more than one repository after pattern expansion.
  • Document pattern syntax and add regression coverage.

Fixes #32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Recreate cardinality is validated only after all matched repositories are synchronized, and one diagnostic misrepresents archived-inclusive selection.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds case-sensitive fnmatch repository selection across Repo Cache and Repository Policy Sync.

Changes:

  • Expands glob selectors before synchronization.
  • Adds unmatched-pattern diagnostics and --recreate validation.
  • Documents behavior and adds regression tests.
File summaries
File Description
repo_cache/src/sync.py Implements pattern expansion and diagnostics.
repo_cache/src/cli.py Updates CLI help.
repo_cache/tests/test_sync.py Tests expansion and errors.
repo_cache/README.md Documents glob selection.
repo_policy_sync/src/runner.py Validates expanded recreate targets.
repo_policy_sync/src/cli.py Updates CLI help.
repo_policy_sync/tests/test_runner.py Tests recreate cardinality.
repo_policy_sync/tests/test_cli.py Tests CLI/TOML forwarding.
repo_policy_sync/README.md Documents pattern syntax.
repo_policy_sync/docs/reference/configuration.md Documents TOML selectors.
repo_policy_sync/docs/reference/cli.md Updates CLI reference.
repo_policy_sync/docs/how-to/run-a-policy.md Adds rollout examples.
Review details
  • Files reviewed: 12/12 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread repo_policy_sync/src/runner.py
Comment thread repo_cache/src/sync.py Outdated

@MaximilianSoerenPollak MaximilianSoerenPollak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked about in a call. Seems quiet usefull.

@AlexanderLanin AlexanderLanin changed the title feat(repo-policy-sync): support glob repository selection feat(repo-cache, repo-policy-sync): support glob repository selection Sep 10, 2026
@AlexanderLanin
AlexanderLanin merged commit 4bbd75e into main Sep 10, 2026
6 checks passed
@AlexanderLanin
AlexanderLanin deleted the globs branch September 10, 2026 16:07
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.

repo_policy_sync: support glob patterns for repository selection

3 participants