Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@bevry/github-repos

bevry308Artistic-2.07.0.0TypeScript support: included

Fetch the GitHub API response for a specified repository, or for all those that match a particular GitHub user/organization or a search query

all, all github repos, all github repositories, all-repos, allpublic, api, browser, cli, es2022, fetch, get, get-repos, get-repositories, gh, gh-repos, ghapi, git, git-getter, github, github repos, github repositories, github-client, github-org-repos, github-owner-repos, github-repositories, github-user-repos, list, maintainers, meta, module, node, org, org-github-repositories, org-repos, org-repositories, organisation, organisation-github-repositories, organisation-repositories, organisations, organization, organization-github-repositories, organization-repositories, organizations, orgs, owner, owner-github-repositories, owner-repositories, owners, paginate, paginated, private, promise, promises, public, repo, repos, repositories, repository, request, retrieve, search, stars, typed, types, typescript, user, user-github-repositories, user-repos, user-repositories, users, util, utility

readme

GitHub Repositories

Status of the GitHub Workflow: bevry NPM version NPM downloads
GitHub Sponsors donate button ThanksDev donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Fetch the GitHub API response for a specified repository, or for all those that match a particular GitHub user/organization or a search query

Usage

Complete API Documentation.

import {
    getRepo,
    getRepos,
    getReposFromSearch,
    getReposFromUsers,
} from '@bevry/github-repos'

// https://developer.github.com/v3/repos/#get
getRepo('bevry/github-repos').then(console.log).catch(console.error)
getRepos(['bevry/github-repos']).then(console.log).catch(console.error)

// https://developer.github.com/v3/search/#search-repositories
getReposFromSearch('@bevry language:typescript', { pages: 0 })
    .then(console.log)
    .catch(console.error)
getReposFromUsers(['bevry'], { pages: 0 })
    .then(console.log)
    .catch(console.error)

Install

npm

  • Install: npm install --save @bevry/github-repos
  • Import: import * as pkg from ('@bevry/github-repos')
  • Require: const pkg = require('@bevry/github-repos')

Skypack

<script type="module">
    import * as pkg from '//cdn.skypack.dev/@bevry/github-repos@^7.0.0'
</script>

unpkg

<script type="module">
    import * as pkg from '//unpkg.com/@bevry/github-repos@^7.0.0'
</script>

jspm

<script type="module">
    import * as pkg from '//dev.jspm.io/@bevry/github-repos@7.0.0'
</script>

Editions

This package is published with the following editions:

  • @bevry/github-repos/source/index.ts is TypeScript source code with Import for modules
  • @bevry/github-repos/edition-browsers/index.js is TypeScript compiled against ES2022 for web browsers with Import for modules
  • @bevry/github-repos aliases @bevry/github-repos/edition-es2022/index.js
  • @bevry/github-repos/edition-es2022/index.js is TypeScript compiled against ES2022 for Node.js 18 || 20 || 21 with Require for modules
  • @bevry/github-repos/edition-es2022-esm/index.js is TypeScript compiled against ES2022 for Node.js 18 || 20 || 21 with Import for modules

History

Discover the release history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

GitHub Sponsors donate button ThanksDev donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

License

Unless stated otherwise all works are:

and licensed under:

changelog

History

v7.0.0 2023 November 1

  • Updated dependencies, base files, and editions using boundation
  • Updated license from MIT to Artistic-2.0
  • Minimum required node version changed from node: >=10 to node: >=18 to keep up with mandatory ecosystem changes

v6.1.0 2021 August 5

  • Formalize concurrency within MultiOpts

v6.0.0 2021 August 5

v5.17.0 2020 October 29

v5.16.0 2020 September 4

v5.15.0 2020 August 18

v5.14.0 2020 August 4

v5.13.0 2020 July 22

v5.12.0 2020 July 22

v5.11.0 2020 June 25

v5.10.0 2020 June 21

v5.9.0 2020 June 21

v5.8.0 2020 June 20

v5.7.0 2020 June 10

v5.6.0 2020 June 10

v5.5.0 2020 May 22

v5.4.0 2020 May 21

v5.3.0 2020 May 21

v5.2.1 2020 May 11

  • Fixed 429 delay, had 60 milliseconds instead of 60 seconds

v5.2.0 2020 May 11

  • If status code 429 is returned, will try again in a minute
  • Added optional concurrency argument to getRepos
  • Updated dependencies, base files, and editions using boundation

v5.1.0 2020 May 6

v5.0.1 2020 April 27

v5.0.0 2020 March 27

v4.0.3 2020 March 27

v4.0.2 2019 December 16

  • Fix missing dependency

v4.0.1 2019 December 16

  • Updated README example for v4.0.0 API change

v4.0.0 2019 December 16

  • Renamed API from fetch* to get*

v3.0.1 2019 December 16

  • Fix type exports

v3.0.0 2019 December 16

  • Rewrote in TypeScript
  • API now uses Promises instead of Errbacks

v2.0.1 2019 December 9

  • Fix GITHUB_API fallback

v2.0.0 2019 December 9

  • Implemented support for GITHUB_API environment variable to access the GitHub API via a proxy
  • Updated dependencies, base files, and editions using boundation
  • Minimum required node version changed from node: >=0.8 to node: >=8 to keep up with mandatory ecosystem changes

v1.5.0 2019 November 13

v1.4.0 2019 November 8

v1.3.0 2018 November 28

  • No longer accepts the github auth credentials in configuration, use environment variables instead
  • Fixed error cases of requestRepo returning an array as the result instead of nothing
  • Better documentation

v1.2.0 2018 November 28

v1.1.2 2017 February 28

  • Updated dependencies

v1.1.1 2017 February 28

  • Internal: explicit use of GitHub API version

v1.1.0 2017 February 27

  • Converted from CoffeeScript to JavaScript
  • Fixed rate limit errors not being caught
  • Added technical API documentation
  • Updated dependencies

v1.0.7 2014 December 11

  • Repackaged

v1.0.6 2014 December 11

  • Updated dependencies

v1.0.5 2013 November 27

  • Updated GitHub Search API header from preview to beta
  • Updated dependencies

v1.0.4 2013 October 4

  • Fetch repositories individually instead of by search by default
  • Updated dependencies

v1.0.3 2013 October 3

  • Updated dependencies

v1.0.2 2013 October 2

  • Fixed v1.0.1

v1.0.1 2013 October 2

  • Fixed paging limits

v1.0.0 2013 October 2

  • Initial working release