Skip to content

Automatic dead man switch style git commits, never forget to commit again

License

Notifications You must be signed in to change notification settings

chmac/dead-man-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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:

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.

About

Automatic dead man switch style git commits, never forget to commit again

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published