aggregation-repository-provider

aggregates several repository providers into one

Usage no npm install needed!

<script type="module">
  import aggregationRepositoryProvider from 'https://cdn.skypack.dev/aggregation-repository-provider';
</script>

README

npm License minified size downloads GitHub Issues Build Status Styled with prettier Commitizen friendly Known Vulnerabilities Coverage Status

aggregation-repository-provider

aggregates several repository providers into one

API

Table of Contents

AggregationProvider

Extends MultiGroupProvider

Combines several repository providers into one.

Parameters

  • providers Array<Provider>
  • options

Properties

  • providers Array<Provider>

Examples

const provider = new AggregationProvider([
    new GithubProvider(),
  new BitbucketProvider()
]);
 const repository1 = await provider.repository(
   'https://github.com/arlac77/aggregation-repository-provider'
 );
const repository2 = await provider.repository(
 'https://arlac77@bitbucket.org/arlac77/sync-test-repository.git'
);
// repository1 -> github
// repository2 -> bitbucket

pullRequest

Retrieve named pull request in one of the given providers. They are consulted in the order of the propviders given to the constructor.

Parameters

Returns Primise<PullRequest>

repository

Retrieve named repository in one of the given providers. They are consulted in the order of the propviders given to the constructor.

Parameters

Returns Primise<Repository>

branch

Retrieve named branch in one of the given providers. They are consulted in the order of the propviders given to the constructor.

Parameters

Returns Primise<Branch>

tag

Retrieve named tag in one of the given providers. They are consulted in the order of the propviders given to the constructor.

Parameters

Returns Primise<Branch>

repositoryGroup

Retrieve named repository group in one of the given providers. They are consulted in the order of the propviders given to the constructor.

Parameters

Returns Primise<RepositoryGroup>

repositoryGroups

List repositories groups of the providers.

Parameters

Returns Iterator<Repository> all matching repository groups of the providers

list

List repositories or branches of the providers.

Parameters

  • type string name of the method to deliver typed iterator projects,repositories,branches,tags
  • patterns (Array<string> | string)

Returns Iterator<Repository> all matching repositories of the providers

initialize

Creates a new provider for a given list of provider factories. Factories can be import urls with additional instance identifier.

IDENTIFIER(my-repository-provider)

Parameters

Returns AggregationProvider newly created provider

instanceIdentifier

Returns string default instance environment name prefix

install

With npm do:

npm install aggregation-repository-provider

license

BSD-2-Clause