repocop

0.0.4 • Public • Published

RepoCop

RepoCop monitors your source code repositories and reports violations to committers.

Primary Directives

  1. Each repository should have a file called repocop.json in the root directory
  2. repocop.json should contain at least the following element
{
  "importance": "<critical|high|medium|low>"
}

Prerequisits

  1. node
  2. git

Installation

Thanks to all sorts of interactive shenanigans with ssh and bower you are best running this by hand

mkdir -p $INSTALL_DIR
git clone https://github.com/acuminous/RepoCop.git $INSTALL_DIR
cd $INSTALL_DIR
npm install
bower install
./node_modules/.bin/gulp build
NODE_ENV=production node server.js --server.host=$HOST --server.port=$PORT

Updating to the latest version

cd $INSTALL_DIR
git fetch
git reset --hard origin/master  
npm install
./node_modules/.bin/gulp build
kill -s SIGUSR2 $REPOCOP_PID

Production Configuration

RepoCop requires you to define organisations in conf/private.json, e.g.

{
    "survey": {
        "organisations": [
            {
                "name": "<organisation name>",
                "providerKey": "github",
                "authentication": {
                    "type": "basic",
                    "username": "<machine user>",
                    "password": "<application key>"
                }
            }          
        ]
    }
}

The application key can be generated in GitHub on the Applications settings page, under Personal Access Tokens. It should have access to the following roles

GitHub

  1. repo
  2. public_repo
  3. user:email
  4. repo:status
  5. read:org

Triggering a repo survey

$ curl -X POST localhost:8080/api/survey
Accepted

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    0
  • 0.0.3
    7
  • 0.0.2
    0
  • 0.0.1
    0
  • 0.0.0
    1

Package Sidebar

Install

npm i repocop

Weekly Downloads

8

Version

0.0.4

License

ISC

Last publish

Collaborators

  • cressie176