Only gitignore properties.yml in template repos; real repos get it committed - #3
Merged
Merged
Conversation
…mmitted properties.yml was unconditionally gitignored everywhere, which made sense for template repos (this one and its siblings) but meant every real repo forked from a template had to manually edit .gitignore to commit its own properties.yml (as fireball_orchestrator already does by hand). modules/setup/properties.py now runs _sync_gitignore_tracking() on every `inv setup.properties` call: if this repo's name (from its git remote, or the local folder as fallback) starts with `template_`, .gitignore is left untouched; otherwise the ignore line and its explanatory comment are stripped so properties.yml gets committed like any other repo config. Idempotent — a repo that's already had the line removed, or never had it, is left alone. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
properties.ymlwas unconditionally gitignored everywhere. That's right for template repos, butmeans every real repo forked from a template has to hand-edit
.gitignoreto commit its ownproperties.yml(asfireball_orchestratoralready does manually).Changes
modules/setup/properties.py: new_sync_gitignore_tracking(), run on everyinv setup.propertiescall — if this repo's name (from its git remote, falling back to thelocal folder) starts with
template_,.gitignoreis left untouched; otherwise the ignore lineand its comment are stripped so
properties.ymlgets committed like any other repo config.Idempotent.
modules/setup/README.mdupdated to document the new behaviortests/setup/test_setup_properties.py: newTestIsTemplateRepoandTestSyncGitignoreTrackingclasses
Verification
uv run --no-sync invoke fix && uv run --no-sync invoke test— 10/10 pylint, ruff clean, 14/14pytest passed.