Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wbnns/proof-of-developer
A simple Node.js package to check if a given GitHub username has any commit history. If there are commits, it returns the number of commits.
https://github.com/wbnns/proof-of-developer
business-intelligence github github-api javascript node node-package
Last synced: about 1 month ago
JSON representation
A simple Node.js package to check if a given GitHub username has any commit history. If there are commits, it returns the number of commits.
- Host: GitHub
- URL: https://github.com/wbnns/proof-of-developer
- Owner: wbnns
- License: mit
- Created: 2023-05-08T10:34:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-10T16:40:05.000Z (about 1 year ago)
- Last Synced: 2024-12-09T01:35:07.130Z (about 2 months ago)
- Topics: business-intelligence, github, github-api, javascript, node, node-package
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/proof-of-developer
- Size: 15.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Proof of Developer
A simple Node.js package to check if a given GitHub username has any commit history. If there are commits, it returns the number of commits.
## Installation
Clone the repository and install dependencies:
```bash
git clone https://github.com/your-username/proof-of-developer.git
cd proof-of-developer
npm install
```## Configuration
Create a `.env` file in the project root directory with your GitHub token:
```
GITHUB_TOKEN=your_github_token
Replace your_github_token with your actual token.
```## Usage
Import and use the `hasCommits` function:
```
const proofOfDeveloper = require('./proof-of-developer');(async () => {
const result = await proofOfDeveloper.hasCommits('github_username');
console.log(result);
})();
```Replace `github_username` with the GitHub username you want to check.
The function returns an object with the following properties:
+ `hasCommits`: A boolean indicating if the user has any commits.
+ `commitCount`: The number of commits if `hasCommits` is `true`, otherwise `0`.## License
[MIT License](LICENSE)