Home Reference Source Test Repository

Function

Static Public Summary
public

cloneRepo(repoPath: string, cloneDir: string): Promise

Clone Repository

public

Get environment variables

public

getDiff(repo: Object, opts: String[]): Promise

Get Diff Strings

public

getDiffPages(repo: Object, pages: Object[]): Promise

Get Diff Strings for Pages

public

getRepo(repoPath: string, cloneDir: string): Promise

Get Repository

public

Get Repository name from remote path

public

Get remote repository path from payload object

Static Public

public cloneRepo(repoPath: string, cloneDir: string): Promise source

import {cloneRepo} from 'github-wiki-notifier/src/repository.js'

Clone Repository

Params:

NameTypeAttributeDescription
repoPath string

repository path

cloneDir string

local path for clone

Return:

Promise

public get(name: string): string | undefined source

Get environment variables

Params:

NameTypeAttributeDescription
name string

variable name

Return:

string | undefined

public getDiff(repo: Object, opts: String[]): Promise source

Get Diff Strings

Params:

NameTypeAttributeDescription
repo Object

repository object of simple-git

opts String[]

diff options for Git command

Return:

Promise

public getDiffPages(repo: Object, pages: Object[]): Promise source

import {getDiffPages} from 'github-wiki-notifier/src/repository.js'

Get Diff Strings for Pages

Params:

NameTypeAttributeDescription
repo Object

repository object of simple-git

pages Object[]

pages

Return:

Promise

public getRepo(repoPath: string, cloneDir: string): Promise source

Get Repository

Params:

NameTypeAttributeDescription
repoPath string

repository path

cloneDir string

local path for clone

Return:

Promise

public getRepoNameFromRemotePath(repoPath: string): string source

import {getRepoNameFromRemotePath} from 'github-wiki-notifier/src/repository.js'

Get Repository name from remote path

Params:

NameTypeAttributeDescription
repoPath string

repository path

Return:

string

public getRepoPathFromPayload(payload: Object): string source

import {getRepoPathFromPayload} from 'github-wiki-notifier/src/repository.js'

Get remote repository path from payload object

Params:

NameTypeAttributeDescription
payload Object
  • optional

GitHub Webhook payload

Return:

string