Github Spy
A Node.JS script that runs periodically (cron) and reviews activity of the unwilling participant and publishes the activity/findings to an analytics engine (keen.io).
Review the blog post about the Github Spy.
Table of Contents
Background
Sometimes (e.g. running a coding school) you need to track how developers are interacting with GitHub. This simple script/bot reports the last public activities for a user and using Keen.IO you can make decisions of the developer/group.
While at Code RGV, I created GitHub Spy to review our students. We needed to ensure that students are modeling good behavior of software developers. Trust but verify, if you will.
Examples
The following developers were randomly picked from the trending projects.
Install
This project stands on the shoulder of giants:
To get started:
git clone https://github.com/ibolmo/github-spycd github-spynpm install
users.js
file
Update this file to include all the users you'd like to track.
.env
file
The project includes a .env.example
file. This file needs to be copied, and updated with the correct values for each environment variable. A .env
is used to protect your secret from the public. Learn more in the motdotla/dotenv repository. It's also handy when deploying to OpenShift.
cp .env.example .envvim .env
Usage
npm run spy
Optional: Publish to OpenShift
Be sure to get a free account at RedHat's OpenShift. Review the OpenShift getting started.
# create sample app on openshift rhc app create GitHubSpy nodejs-0.10cd GitHubSpygit remote show origin # write down the url # go back to this cloned repo cd ../github-spy # update the openshift environment variables # recommendation: create a .env.prod with new keen.io key rhc set-env .env.prod -a GitHubSpy git remote add openshift ssh://...your.url..git push -f openshift