-
Notifications
You must be signed in to change notification settings - Fork 8
t1264: Daily repo sync — auto-pull latest for git repos in configured parent directories #1989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1082,6 +1082,38 @@ If you're not sure what to build, tell me: | |
|
|
||
| I'll suggest a small project tailored to your needs that we can build together in the playground. | ||
|
|
||
| ## Repo Sync Configuration | ||
|
|
||
| During onboarding, ask the user about their git parent directories for daily repo sync: | ||
|
|
||
| ```text | ||
| Repo sync keeps your local git repos up to date by running git pull --ff-only | ||
| daily on repos that are clean and on their default branch. | ||
|
|
||
| Where do you keep your git repos? (default: ~/Git) | ||
| Enter one or more directories separated by commas, or press Enter for default: | ||
| ``` | ||
|
|
||
| If the user provides directories, configure them: | ||
|
|
||
| ```bash | ||
| # Update repos.json with git_parent_dirs | ||
| jq --argjson dirs '["~/Git", "~/Projects"]' \ | ||
| '. + {git_parent_dirs: $dirs}' \ | ||
| ~/.config/aidevops/repos.json > /tmp/repos.json && \ | ||
| mv /tmp/repos.json ~/.config/aidevops/repos.json | ||
|
Comment on lines
+1099
to
+1104
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Example uses Users will copy-paste this. Using a predictable path in Safer example # Update repos.json with git_parent_dirs
jq --argjson dirs '["~/Git", "~/Projects"]' \
'. + {git_parent_dirs: $dirs}' \
- ~/.config/aidevops/repos.json > /tmp/repos.json && \
- mv /tmp/repos.json ~/.config/aidevops/repos.json
+ ~/.config/aidevops/repos.json > ~/.config/aidevops/repos.json.tmp && \
+ mv ~/.config/aidevops/repos.json.tmp ~/.config/aidevops/repos.json🤖 Prompt for AI Agents |
||
|
|
||
| # Enable the daily scheduler | ||
| aidevops repo-sync enable | ||
| ``` | ||
|
|
||
| If the user skips, note they can configure later: | ||
|
|
||
| ```bash | ||
| aidevops repo-sync config # Show configuration instructions | ||
| aidevops repo-sync enable # Enable after configuring | ||
| ``` | ||
|
|
||
| ## Next Steps After Setup | ||
|
|
||
| Once services are configured: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example
jqcommand for updatingrepos.jsonuses a hardcoded temporary file path (/tmp/repos.json). This is not a safe pattern as it can lead to race conditions or conflicts if multiple processes attempt this operation simultaneously. The scripts in this repository correctly usemktempfor creating temporary files, and the documentation should reflect this best practice for consistency and safety.