README
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
name
string
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
name
string
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
name
string
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
name
string
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
name
string
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,tagspatterns
(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
factories
(Array<Class> | Array<string>) (optional, default[]
)options
Object additional optionsenv
Object taken from process.env
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