github-repository-provider
repository provider for github
Last updated 3 hours ago by arlac77 .
BSD-2-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install github-repository-provider 
SYNC missed versions from official npm registry.

npm License minified size downloads Build Status semantic-release styled with prettier Commitizen friendly Known Vulnerabilities codecov.io Coverage Status

github-repository-provider

repository provider for github

´´´javascript import { GithubProvider } from 'github-repository-provider';

const config = GithubProvider.optionsFromEnvironment(process.env); const provider = new GithubProvider(config); const repository = await provider.repository(myuser/repo1);

for async (const entry of repository.entries('*/.md')) { console.log(entry.name); } ´´´

API

Table of Contents

GithubProvider

Extends Provider

GitHub provider Lookup a repository

Parameters

  • options

Properties

Examples

import GithubProvider from 'github-repository-provider';

const ghp = new GithubProvider();
const r1 = ghp.repository('git@github.com:arlac77/github-repository-provider.git');
const r2 = ghp.repository('git://github.com/arlac77/github-repository-provider.git');
const r3 = ghp.repository('git+ssh://github.com/arlac77/github-repository-provider.git');
const r4 = ghp.repository('https://github.com/arlac77/github-repository-provider.git#master');
const r5 = ghp.repository('git+https://github.com/arlac77/github-repository-provider.git#master');
const r6 = ghp.repository('arlac77/github-repository-provider');
// different ways to address the same repository

initializeRepositories

repositoryBases

All possible base urls

Returns Array<string> common base urls of all repositories

rateLimit

Query the current rate limit

Returns Object rate limit (remaining)

environmentOptions

known environment variables

Returns Object

Returns string GITHUB_TOKEN api token

Returns string GH_TOKEN api token

GithubRepository

Extends GithubMixin(Repository)

Repository on GitHub

urls

Returns Array<string> github https url

issuesURL

Deliver the url of issue tracking system.

Returns string

homePageURL

Deliver the url of the repositories home page.

Returns string

refId

Parameters

Returns string sha of the ref

GithubBranch

Extends GithubMixin(Branch)

Branch on GitHub

writeEntry

writes content into the branch

Parameters

  • entry Entry

Returns Promise<Entry> written content with sha values set

createPullRequest

Parameters

  • destination
  • msg

commit

Parameters

  • message
  • entries
  • options (optional, default {})

entry

Parameters

  • name

maybeEntry

Parameters

  • name

removeEntires

https://developer.github.com/v3/repos/contents/

Parameters

  • entries Iterator<ContentEntry>

GithubMixin

common stuff for all github objects

GithubOwner

Extends GithubMixin(RepositoryGroup)

type

type of the repository group either User or Organization.

Returns string

GithubPullRequest

Extends GithubMixin(PullRequest)

Github pull request

_merge

Parameters

  • method (optional, default "MERGE")

validMergeMethods

All valid merge methods

Returns Set<string> valid merge methods

install

With npm do:

npm install mock-repository-provider

license

BSD-2-Clause

Current Tags

  • 7.9.26                                ...           latest (3 hours ago)

310 Versions

  • 7.9.26                                ...           3 hours ago
  • 7.9.25                                ...           16 hours ago
  • 7.9.24                                ...           20 hours ago
  • 7.9.23                                ...           a day ago
  • 7.9.22                                ...           a day ago
  • 7.9.21                                ...           2 days ago
  • 7.9.20                                ...           7 days ago
  • 7.9.19                                ...           9 days ago
  • 7.9.18                                ...           14 days ago
  • 7.9.17                                ...           15 days ago
  • 7.9.16                                ...           15 days ago
  • 7.9.15                                ...           16 days ago
  • 7.9.14                                ...           16 days ago
  • 7.9.13                                ...           19 days ago
  • 7.9.12                                ...           19 days ago
  • 7.9.11                                ...           20 days ago
  • 7.9.10                                ...           20 days ago
  • 7.9.9                                ...           25 days ago
  • 7.9.8                                ...           a month ago
  • 7.9.7                                ...           a month ago
  • 7.9.6                                ...           a month ago
  • 7.9.5                                ...           a month ago
  • 7.9.4                                ...           a month ago
  • 7.9.3                                ...           a month ago
  • 7.9.2                                ...           a month ago
  • 7.9.1                                ...           a month ago
  • 7.9.0                                ...           a month ago
  • 7.8.8                                ...           a month ago
  • 7.8.7                                ...           a month ago
  • 7.8.6                                ...           a month ago
  • 7.8.5                                ...           a month ago
  • 7.8.4                                ...           a month ago
  • 7.8.3                                ...           a month ago
  • 7.8.2                                ...           a month ago
  • 7.8.1                                ...           2 months ago
  • 7.8.0                                ...           2 months ago
  • 7.7.6                                ...           2 months ago
  • 7.7.5                                ...           2 months ago
  • 7.7.4                                ...           2 months ago
  • 7.7.3                                ...           2 months ago
  • 7.7.2                                ...           2 months ago
  • 7.7.1                                ...           2 months ago
  • 7.7.0                                ...           2 months ago
  • 7.6.7                                ...           3 months ago
  • 7.6.6                                ...           3 months ago
  • 7.6.5                                ...           3 months ago
  • 7.6.4                                ...           3 months ago
  • 7.6.3                                ...           3 months ago
  • 7.6.2                                ...           4 months ago
  • 7.6.1                                ...           4 months ago
  • 7.6.0                                ...           4 months ago
  • 7.5.18                                ...           4 months ago
  • 7.5.17                                ...           4 months ago
  • 7.5.16                                ...           4 months ago
  • 7.5.15                                ...           4 months ago
  • 7.5.14                                ...           4 months ago
  • 7.5.13                                ...           4 months ago
  • 7.5.12                                ...           4 months ago
  • 7.5.11                                ...           4 months ago
  • 7.5.10                                ...           4 months ago
  • 7.5.9                                ...           4 months ago
  • 7.5.8                                ...           4 months ago
  • 7.5.7                                ...           4 months ago
  • 7.5.6                                ...           4 months ago
  • 7.5.5                                ...           4 months ago
  • 7.5.4                                ...           4 months ago
  • 7.5.3                                ...           5 months ago
  • 7.5.2                                ...           5 months ago
  • 7.5.1                                ...           5 months ago
  • 7.5.0                                ...           5 months ago
  • 7.4.35                                ...           5 months ago
  • 7.4.34                                ...           5 months ago
  • 7.4.33                                ...           6 months ago
  • 7.4.32                                ...           6 months ago
  • 7.4.31                                ...           6 months ago
  • 7.4.30                                ...           6 months ago
  • 7.4.29                                ...           7 months ago
  • 7.4.28                                ...           7 months ago
  • 7.4.27                                ...           7 months ago
  • 7.4.26                                ...           7 months ago
  • 7.4.25                                ...           7 months ago
  • 7.4.24                                ...           7 months ago
  • 7.4.23                                ...           7 months ago
  • 7.4.22                                ...           7 months ago
  • 7.4.21                                ...           7 months ago
  • 7.4.20                                ...           7 months ago
  • 7.4.19                                ...           8 months ago
  • 7.4.18                                ...           8 months ago
  • 7.4.17                                ...           8 months ago
  • 7.4.16                                ...           8 months ago
  • 7.4.15                                ...           8 months ago
  • 7.4.14                                ...           8 months ago
  • 7.4.13                                ...           8 months ago
  • 7.4.12                                ...           8 months ago
  • 7.4.11                                ...           8 months ago
  • 7.4.10                                ...           9 months ago
  • 7.4.9                                ...           9 months ago
  • 7.4.8                                ...           9 months ago
  • 7.4.7                                ...           10 months ago
  • 7.4.6                                ...           10 months ago
  • 7.4.5                                ...           10 months ago
  • 7.4.4                                ...           10 months ago
  • 7.4.3                                ...           10 months ago
  • 7.4.2                                ...           10 months ago
  • 7.4.1                                ...           10 months ago
  • 7.4.0                                ...           10 months ago
  • 7.3.32                                ...           10 months ago
  • 7.3.31                                ...           10 months ago
  • 7.3.30                                ...           a year ago
  • 7.3.29                                ...           a year ago
  • 7.3.28                                ...           a year ago
  • 7.3.27                                ...           a year ago
  • 7.3.26                                ...           a year ago
  • 7.3.25                                ...           a year ago
  • 7.3.24                                ...           a year ago
  • 7.3.23                                ...           a year ago
  • 7.3.22                                ...           a year ago
  • 7.3.21                                ...           a year ago
  • 7.3.20                                ...           a year ago
  • 7.3.19                                ...           a year ago
  • 7.3.18                                ...           a year ago
  • 7.3.17                                ...           a year ago
  • 7.3.16                                ...           a year ago
  • 7.3.15                                ...           a year ago
  • 7.3.14                                ...           a year ago
  • 7.3.13                                ...           a year ago
  • 7.3.12                                ...           a year ago
  • 7.3.11                                ...           a year ago
  • 7.3.10                                ...           a year ago
  • 7.3.9                                ...           a year ago
  • 7.3.8                                ...           a year ago
  • 7.3.7                                ...           a year ago
  • 7.3.6                                ...           a year ago
  • 7.3.5                                ...           a year ago
  • 7.3.4                                ...           a year ago
  • 7.3.3                                ...           a year ago
  • 7.3.2                                ...           a year ago
  • 7.3.1                                ...           a year ago
  • 7.3.0                                ...           a year ago
  • 7.2.7                                ...           a year ago
  • 7.2.6                                ...           a year ago
  • 7.2.5                                ...           a year ago
  • 7.2.4                                ...           a year ago
  • 7.2.3                                ...           a year ago
  • 7.2.2                                ...           a year ago
  • 7.2.1                                ...           a year ago
  • 7.2.0                                ...           a year ago
  • 7.1.1                                ...           a year ago
  • 7.1.0                                ...           a year ago
  • 7.0.15                                ...           a year ago
  • 7.0.14                                ...           a year ago
  • 7.0.13                                ...           a year ago
  • 7.0.12                                ...           a year ago
  • 7.0.11                                ...           a year ago
  • 7.0.10                                ...           a year ago
  • 7.0.9                                ...           a year ago
  • 7.0.8                                ...           a year ago
  • 7.0.7                                ...           a year ago
  • 7.0.6                                ...           a year ago
  • 7.0.5                                ...           a year ago
  • 7.0.4                                ...           a year ago
  • 7.0.3                                ...           a year ago
  • 7.0.2                                ...           a year ago
  • 7.0.1                                ...           a year ago
  • 7.0.0                                ...           a year ago
  • 6.0.16                                ...           a year ago
  • 6.0.15                                ...           a year ago
  • 6.0.14                                ...           a year ago
  • 6.0.13                                ...           a year ago
  • 6.0.12                                ...           a year ago
  • 6.0.11                                ...           a year ago
  • 6.0.10                                ...           a year ago
  • 6.0.9                                ...           a year ago
  • 6.0.8                                ...           a year ago
  • 6.0.7                                ...           a year ago
  • 6.0.6                                ...           a year ago
  • 6.0.5                                ...           a year ago
  • 6.0.4                                ...           a year ago
  • 6.0.3                                ...           a year ago
  • 6.0.2                                ...           a year ago
  • 6.0.1                                ...           a year ago
  • 6.0.0                                ...           a year ago
  • 5.1.19                                ...           a year ago
  • 5.1.18                                ...           a year ago
  • 5.1.17                                ...           a year ago
  • 5.1.16                                ...           a year ago
  • 5.1.15                                ...           a year ago
  • 5.1.14                                ...           a year ago
  • 5.1.13                                ...           a year ago
  • 5.1.12                                ...           a year ago
  • 5.1.11                                ...           a year ago
  • 5.1.10                                ...           a year ago
  • 5.1.9                                ...           a year ago
  • 5.1.8                                ...           a year ago
  • 5.1.7                                ...           a year ago
  • 5.1.6                                ...           a year ago
  • 5.1.5                                ...           a year ago
  • 5.1.4                                ...           a year ago
  • 5.1.3                                ...           a year ago
  • 5.1.2                                ...           a year ago
  • 5.1.1                                ...           a year ago
  • 5.1.0                                ...           a year ago
  • 5.0.3                                ...           2 years ago
  • 5.0.2                                ...           2 years ago
  • 5.0.1                                ...           2 years ago
  • 5.0.0                                ...           2 years ago
  • 4.0.41                                ...           2 years ago
  • 4.0.40                                ...           2 years ago
  • 4.0.39                                ...           2 years ago
  • 4.0.38                                ...           2 years ago
  • 4.0.37                                ...           2 years ago
  • 4.0.36                                ...           2 years ago
  • 4.0.35                                ...           2 years ago
  • 4.0.34                                ...           2 years ago
  • 4.0.33                                ...           2 years ago
  • 4.0.32                                ...           2 years ago
  • 4.0.31                                ...           2 years ago
  • 4.0.30                                ...           2 years ago
  • 4.0.29                                ...           2 years ago
  • 4.0.28                                ...           2 years ago
  • 4.0.27                                ...           2 years ago
  • 4.0.26                                ...           2 years ago
  • 4.0.25                                ...           2 years ago
  • 4.0.24                                ...           2 years ago
  • 4.0.23                                ...           2 years ago
  • 4.0.22                                ...           2 years ago
  • 4.0.21                                ...           2 years ago
  • 4.0.20                                ...           2 years ago
  • 4.0.19                                ...           2 years ago
  • 4.0.18                                ...           2 years ago
  • 4.0.17                                ...           2 years ago
  • 4.0.16                                ...           2 years ago
  • 4.0.15                                ...           2 years ago
  • 4.0.14                                ...           2 years ago
  • 4.0.13                                ...           2 years ago
  • 4.0.12                                ...           2 years ago
  • 4.0.11                                ...           2 years ago
  • 4.0.10                                ...           2 years ago
  • 4.0.9                                ...           2 years ago
  • 4.0.8                                ...           2 years ago
  • 4.0.7                                ...           2 years ago
  • 4.0.6                                ...           2 years ago
  • 4.0.5                                ...           2 years ago
  • 4.0.4                                ...           2 years ago
  • 4.0.3                                ...           2 years ago
  • 4.0.2                                ...           2 years ago
  • 4.0.1                                ...           2 years ago
  • 4.0.0                                ...           2 years ago
  • 3.2.3                                ...           2 years ago
  • 3.2.2                                ...           2 years ago
  • 3.2.1                                ...           2 years ago
  • 3.2.0                                ...           2 years ago
  • 3.1.8                                ...           2 years ago
  • 3.1.7                                ...           2 years ago
  • 3.1.6                                ...           2 years ago
  • 3.1.5                                ...           2 years ago
  • 3.1.4                                ...           2 years ago
  • 3.1.3                                ...           2 years ago
  • 3.1.2                                ...           2 years ago
  • 3.1.1                                ...           2 years ago
  • 3.1.0                                ...           2 years ago
  • 3.0.4                                ...           2 years ago
  • 3.0.3                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 3.0.1                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.1.15                                ...           2 years ago
  • 2.1.14                                ...           2 years ago
  • 2.1.13                                ...           2 years ago
  • 2.1.12                                ...           2 years ago
  • 2.1.11                                ...           2 years ago
  • 2.1.10                                ...           2 years ago
  • 2.1.9                                ...           2 years ago
  • 2.1.8                                ...           2 years ago
  • 2.1.7                                ...           2 years ago
  • 2.1.6                                ...           2 years ago
  • 2.1.5                                ...           2 years ago
  • 2.1.4                                ...           2 years ago
  • 2.1.3                                ...           2 years ago
  • 2.1.2                                ...           2 years ago
  • 2.1.1                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.6.1                                ...           2 years ago
  • 1.6.0                                ...           2 years ago
  • 1.5.2                                ...           2 years ago
  • 1.5.1                                ...           2 years ago
  • 1.5.0                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.7                                ...           2 years ago
  • 1.3.6                                ...           2 years ago
  • 1.3.5                                ...           2 years ago
  • 1.3.4                                ...           2 years ago
  • 1.3.3                                ...           2 years ago
  • 1.3.2                                ...           2 years ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.3                                ...           3 years ago
  • 1.1.2                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 83
This Month 328
Last Day 59
Last Week 27
Last Month 576
Dev Dependencies (5)

Copyright 2014 - 2016 © taobao.org |