Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
repository-provider
Advanced tools
abstract interface to git repository providers like github bitbucket
abstract interface to git repository providers like github bitbucket
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();
list by repository-provider keyword
Base repository provider acts as a source of repositories
Parameters
options
ObjectProperties
Provider initialization will be called once before content addressing method is called
Returns Class repository class used by the Provider
Returns Class branch class used by the Provider
Returns Class content class used by the Provider
Returns Class pull request class used by the Provider
Create a new repository
Parameters
Returns Promise<Repository>
Delete a repository
Parameters
name
stringLookup a repository
Parameters
name
stringReturns Promise<Repository>
Lookup a branch First lookup repository then the branch If no branch was specified then the default branch will be delivered.
Parameters
name
string with optional branch name as '#myBranchName'Is our rate limit reached. By default we have no rate limit
Returns boolean always false
Deliver the repository type
Returns string 'git'
Default configuration options
Returns Object
Pepare configuration by mixing together defaultOptions with actual options
Parameters
config
Object raw configReturns Object combined options
Abstract branch
Parameters
repository
Repositoryname
string (optional, default 'master'
)Properties
repository
Repositoryprovider
Providername
stringcalled one after constructing
Returns Promise
Returns Provider
Branch owner By default we provide the repository owner
Returns string
Branch project By default we provide the repository project
Returns string
Repository and branch name combined
Returns string 'repo#branch'
Repository and branch name combined. But skipping the branch name if it is the default branch
Returns string 'repo#branch'
Deliver repository and branch url combined
Returns string 'repoUrl#branch'
Url of issue tracking system.
Returns string as provided from the repository
Url of home page.
Returns string as provided from the repository
Are we the default branch
Returns boolean name is 'master'
Delete the branch from the Repository.
Deliver file content
Parameters
path
stringReturns Promise<Content> content of a given file
Commit files
Parameters
Returns Promise
Create a pull request
Parameters
Returns Promise
File list
Value delivered from the provider
Returns boolean providers rateLimitReached
forward to the Provider
Parameters
value
booleanAbstract repository
Parameters
Properties
Called one after constructing
Lookup content form the default branch Branch#content
Parameters
args
...anyReturns Content
urls to access the repo
preffered url to access the repo
Returns string
the url of issue tracking system.
Returns string
the url of home page.
Returns string
Repository owner Default implementation delivers undefined
Returns string undefined
Repository project Default implementation delivers undefined
Returns string undefined
Name without project / owner
Returns string name
Lookup branch by name
Parameters
name
stringLookup the default branch
Returns Promise<Branch> 'master' branch
Returns Promise<Map> of all branches
Create a new Branch by cloning a given source branch
Parameters
Returns Promise<Branch> newly created branch
Delete a Branch
Parameters
name
stringAdd a branch
Parameters
branch
BranchDelete the repository from the Provider. Provider#deleteRepository
Deliver all PullRequests
Returns Promise<Map> of all pull requests
The @{link PullRequest} for a given name
Parameters
name
stringReturns Promise<PullRequest>
Add a pull request
Parameters
pullRequest
PullRequestReturns Promise
Delete a PullRequest
Parameters
name
stringReturns Promise
Returns string providers type
Value delivered from the provider
Returns boolean providers rateLimitReached
forward to the Provider
Parameters
value
booleanAbstract pull request Repository#addPullRequest
Parameters
Properties
name
stringrepository
Repositoryprovider
Providertitle
string?state
string?Returns Provider
Delete the pull request from the Repository.
Returns Promise
Respresentation of one 'file' entry
Parameters
path
content
(optional, default undefined
)type
(optional, default 'blob'
)mode
(optional, default '100644'
)Properties
content
(string | Buffer | Stream)path
string file name inside of the repositorytype
string tpye of the contentmode
string file permissionsWith npm do:
npm install repository-provider
BSD-2-Clause
FAQs
abstract interface to git repository providers like github, bitbucket and gitlab
The npm package repository-provider receives a total of 1,021 weekly downloads. As such, repository-provider popularity was classified as popular.
We found that repository-provider demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.