# repocop

> Gathers metadata from source code repositories

Latest version **0.0.4** (published 2014-04-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install repocop
pnpm add repocop
yarn add repocop
bun add repocop
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2014-04-24 |
| First published | 2014-03-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 23 |
| Known vulnerabilities | 0 (+10 in 4 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Stephen Cresswell |
| Maintainers | cressie176 |

## Links

- npm: https://www.npmjs.com/package/repocop
- Repository: https://github.com/acuminous/repocop
- Issues: https://github.com/acuminous/repocop/issues
- npm.io page: https://npm.io/package/repocop

## Dependencies (23)

- [gulp](https://npm.io/package/gulp.md) ^3.5.6
- [async](https://npm.io/package/async.md) ^0.2.10
- [bower](https://npm.io/package/bower.md) ^1.3.1
- [chalk](https://npm.io/package/chalk.md) ^0.4.0
- [nconf](https://npm.io/package/nconf.md) ^0.6.9
- [github](https://npm.io/package/github.md) ^0.1.14
- [lodash](https://npm.io/package/lodash.md) ^2.4.1
- [moment](https://npm.io/package/moment.md) ^2.5.1
- [express](https://npm.io/package/express.md) ^3.5.0
- [request](https://npm.io/package/request.md) ^2.34.0
- [winston](https://npm.io/package/winston.md) ^0.7.2
- [optimist](https://npm.io/package/optimist.md) ^0.6.1
- [gulp-less](https://npm.io/package/gulp-less.md) ~1.2.2
- [recluster](https://npm.io/package/recluster.md) ^0.3.6
- [gulp-concat](https://npm.io/package/gulp-concat.md) ~2.1.7
- [gulp-ignore](https://npm.io/package/gulp-ignore.md) ~1.0.0
- [gulp-rename](https://npm.io/package/gulp-rename.md) ~1.2.0
- [gulp-uglify](https://npm.io/package/gulp-uglify.md) ^0.2.1
- [gulp-plumber](https://npm.io/package/gulp-plumber.md) ~0.5.6
- [gulp-replace](https://npm.io/package/gulp-replace.md) ^0.2.0
- [bitbucket-api](https://npm.io/package/bitbucket-api.md) 0.0.6
- [gulp-cachebust](https://npm.io/package/gulp-cachebust.md) 0.0.2
- [express3-handlebars](https://npm.io/package/express3-handlebars.md) ^0.5.0

## Recent versions

- 0.0.4 (latest) — 2014-04-24
- 0.0.3 — 2014-04-24
- 0.0.2 — 2014-04-23
- 0.0.1 — 2014-03-27
- 0.0.0 — 2014-03-26

## README

# 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
1. repocop.json should contain at least the following element
```json
{
  "importance": "<critical|high|medium|low>"
}
```
## Prerequisits
1. node
1. git

## Installation
Thanks to all sorts of interactive shenanigans with ssh and bower you are best running this by hand
```bash
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
```bash
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.
```json
{
    "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](https://github.com/settings/applications), under Personal Access Tokens. It should have access to the following roles

### GitHub
 1. repo
 1. public_repo
 1. user:email
 1. repo:status
 1. read:org

## Triggering a repo survey
```
$ curl -X POST localhost:8080/api/survey
Accepted
```

---
_Source: https://npm.io/package/repocop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
