🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

github-repositories

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-repositories

Get all Github repos from a user or an organization

latest
Source
npmnpm
Version
4.0.0
Version published
Weekly downloads
188
79.05%
Maintainers
2
Weekly downloads
 
Created
Source

github-repositories Build Status

Get all GitHub repos from a user or an organization

Install

$ npm install github-repositories

Usage

const githubRepositories = require('github-repositories');

(async () => {
	console.log(await githubRepositories('kevva'));
	//=> [{id: 29258368, name: 'animal-sounds', full_name: 'kevva/animal-sounds', …}, …]
})();

API

githubRepositories(name, options?)

Returns a Promise<object[]> with the the repositories.

name

Type: string

Username or organization to fetch repos from.

options

Type: object

sort

Type: string
Default: full_name

Can be one of created, updated, pushed, full_name.

direction

Type: string
Default: asc when using full_name, otherwise desc

Can be one of asc or desc.

token

Type: string

Token to authenticate with. Use this to increase the request count. Github supports up to 60 unauthenticated request per hour. This is also required for accessing private repos.

If you don't have a token you can generate a new one here.

endpoint

Type: string
Default: https://api.github.com/

To support GitHub Enterprise.

Can be set globally with the GITHUB_ENDPOINT environment variable.

Keywords

api

FAQs

Package last updated on 30 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts