Skip to main content
<!--
Generated by:
$ ./scripts/gen_markdown.sh
-->

Official documentation [here](http://lourot.com/gicowa).

# gicowa.py - GitHub Commit Watcher

GitHub's _Watch_ feature doesn't send notifications when commits are pushed.
This script aims to implement this feature and much more.

## Installation



$ sudo apt-get install sendmail
$ sudo pip install -r requirements.txt
$ git clone https://github.com/AurelienLourot/github-commit-watcher.git
$ cd github-commit-watcher/
$ python setup.py sdist
$ sudo pip install dist/gicowa-*.tar.gz


## Quick setup

Add the following line to your `/etc/crontab`:



0 * * * * root gicowa --persist --no-color --mailto myself@mydomain.com lastwatchedcommits MyGitHubUsername sincelast > /tmp/gicowa 2>&1


**That's it.** As long as your machine is running you'll get e-mails when something gets pushed on a repo you're watching.

> **NOTE:** the e-mails are likely to be considered as spam until you mark one
as non-spam in your e-mail client. Or use the `--mailfrom` option.

## Other/Advanced usage

`gicowa` is a generic command-line tool with which you can make much more that
just implementing the use case depicted in the introduction. This section
shows what it can.

### List repos watched by a user



$ gicowa watchlist AurelienLourot
watchlist AurelienLourot
AurelienLourot/uncommitted
AurelienLourot/crouton-emacs-conf
brillout/FasterWeb
AurelienLourot/github-commit-watcher


### List last commits on a repo



$ gicowa lastrepocommits AurelienLourot/github-commit-watcher since 2015 07 05 09 12 00
lastrepocommits AurelienLourot/github-commit-watcher since 2015-07-05 09:12:00
Last commit pushed on 2015-07-05 10:48:58
Committed on 2015-07-05 10:46:27 - Aurelien Lourot - Minor cleanup.
Committed on 2015-07-05 09:39:01 - Aurelien Lourot - watchlist command implemented.
Committed on 2015-07-05 09:12:00 - Aurelien Lourot - argparse added.


> **NOTE:** keep in mind that a commit's _committer timestamp_ isn't the time
at which it gets pushed.

### List last commits on repos watched by a user



$ gicowa lastwatchedcommits AurelienLourot since 2015 07 04 00 00 00
lastwatchedcommits AurelienLourot since 2015-07-04 00:00:00
AurelienLourot/crouton-emacs-conf - Last commit pushed on 2015-07-04 17:10:18
AurelienLourot/crouton-emacs-conf - Committed on 2015-07-04 17:08:48 - Aurelien Lourot - Support for Del key.
brillout/FasterWeb - Last commit pushed on 2015-07-04 16:40:54
brillout/FasterWeb - Committed on 2015-07-04 16:38:55 - brillout - add README
AurelienLourot/github-commit-watcher - Last commit pushed on 2015-07-05 10:48:58
AurelienLourot/github-commit-watcher - Committed on 2015-07-05 10:46:27 - Aurelien Lourot - Minor cleanup.
AurelienLourot/github-commit-watcher - Committed on 2015-07-05 09:39:01 - Aurelien Lourot - watchlist command implemented.
AurelienLourot/github-commit-watcher - Committed on 2015-07-05 09:12:00 - Aurelien Lourot - argparse added.
AurelienLourot/github-commit-watcher - Committed on 2015-07-05 09:07:14 - AurelienLourot - Initial commit


### List last commits since last run

Any listing command taking a `since <timestamp>` argument takes also a
`sincelast` one. It will then use the time where that same command has been
run for the last time on that machine with the option `--persist`. This option
makes `gicowa` remember the last execution time of each command in
`~/.gicowa`.



$ gicowa --persist lastwatchedcommits AurelienLourot sincelast
lastwatchedcommits AurelienLourot since 2015-07-05 20:17:46
$ gicowa --persist lastwatchedcommits AurelienLourot sincelast
lastwatchedcommits AurelienLourot since 2015-07-05 20:25:33


### Send output by e-mail

You can send the output of any command to yourself by e-mail:



$ gicowa --no-color --mailto myself@mydomain.com lastwatchedcommits AurelienLourot since 2015 07 04 00 00 00
lastwatchedcommits AurelienLourot since 2015-07-04 00:00:00
AurelienLourot/crouton-emacs-conf - Last commit pushed on 2015-07-04 17:10:18
AurelienLourot/crouton-emacs-conf - Committed on 2015-07-04 17:08:48 - Aurelien Lourot - Support for Del key.
brillout/FasterWeb - Last commit pushed on 2015-07-04 16:40:54
brillout/FasterWeb - Committed on 2015-07-04 16:38:55 - brillout - add README
AurelienLourot/github-commit-watcher - Last commit pushed on 2015-07-05 10:48:58
AurelienLourot/github-commit-watcher - Committed on 2015-07-05 10:46:27 - Aurelien Lourot - Minor cleanup.
AurelienLourot/github-commit-watcher - Committed on 2015-07-05 09:39:01 - Aurelien Lourot - watchlist command implemented.
AurelienLourot/github-commit-watcher - Committed on 2015-07-05 09:12:00 - Aurelien Lourot - argparse added.
AurelienLourot/github-commit-watcher - Committed on 2015-07-05 09:07:14 - AurelienLourot - Initial commit
Sent by e-mail to myself@mydomain.com


> **NOTES:**

>

> * You probably want to use `--no-color` because your e-mail client is
likely not to render the bash color escape sequences properly.

> * The e-mails are likely to be considered as spam until you mark one as
non-spam in your e-mail client. Or use the `--mailfrom` option.

## Initial Author

[Aurelien Lourot](http://lourot.com/)

Release files for gicowa 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gicowa 1.0.0
File Size Uploaded
gicowa-1.0.0.tar.gz 7.3 kB Details

Release files / gicowa-1.0.0.tar.gz

Download URL gicowa-1.0.0.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bc7edf4359d5459127f40cd137ff41eca180f3608f9c1007e4827850420508a5
BLAKE2b-256 checksum
How to use checksums
82d126b3b7eb067d4d4f68cabd1d3b45837816cffae0f9cce96e409cd77823cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.2.5

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.9

1 release file

1.0.8

1 release file

1.0.7

1 release file

1.0.6

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1.0.1

1 release file

This release

1.0.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page