go get -u golang.org/x/oauth2
go get -u gopkg.in/gomail.v2
go get -u gopkg.in/robfig/cron.v2 # requires modification to file aka bugfix
go get -u gopkg.in/yaml.v2
go get -u github.com/google/go-github/github
go get -u github.com/gorilla/mux
go get -u github.com/gorilla/sessions
go get -u github.com/markbates/goth
go get -u github.com/sairam/timezone # forked and added a method
go get -u github.com/spf13/cast
gopkg.in/robfig/cron.v2
- Edit line 102
- Replace
t = t.Truncate(time.Hour)
witht = time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), 0, 0, 0, s.Location)
env GOOS=linux GOARCH=amd64 go build
cp .env.sample .env.prod
edit config.yml
ls tmpl/
mkdir sessions
- Fill in the
.env.prod
file and modify config.yml - Load the env variables from
.env.prod
- Use the binary
gitnotify
andtmpl/
directory - Start with
./gitnotify
in a screen. All logs are currently written to stdout
- take a copy of the
config.yml
->dataDir
ordata/
directory - take a copy of the
sessions/
directory - The
.env.prod
file containing the environment variables - The
config.yml
file containing the settings
- Host on separate instance (install Caddy w/ https and configure server)
- Log when adding a repository from the UI fails
- Use select2 instead of input box since typeahead.js does not allow multiple inputs
- Cache response of typeahead/branch list from Github to serve in Frontend
- Clean up fetched_info from
settings.yml
file when a repository is removed - Fix manual editing of cron.v2 since it does not work on +0530 like TZs
- Integration and Unit tests need to be added
- Fix
TODO
present in the code
- JSON output to be used for sending information as webhooks to Zapier like services
- Allow autofill of branch names based on repo names
- Suggest names of popular repositories to ease adding first few repositories
- Add support for Gitlab
- An LRU Based Cache backed by disk in case memory exceeds limit. To Explore: hashicorp/golang-lru, boltdb/bolt, wunderlist/ttlcache, redis
Only the Configuration needs to be setup properly.
I started learning Go (~Sep 2016) and this is my first project trying to "solve" a problem
- Users login via Github
- Users keep "an eye" on a project
- Notifies users on
- creation of new branches/tags.
- Track a branch for latest commits and links
- Send email with summary
- Landing Page at /home
- User logins via Github to authenticate/track
- User adds url of repository to track creation of branches/tags and/or branches for latest commits
- User receives a confirmation email with the current list of branches
- Users receives an email once a day about the information that has changed
- A non logged in user sees the static page present at /home at /
- User logs in via Github
- Settings page has a set of repositories s/he is tracking
- Suggestions based on code language can be pulled for user to track
- Once user adds the config, we save it to the settings
- After validating the config, an email is sent to the user with the action made
- A cron job or daemon uses the user's token to pull the required information
- Diffs with the previous information that is present
- Sends an email to the user with changes based on settings
- Copy
.env.example
to.env
- Fill in data into
.env
- environment variables required to be loaded for the server to run