Options
Menu

Interface GitRepository

Provides an interface to interacting with some kind of Git like file and source control system which is versioned

class

GitRepository

Index

Methods

branches

  • branches(fn: any): any
  • Get the list of branches

    method

    branches

    Parameters

    • fn: any

    Returns any

commitInfo

  • commitInfo(commitId: string, fn: any): any
  • Returns details of a commit for the given commit ID

    method

    commitInfo

    Parameters

    • commitId: string
    • fn: any

    Returns any

commitTree

  • commitTree(commitId: string, fn: any): any
  • Returns a list of commit tree info objects for the given commit ID

    method

    commitTree

    Parameters

    • commitId: string
    • fn: any

    Returns any

completePath

  • completePath(branch: string, completionText: string, directoriesOnly: boolean, fn: any): any
  • Completes the available path or file names given the branch and completion text

    method

    completePath

    Parameters

    • branch: string
    • completionText: string
    • directoriesOnly: boolean
    • fn: any

    Returns any

createDirectory

  • createDirectory(branch: string, path: string, commitMessage: string, fn: any): any
  • Creates a new directory of the given name

    method

    createDirectory

    Parameters

    • branch: string
    • path: string
    • commitMessage: string
    • fn: any

    Returns any

diff

  • diff(objectId: string, baseObjectId: string, path: string, fn: any): any
  • Returns the diff of this commit verses the previous or another commit

    method

    diff

    Parameters

    • objectId: string
    • baseObjectId: string
    • path: string
    • fn: any

    Returns any

exists

  • exists(branch: string, path: string, fn: any): Boolean
  • Returns the file metadata if the file or directory exists or null if it does not exist

    method

    exists

    Parameters

    • branch: string
    • path: string
    • fn: any

    Returns Boolean

    is used if no function is provided to trigger a synchronous call, returns true if file exists, false otherwise

getContent

  • getContent(objectId: string, blobPath: string, fn: any): any
  • Get the contents of a blobPath for a given commit objectId

    method

    getContent

    Parameters

    • objectId: string
    • blobPath: string
    • fn: any

    Returns any

getRepositoryLabel

  • getRepositoryLabel(fn: any, error: any): any
  • Returns repository label

    method

    getRepositoryLabel

    Parameters

    • fn: any
    • error: any

    Returns any

getUserEmail

  • getUserEmail(): string

getUserName

  • getUserName(): string

history

  • history(branch: string, objectId: string, path: string, limit: number, fn: any): any
  • returns the commit history of a directory or file

    method

    history

    Parameters

    • branch: string
    • objectId: string
    • path: string
    • limit: number
    • fn: any

    Returns any

read

  • read(branch: string, path: string, fn: any): any
  • Read the contents of a file or directory with text or children being returned and a directory flag

    method

    read

    Parameters

    • branch: string
    • path: string
    • fn: any

    Returns any

readJsonChildContent

  • readJsonChildContent(path: string, nameWildcard: string, search: string, fn: any): any
  • Get the JSON contents of children in a directory matching a name wildcard and content search

    method

    readJsonChildContent

    Parameters

    • path: string
    • nameWildcard: string
    • search: string
    • fn: any

    Returns any

remove

  • remove(branch: string, path: string, commitMessage: string, fn: any): any
  • Removes a file if it exists

    method

    remove

    Parameters

    • branch: string
    • path: string
    • commitMessage: string
    • fn: any

    Returns any

rename

  • rename(branch: string, oldPath: string, newPath: string, commitMessage: string, fn: any): any
  • Renames a file or moves a file to a new location

    method

    rename

    Parameters

    • branch: string
    • oldPath: string
    • newPath: string
    • commitMessage: string
    • fn: any

    Returns any

revertTo

  • revertTo(branch: string, objectId: string, blobPath: string, commitMessage: string, fn: any): any
  • Reverts to a specific version of the file

    method

    revertTo

    Parameters

    • branch: string
    • objectId: string
    • blobPath: string
    • commitMessage: string
    • fn: any

    Returns any

write

  • write(branch: string, path: string, commitMessage: string, contents: string, fn: any): any
  • Write the content of a file

    method

    write

    Parameters

    • branch: string
    • path: string
    • commitMessage: string
    • contents: string
    • fn: any

    Returns any

writeBase64

  • writeBase64(branch: string, path: string, commitMessage: string, contents: string, fn: any): any
  • Write the content of a file

    method

    write

    Parameters

    • branch: string
    • path: string
    • commitMessage: string
    • contents: string
    • fn: any

    Returns any

Generated using TypeDoc