Home Reference Source Test Repository
public class | source

HTMLFomatter

Constructor Summary

Public Constructor
public

constructor(maxLength: *)

Member Summary

Public Members
public

Method Summary

Public Methods
public

createDiff(diffString: string): string

Convert Diff string to HTML

public

createHeader(page: Object, user: Object, repository: Object): string

Create HTML for Header

public

createMessage(diffs: Object[] | string[], repository: Object | string, user: Object, maxLength: number): string

create HTML for sending message

Public Constructors

public constructor(maxLength: *) source

Params:

NameTypeAttributeDescription
maxLength *

Public Members

public maxLength: * source

Public Methods

public createDiff(diffString: string): string source

Convert Diff string to HTML

Params:

NameTypeAttributeDescription
diffString string

diff string

Return:

string

public createHeader(page: Object, user: Object, repository: Object): string source

Create HTML for Header

Params:

NameTypeAttributeDescription
page Object

page object in GitHub Webhook payload

user Object

sender object in GitHub Webhook payload

repository Object

repository object in GitHub Webhook payload

Return:

string

public createMessage(diffs: Object[] | string[], repository: Object | string, user: Object, maxLength: number): string source

create HTML for sending message

Params:

NameTypeAttributeDescription
diffs Object[] | string[]

diff list

repository Object | string

repository object in GitHub Webhook payload

user Object
  • optional

sender object in GitHub Webhook payload

maxLength number
  • optional

max words length for contains diff string

Return:

string