Class: GithubApp

githubAdapter GithubApp

Class representing minimal Github API wrapper for app interaction.


new GithubApp(config)

Parameters:
Name Type Description
config Object
Properties
Name Type Description
id String

GithubApp Id

cert String

GithubApp private key data

Properties:
Name Type Description
app Object

Instance of github-app (TODO:add link)

Methods


<async> createOrUpdateComment(target_identifier, comment)

Create or update an Issue. If comment.id is provided, update the corresponding comment, otherwise create a new one.

Parameters:
Name Type Description
target_identifier Identifier

Identifier pointing at a github repository

comment Comment
Returns:

The github comment number

Type
String

<async> createOrUpdateIssue(target_identifier, issue)

Create or Update an Issue. If issue.number is provided, update the corresponding issue, otherwise create a new one .

Parameters:
Name Type Description
target_identifier Identifier

Identifier pointing at a github repository

issue Issue
Returns:

The github issue number

Type
String

<async> getRepositories(installation_id)

Get all repositories the installation has access to.

This method is augumented by module:docloop#cache(2000). Return values will be cached for 2 seconds, to prevent huge numbers of API calls.

Parameters:
Name Type Description
installation_id String

GithubApp installation id

Returns:

For each repository a subset of the data provided by github.

Type
Array.<Object>