A dead man's switch for git commits. Automatically commits (and pushes) the selected repositories after 30 minutes of inactivity.
Built with deno.
To get started:
- Ensure you have deno installed
- Clone the repo
- Run
scripts/build.sh
You should now have 3 binaries in build/
.
When you run the binary it will complain about a missing config directory and file, create those. Example config is as follows:
version: 1
log:
file: /var/log/dead-man-commit.log
level: DEBUG
repos:
- path: /Users/foo/path/to/repo
delay: 3600
- path: /Users/foo/path/to/another/repo
Config values
version
- Required, must be1
log
- Optionalfile
- Optional, path to log file (must be writable), file will be created if it does not exist. If there is nofile
specified, logs are output to the console.level
- Optional, valid values areDEBUG
,INFO
orERROR
, and is optional.
repos
- Required, an array of repositories to monitor, valid formats are:- String, the absolute path to the repository
- Object containing the keys:
path
- Required, the absolute path to the repositorydelay
- Optional, the number of seconds to wait after the last activity is detected before making a commit
To make this useful you probably need to run it from cron or similar somewhat regularly.