gh-star-fetch
v1.5.0
Published
Fetch all the starred repositories for a GitHub user
Downloads
27
Maintainers
Readme
gh-star-fetch
About The Project
Fetch all the starred repositories for a GitHub user
This packages helps in retrieving all the starred repositories for a given github user. This was usefull to me before moving to graphql gh api, I'm leaving this here just for easier usage.
Installation
npm i --save gh-star-fetch
# OR
yarn add gh-star-fetch
Usage
const results = await ghStarFetch({
accessToken: '<GITHUB_PERSONAL_ACCESS_TOKEN>',
});
Options
| name | type | default | description |
| ------------------- | ------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| accessToken
| String
| | This is you github PAT |
| username
| String
| | Default to the username of the accessToken, if changed scrapes another user's stars |
| compactByLanguage
| Bool
| false
| Instead of a single array, output will be compacted by languages |
| http
| http.Client
| Got
| This is the HTTP client used to fetch data |
| transform
| (star: Star) => Partial<Star>
| | You can transform each star object before its pushed to the output array with this callback |
Contributing
Project is pretty simple and straight forward for what is my needs, but if you have any idea you're welcome.
This projects uses commitlint with Angular configuration so be sure to use standard commit format or PR won't be accepted.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'feat(scope): some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Simone Corsi - @im_simonecorsi