The ./hs Docker wrapper runs docker inside the Gitea runner container.
Since project paths inside the runner container don't exist on the Docker
host, the volume mount creates an empty /work directory, and Stack finds
no packages (error S-8506).
Fix: install Stack directly via get.haskellstack.org, use STACK_ROOT for
caching, and build with stack directly (no Docker-in-Docker).
Also add symlink for gitea-actions.sh convenience script.
Useful for wake-from-sleep hooks: run 'converge --sync' to commit
any pending changes, pull from remotes, and push, then exit.
Shows 'Syncing N repo(s)' instead of 'Watching N repo(s)'.
- Add rcNotifyOnPull field to RepoConfig (default: False)
- notify_on_pull YAML config key per repository
- When enabled, sends a desktop notification whenever new commits
are pulled from the remote (with commit count and summaries)
- Uses HEAD comparison to detect actual new commits, not just
successful pull execution
- Updated example config and spec
- New LogLevel type: Debug, Info, Warn, Error with Ord instance
- Logger holds configured level and output handle (stderr or file)
- --log-level and --log-file CLI flags
- log_level and log_file YAML config fields
- Log messages assigned appropriate severity levels
- Test logger updated to new Logger structure
- All 17 tests passing
- gitCommitAll: abort commit when staging (git add -A) fails, e.g.
due to a stale .git/index.lock. Previously the failure was ignored
and commit proceeded on an empty or partial index.
- gitPull: remove explicit branch argument from git pull --rebase.
Passing both remote and branch can conflict with the branch's
configured tracking ref, causing 'Cannot rebase onto multiple
branches'. Now uses just --rebase <remote>, letting git resolve
the tracking branch from config.
- Test: index.lock scenario verifies commit is aborted on staging
failure.
- Add loggedGit helper that logs 'RUN: git -C <path> <args>' before
execution and 'EXIT <code>' after (with stderr on failure)
- Refactor gitCommitAll, gitPull, and gitPush to use loggedGit
- Add Logger parameter to gitPull and gitPush
- Update test call sites and syncRepo to pass Logger
- watchRepo: call syncRepo at startup to commit any pre-existing
uncommitted changes before entering the file watcher
- Add gitPush function for git push <remote> <branch>
- Add push step to syncRepo after successful pull (with failure
notification via notifyUser)
- Export syncRepo and gitPush for testing
- Test: startup sync commits and pushes uncommitted changes
Generalize notifyConflict into notifyUser that accepts an arbitrary
title and body. Call notify-send for commit failures and pull
failures in addition to the existing merge-conflict notification.
"Nothing to commit" is intentionally excluded — it is an expected
no-op, not a failure.
git pull --no-edit fails with exit 128 on divergent branches because
fast-forward is impossible. Using --rebase handles divergent histories
by rebasing local commits on top of fetched remote commits, producing
a linear history without merge commits.
- src/Converge.hs: Change gitPull from --no-edit to --rebase
- test/GitPullSpec.hs: Update rebase test to expect success and
verify linear history (3 commits, no merge parents)
- test/*.hs: Clean up unused imports
- Add timestamped logging for events, commits, pulls, and conflicts
- Use MVar-based event coalescing so rapid changes trigger only one
sync per debounce window (fixes missed changes from overlapping syncs)
- Handle 'nothing to commit' gracefully instead of treating it as error
- Log changed file list (git status --porcelain) during sync
- Log commit hash on success, pull output on success
- Remove unused imports
- Look for config at $XDG_CONFIG_HOME/converge/config.yaml by default
- --config still overrides to an explicit path
- Falls back to single-repo --repo mode if no config file found
- New defaultConfigPath and configFileExists helpers in Converge module
- Remove nonexistent confDebounce field from WatchConfig (fsnotify 0.4.4.0)
- Remove unused Generic deriving and GHC.Generics import
- Replace .!= with fromMaybe (not re-exported by Data.Yaml)
- Add missing Data.Text import in Main.hs
- Use git -C flag in runGitIn to run in the correct repo directory
- Clean up unused imports
- Add RepoConfig type for per-repo path/remote/branch
- Options now holds [RepoConfig] instead of single repo
- YAML config file support (--config) for multi-repo setup
- --repo still works for quick single-repo usage
- Concurrent watchers via async (one thread per repo)
- --debounce flag overrides config file value