1.5.0 • Published 2 years ago

gh-star-fetch v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

nametypedefaultdescription
accessTokenStringThis is you github PAT
usernameStringDefault to the username of the accessToken, if changed scrapes another user's stars
compactByLanguageBoolfalseInstead of a single array, output will be compacted by languages
httphttp.ClientGotThis 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

1.5.0

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

1.0.0-next.2

2 years ago

1.0.0-next.1

2 years ago