Constructor
new Issue(repository, authopt, apiBaseopt)
Create a new Issue
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
repository |
string | the full name of the repository ( |
||
auth |
Requestable.auth |
<optional> |
information required to authenticate to Github |
|
apiBase |
string |
<optional> |
https://api.github.com | the base Github API URL |
Methods
createIssue(issueData, cbopt) → {Promise}
Create a new issue
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
issueData |
Object | the issue to create |
|
cb |
Requestable.callback |
<optional> |
will receive the created issue |
Returns:
- the promise for the http request
- Type
- Promise
createIssueComment(issue, comment, cbopt) → {Promise}
Comment on an issue
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
issue |
number | the id of the issue to comment on |
|
comment |
string | the comment to add |
|
cb |
Requestable.callback |
<optional> |
will receive the created comment |
Returns:
- the promise for the http request
- Type
- Promise
editIssue(issue, issueData, cbopt) → {Promise}
Edit an issue
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
issue |
number | the issue number to edit |
|
issueData |
Object | the new issue data |
|
cb |
Requestable.callback |
<optional> |
will receive the modified issue |
Returns:
- the promise for the http request
- Type
- Promise
getIssue(issue, cbopt) → {Promise}
Get a particular issue
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
issue |
number | the issue number to fetch |
|
cb |
Requestable.callback |
<optional> |
will receive the issue |
Returns:
- the promise for the http request
- Type
- Promise
listIssues(options, cbopt) → {Promise}
List the issues for the repository
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object | filtering options |
|
cb |
Requestable.callback |
<optional> |
will receive the array of issues |
Returns:
- the promise for the http request
- Type
- Promise