https://github.com/chmac/dead-man-commit
Automatic dead man switch style git commits, never forget to commit again
https://github.com/chmac/dead-man-commit
Last synced: 10 months ago
JSON representation
Automatic dead man switch style git commits, never forget to commit again
- Host: GitHub
- URL: https://github.com/chmac/dead-man-commit
- Owner: chmac
- License: agpl-3.0
- Created: 2022-03-13T12:41:56.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-08T21:12:19.000Z (almost 2 years ago)
- Last Synced: 2025-02-14T04:39:52.773Z (over 1 year ago)
- Language: TypeScript
- Size: 58.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dead-man-commit
A dead man's switch for git commits. Automatically commits (and pushes) the
selected repositories after 30 minutes of inactivity.
Built with [deno](https://deno.land).
To get started:
- Ensure you have deno installed
- Clone the repo
- Run `scripts/build.sh`
You should now have 3 binaries in `build/`.
## Config
When you run the binary it will complain about a missing config directory and
file, create those. Example config is as follows:
```yaml
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 be `1`
- `log` - Optional
- `file` - Optional, path to log file (must be writable), file will be created
if it does not exist. If there is no `file` specified, logs are output to the
console.
- `level` - Optional, valid values are `DEBUG`, `INFO` or `ERROR`, 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 repository
- `delay` - Optional, the number of seconds to wait after the last activity
is detected before making a commit
## Cron
To make this useful you probably need to run it from cron or similar somewhat
regularly.