IBM/github-traffic-stats-collector

Name: github-traffic-stats-collector

Owner: International Business Machines

Description: WORK IN PROGRESS

Created: 2017-07-27 19:08:55.0

Updated: 2017-08-08 21:45:32.0

Pushed: 2017-08-07 14:58:07.0

Homepage: null

Size: 262

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Build Status

github-traffic-stats-collector

WORK IN PROGRESS

Architecture
Diagram
                      +---------------+
                      | +-----------+ |
                      | | Database  | | --------+
                      | +-----------+ | <-----+ |
                      |               |   GH  | | DB Processing
        Cron Trigger  |               | Stats | |    Trigger
-----+ <------------- | +-----------+ | ------+ |
tHub |                | | OpenWhisk | | <-------+
-----+ -------------> | +-----------+ | ------+
       Traffic Stats  |               |       |
                      |               |       | Update Dashboard
                      | +-----------+ |       |
                      | | Dashboard | | <-----+
                      | +-----------+ |
                      +---------------+
Chronology
  1. OpenWhisk cron trigger sends request for traffic statistics to GitHub
  2. GitHub Returns traffic statistics
  3. OpenWhisk sends GitHub Statistics to database
  4. If database receives new statistics:
    1. Trigger OpenWhisk to process data
    2. Send newly processed data to dashboard
  5. Dashboard displays reports
Example

To use the sample python script, you will need to create a personal access token with public_repo access: personal_access_token_settings

Then, run example/gh_traffic.py, entering your personal access token and repo path when asked:

which python) example/gh_traffic.py
ub personal access token: ****************************************
ub repo (username_or_orgname/reponame): IBM/github-traffic-stats-collector

ta Snippeted for concisity

NOTE:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.