cerebro-cli
Advanced tools
Comparing version 0.1.0 to 0.2.0
{ | ||
"name": "cerebro-cli", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "", | ||
"main": "index.js", | ||
"main": "./src/index.js", | ||
"scripts": { | ||
"start": "node index.js", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"coverage": "nyc npm run test", | ||
"lint": "standard", | ||
"start": "node ./src/index.js", | ||
"test": "mocha" | ||
}, | ||
"standard": { | ||
"env": [ | ||
"mocha" | ||
] | ||
}, | ||
"keywords": [], | ||
@@ -14,4 +21,11 @@ "author": "", | ||
"dependencies": { | ||
"@octokit/rest": "^18.0.9" | ||
"@octokit/rest": "^18.5.6", | ||
"prom-client": "^13.1.0" | ||
}, | ||
"devDependencies": { | ||
"mocha": "^8.4.0", | ||
"nock": "^13.1.0", | ||
"nyc": "^15.1.0", | ||
"standard": "^16.0.3" | ||
} | ||
} |
@@ -1,7 +0,6 @@ | ||
# cerebro | ||
# Cerebro (cerebro-cli) | ||
> A novel recruiting tool using GitHub events. | ||
Finding capable developers is challenging. This tool starts with | ||
a simple heuristic - the ability to get a pull request (PR) | ||
merged given a sufficient amount of feedback, and filters from | ||
Finding capable developers is challenging. This tool starts with a simple heuristic - the ability | ||
to get a pull request (PR) merged given a sufficient amount of feedback, and filters from | ||
there. | ||
@@ -17,3 +16,2 @@ | ||
## Table of Contents | ||
@@ -23,3 +21,2 @@ | ||
- [Usage](#usage) | ||
- [Configuration](#configuration) | ||
- [Contributing](#contributing) | ||
@@ -32,8 +29,4 @@ - [Future Work](#future-work) | ||
You need, or may need: | ||
- [Node.js](https://nodejs.org). The [nvm](https://nvm.sh) tool | ||
works well for this. | ||
- Optional, but highly recommended: A [GH personal token] with | ||
default permissions | ||
- [Node.js](https://nodejs.org). The [nvm](https://nvm.sh) tool works well for this. | ||
- Optional, but highly recommended: A [GH personal token] with default permissions | ||
- Optional: [Docker] and [Docker Compose]. | ||
@@ -47,10 +40,18 @@ | ||
**Cerebro** can be run in a number of different ways, always | ||
configured by environment variables. | ||
Cerebro can be run in a number of different ways, always configured by environment variables. | ||
### Using npx | ||
### Configuration | ||
You can skip the whole installation process altogether and just | ||
run **cerebro** using `npx` | ||
The following environment variables are available: | ||
- `LANGUAGES`: **Required.** Comma separated list of the target languages you're looking for | ||
- `GH_TOKEN`: **Not required but highly recommended.** Your GitHub personal authentication token. | ||
- `COMMENT_THRESHOLD`: _optional, default 3_. Show PRs with review comments greater than or equal to this number | ||
- `SHOW_NON_HIREABLE`: _optional, default false_. Show applicants that are not explicitly marked as hireable. | ||
- `CHANGESET_THRESHOLD`: _optional, default 5432_. Only match PRs that have a total changeset (additions + subtractions) under this number. | ||
### Using `npx` | ||
You can skip the whole installation process altogether and just run Cerebro using `npx` | ||
```bash | ||
@@ -84,9 +85,22 @@ GH_TOKEN=[insert GH token here] \ | ||
## Configuration | ||
### Prometheus | ||
The following environment variables are available: | ||
By default, the app will expose Prometheus-compatible metrics on port 9100. | ||
These include all of the normal default nodejs metrics, as well as some custom | ||
metrics for Cerebro: | ||
- `GH_TOKEN`: Your GitHub personal authentication token. | ||
- `LANGUAGES`: Comma separated list of the target languages you're looking for | ||
```prometheus | ||
# HELP unique_events_processed Number of unique events processed by Cerebro | ||
# TYPE unique_events_processed counter | ||
unique_events_processed{app="cerebro"} 8811 | ||
# HELP suitable_pull_requests_found Number of suitable pull requests by Cerebro | ||
# TYPE suitable_pull_requests_found counter | ||
suitable_pull_requests_found{app="cerebro"} 6 | ||
# HELP candidates_found Count of candidates found by Cerebro so far | ||
# TYPE candidates_found counter | ||
candidates_found{app="cerebro"} 0 | ||
``` | ||
## Contributing | ||
@@ -104,3 +118,3 @@ | ||
Then run npm start with the aforementioned environment variables | ||
Then run `npm start` with the aforementioned environment variables | ||
to run, test, and develop! | ||
@@ -117,11 +131,11 @@ | ||
2. English proficiency | ||
1. really needs a manual overview until we find / create a good enough tool for this | ||
2. ideally would be any language | ||
3. Looking for a job false negatives | ||
1. hireable is either null (false) or true. However null is the default because GH jobs is | ||
1. Really needs a manual overview until we find / create a good enough tool for this | ||
2. Ideally would be any proficiency in language | ||
3. "Looking for a job" false negatives, and false positives too | ||
1. `hireable` is either null (false) or true. However null is the default because GH jobs is | ||
opt-in. So we only make a note of this for now. | ||
4. API rate limiting handling | ||
1. So far the script just runs every 2 seconds, which is "fine." It could be smarter | ||
5. IPFS + OrbitDB integration? | ||
6. Readline and raw stdin integration to make a proper UI (or just make an API + website) | ||
4. IPFS + OrbitDB integration? Or at least _some_ database | ||
5. Readline and raw stdin integration to make a proper UI (or just make an API + website) | ||
6. Environment variable validation | ||
1. Is it possible to get the full list of supported GH languages? | ||
@@ -128,0 +142,0 @@ ## Maintainers |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
7
170
2
142
2
45231
2
4
2
+ Addedprom-client@^13.1.0
+ Addedbintrees@1.0.2(transitive)
+ Addedprom-client@13.2.0(transitive)
+ Addedtdigest@0.1.2(transitive)
Updated@octokit/rest@^18.5.6