Skip to content

Move obsidian:push-vault-repo task content to the vault repo, config sync - #344

Merged
bubacoder merged 1 commit into
mainfrom
obsidian-sync
Jun 16, 2026
Merged

Move obsidian:push-vault-repo task content to the vault repo, config sync#344
bubacoder merged 1 commit into
mainfrom
obsidian-sync

Conversation

@bubacoder

@bubacoder bubacoder commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Modified build task configuration for vault operations.
    • Streamlined vault push workflow to run optimization task.
    • Enhanced configuration push task to automatically rebase and stash changes before pushing.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

push-config-repo in Taskfile.yaml gains a print and git pull --rebase --autostash step before pushing when origin is set. docker/Taskfile.obsidian.yaml changes OBSIDIAN_VAULT_NAME from "Today" to "..", replaces the inline git commit-and-push sequence with env sourcing from Docker .env files, and delegates to task improve.

Changes

Taskfile Push Task Updates

Layer / File(s) Summary
Config repo pull-before-push
Taskfile.yaml
When origin is configured in push-config-repo, the task now echoes the resolved origin URL and runs git pull --rebase --autostash before executing git push.
Obsidian vault task refactor
docker/Taskfile.obsidian.yaml
OBSIDIAN_VAULT_NAME changed from "Today" to "..". push-vault-repo removes inline dotenv, git, pre-commit, commit, and push commands; adds a task-level env block sourcing Docker .env files for STORAGE_OBSIDIAN; and runs task improve inside the computed vault path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • bubacoder/infra#244: Introduced the push-config-repo task and its backup flow that this PR directly extends with a pull-before-push step.
  • bubacoder/infra#249: Previously reworked the push-vault-repo task logic in the Obsidian Taskfile, which this PR further refactors.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: moving the push-vault-repo task logic to the vault repository and updating config synchronization approach.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch obsidian-sync

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docker/Taskfile.obsidian.yaml`:
- Line 4: The OBSIDIAN_VAULT_NAME variable is set to ".." which resolves to the
parent directory instead of the actual vault repository location. Given that
STORAGE_OBSIDIAN points to the obsidian directory, the current relative path
causes VAULT_PATH to resolve outside the intended Obsidian directory structure.
Change the OBSIDIAN_VAULT_NAME value from ".." to the correct relative path that
properly targets the vault repository itself (likely "." or another appropriate
path depending on your vault structure). Apply this same fix at line 24 where
the same issue exists.
- Around line 16-17: Replace the bash-specific `source` command with the
POSIX-compatible `.` operator in the environment file sourcing statements.
Change both occurrences in lines 16 and 17 where `source config/docker/.env`
should become `. config/docker/.env` and `source config/docker/localhost/.env`
should become `. config/docker/localhost/.env`. This ensures the Task file
remains compatible across different shell interpreters that may not support the
Bash-specific `source` syntax.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: de66cea2-aded-4c86-8fc6-71831c4b9cfb

📥 Commits

Reviewing files that changed from the base of the PR and between f471ce9 and c09dc9c.

📒 Files selected for processing (2)
  • Taskfile.yaml
  • docker/Taskfile.obsidian.yaml

Comment thread docker/Taskfile.obsidian.yaml
Comment thread docker/Taskfile.obsidian.yaml
@bubacoder
bubacoder merged commit 9c9c198 into main Jun 16, 2026
6 checks passed
@bubacoder
bubacoder deleted the obsidian-sync branch June 16, 2026 18:46
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