local-repository-provider
v9.0.1
Published
repository provider using local (native) git commands
Downloads
727
Readme
local-repository-provider
repository provider using local (native) git commands
API
Table of Contents
LocalBranch
Extends Branch
Properties
workspace
string
writeEntries
Writes ContentEntries into the branch
Parameters
entries
Array<ContentEntry>
Returns Promise<Array<ContentEntry>> written entries
commit
Executes:
- writes all updates into the workspace
- git add
- git commit
- git push --set-upstream origin
Parameters
message
string commit messageentries
Array<ContentEntry> file entries to be commitedoptions
Object (optional, default{push:true}
)options.push
boolean exec push after commit
entries
Deliver all matchine entires for a given pattern.
Parameters
Returns AsyncIterable<ContentEntry> matching branch path names
entry
Search for path in the branch.
Parameters
name
string
Returns ContentEntry matching branch path names
maybeEntry
Search for path in the branch.
Parameters
name
string
Returns ContentEntry matching branch path names
Promise
Type: Promise<void>
LocalProvider
Extends SingleGroupProvider
Provider using native git executable. Known environment variables.
- GIT_CLONE_OPTIONS
Properties
workspace
string
newWorkspacePath
Generate path for a new workspace. For the livetime of the provider always genrate new names
Parameters
name
string
Returns string path
branches
List branches for a given set of patterns. Only delivers branches for valid complete git urls.
Parameters
repositories
List repositories for a given set of patterns. Only delivers repositories for valid complete git urls.
Parameters
repository
Using provider workspace and number of repositories to create repository workspace.
Parameters
name
We are called local.
Returns string local
attributes
Default configuration options.
- workspace
- cloneOptions defaults to ["--depth", "8", "--no-single-branch"]
Returns Object
LocalRepository
Extends Repository
Properties
workspace
stringcurrentBranch
Branch
setCurrentBranch
Set the current active branch (workspace)
Parameters
branch
Branch
refId
Get sha of a ref Calls
git show-ref <ref>
Parameters
ref
string
Returns Promise<string> sha of the ref
initializeBranches
build lookup of all remote branches
git ls-remote --heads
workspace
workspace directory.
Returns string
install
With npm do:
npm install local-repository-provider
license
BSD-2-Clause