local-repository-provider
v10.0.0
Published
repository provider using local (native) git commands
Downloads
2,128
Readme
local-repository-provider
repository provider using local (native) git commands
API
Table of Contents
LocalBranch
Extends Branch
Properties
workspacestring
writeEntries
Writes ContentEntries into the branch
Parameters
entriesArray<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
messagestring commit messageentriesArray<ContentEntry> file entries to be commitedoptionsObject (optional, default{push:true})options.pushboolean exec push after commit
entries
Deliver all matchine entires for a given pattern.
Parameters
Returns AsyncGenerator<ContentEntry> matching branch path names
entry
Search for path in the branch.
Parameters
namestring
Returns Promise<ContentEntry> matching branch path names
maybeEntry
Search for path in the branch.
Parameters
namestring
Returns Promise<(ContentEntry | undefined)> matching branch path names
Promise
Type: Promise<void>
LocalProvider
Extends SingleGroupProvider
Provider using native git executable. Known environment variables.
- GIT_CLONE_OPTIONS
Properties
workspacestring
newWorkspacePath
Generate path for a new workspace. For the livetime of the provider always genrate new names
Parameters
namestring
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
workspacestringcurrentBranchBranch
setCurrentBranch
Set the current active branch (workspace)
Parameters
branchBranch
refId
Get sha of a ref Calls
git show-ref <ref>Parameters
refstring
Returns Promise<string> sha of the ref
initializeBranches
build lookup of all remote branches
git ls-remote --headsworkspace
workspace directory.
Returns string
install
With npm do:
npm install local-repository-providerlicense
BSD-2-Clause
