https://github.com/just1not2/github-pr-counter
A small counter of participants on Github pull requests in NodeJS
https://github.com/just1not2/github-pr-counter
github participants pull-request
Last synced: about 2 months ago
JSON representation
A small counter of participants on Github pull requests in NodeJS
- Host: GitHub
- URL: https://github.com/just1not2/github-pr-counter
- Owner: just1not2
- License: mit
- Created: 2022-11-28T16:05:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-30T19:23:40.000Z (over 3 years ago)
- Last Synced: 2025-04-25T21:02:30.711Z (about 1 year ago)
- Topics: github, participants, pull-request
- Language: JavaScript
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GITHUB PR COUNTER
A NodeJS script that fetches the number of participants in a Github pull request.
**Warning: as this script uses web scraping on an undocumented page to get the required information, it may break on any Github frontend updates.**
## Installion of dependencies
To install dev and production dependencies, just launch the following command:
```bash
npm install
```
## Configuration
To configure the Github PR Counter, copy the env file template with:
```bash
npm run template
```
Then, the following configuration environment variables should be filled:
* `GITHUB_USER`: owner of the repository of the PR
* `GITHUB_REPOSITORY`: name of the repository of the PR
* `GITHUB_PR_NUMBER`: number of the PR in the repository
## Launching the script
To start the Github PR Counter, just launch the following command:
```bash
npm run start
```
## Tests
Two testing suites have been configured to test the script with Mocha. Try it out with:
```bash
npm run test
```
## See Also
* [Github API documentation about pull requests](https://docs.github.com/en/rest/pulls/pulls#get-a-pull-request)
* [Mocha documentation](https://mochajs.org)
## Licensing
MIT License.
See [LICENSE](./LICENSE) to see the full text.
## Author Information
This script was created in 2022 by Justin Béra.