Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

repository-provider

Package Overview
Dependencies
Maintainers
1
Versions
662
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

repository-provider

abstract interface to git repository providers like github bitbucket

  • 7.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
961
increased by9.95%
Maintainers
1
Weekly downloads
 
Created
Source

npm Greenkeeper semantic-release styled with prettier Build Status codecov.io Coverage Status Known Vulnerabilities GitHub Issues Stories in Ready Dependency Status devDependency Status docs XO code style downloads Commitizen friendly

repository-provider

abstract interface to git repository providers like github bitbucket

Example

import { GithubProvider } from 'repository-provider';

const provider = new GithubProvider({ token: 'xxx' });

const repository = await provider.repository('myuser/myrepo');
const branch = await repository.branch('master');
const files = await branch.list();

Derived Providers

list by repository-provider keyword

API

Table of Contents

Provider

Extends Owner

Base repository provider acts as a source of repositories

Parameters

Properties

repositoryGroup

Lookup a repository group

Parameters

Returns Promise<RepositoryGroup>

createRepositoryGroup

Create a new repository group

Parameters

Returns Promise<RepositoryGroup>

repository

Lookup a repository in the provider and all of its repository groups

Parameters

Returns Promise<Repository>

branch

Lookup a branch in the provider and all of its repository groups

Parameters

Returns Promise<Branch>

repositoryGroupClass

Returns Class repository group class used by the Provider

rateLimitReached

Is our rate limit reached. By default we have no rate limit

Returns boolean always false

name

Deliver the provider name

Returns string class name by default

provider

we are our own provider

Returns Provider this

defaultOptions

Default configuration options

Returns Object

optionsFromEnvironment

Extract options suitable for the constructor form the given set of environment variables

Parameters

Returns Object undefined if no suitable environment variables have been found

options

Pepare configuration by mixing together defaultOptions with actual options

Parameters

Returns Object combined options

install

With npm do:

npm install repository-provider

license

BSD-2-Clause

Keywords

FAQs

Package last updated on 20 Nov 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc