gh-star-fetch
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'feat(scope): some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Simone Corsi - @im_simonecorsi

Package Sidebar

Install

npm i gh-star-fetch

Weekly Downloads

9

Version

1.5.0

License

MIT

Unpacked Size

16.8 kB

Total Files

10

Last publish

Collaborators

  • simonecorsi