Get periodic emails about the code diff for Gitlab and Github repositories
Install dep
and run dep ensure
to fetch to local vendor/ directory
List of dependencies used -
Authorization via Github/Gitlab - golang.org/x/oauth2
Authentication - github.com/markbates/goth
Request Router - github.com/gorilla/mux
Sessions - github.com/gorilla/sessions
Sending Emails - gopkg.in/gomail.v2
Cron - gopkg.in/sairam/cron.v2
Yaml Parser - gopkg.in/yaml.v2
Github API - github.com/google/go-github/github
Gitlab API - github.com/xanzy/go-gitlab
Convert between different Go Types - github.com/spf13/cast
TimeZone List - github.com/sairam/timezone
Finding Differences - github.com/aryann/difflib
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
Only the Configuration needs to be setup.
I started learning Go (~Sep 2016) and this is my first moderate sized 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/Gitlab
- 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
Get an update on demand from slack - http://www.hongkiat.com/blog/custom-slash-command-slack/