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:
- Type:
-
Promise
- the promise for the http request
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:
- Type:
-
Promise
- the promise for the http request
createLabel(labelData, cbopt) → {Promise}
Create a new label
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
labelData |
Object
|
the label definition |
|
cb |
Requestable.callback
|
<optional> |
will receive the object representing the label |
Returns:
- Type:
-
Promise
- the promise for the http request
createMilestone(milestoneData, cbopt) → {Promise}
Create a new milestone
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
milestoneData |
Object
|
the milestone definition |
|
cb |
Requestable.callback
|
<optional> |
will receive the milestone |
Returns:
- Type:
-
Promise
- the promise for the http request
deleteIssueComment(id, cbopt) → {Promise}
Delete a comment on an issue
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number
|
the comment id to delete |
|
cb |
Requestable.callback
|
<optional> |
will receive true if the request is successful |
Returns:
- Type:
-
Promise
- the promise for the http request
deleteLabel(label, cbopt) → {Promise}
Delete a label
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
label |
string
|
the name of the label to delete |
|
cb |
Requestable.callback
|
<optional> |
will receive the status |
Returns:
- Type:
-
Promise
- the promise for the http request
deleteMilestone(milestone, cbopt) → {Promise}
Delete a milestone (this is distinct from closing a milestone)
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
milestone |
string
|
the id of the milestone to delete |
|
cb |
Requestable.callback
|
<optional> |
will receive the status |
Returns:
- Type:
-
Promise
- the promise for the http request
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:
- Type:
-
Promise
- the promise for the http request
editIssueComment(id, comment, cbopt) → {Promise}
Edit a comment on an issue
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number
|
the comment id to edit |
|
comment |
string
|
the comment to edit |
|
cb |
Requestable.callback
|
<optional> |
will receive the edited comment |
Returns:
- Type:
-
Promise
- the promise for the http request
editLabel(label, labelData, cbopt) → {Promise}
Edit a label
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
label |
string
|
the name of the label to edit |
|
labelData |
Object
|
the updates to make to the label |
|
cb |
Requestable.callback
|
<optional> |
will receive the updated label |
Returns:
- Type:
-
Promise
- the promise for the http request
editMilestone(milestone, milestoneData, cbopt) → {Promise}
Edit a milestone
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
milestone |
string
|
the id of the milestone to edit |
|
milestoneData |
Object
|
the updates to make to the milestone |
|
cb |
Requestable.callback
|
<optional> |
will receive the updated milestone |
Returns:
- Type:
-
Promise
- the promise for the http request
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:
- Type:
-
Promise
- the promise for the http request
getIssueComment(id, cbopt) → {Promise}
Get a single comment on an issue
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
id |
number
|
the comment id to get |
|
cb |
Requestable.callback
|
<optional> |
will receive the comment |
Returns:
- Type:
-
Promise
- the promise for the http request
getLabel(label, cbopt) → {Promise}
Get a label
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
label |
string
|
the name of the label to fetch |
|
cb |
Requestable.callback
|
<optional> |
will receive the label |
Returns:
- Type:
-
Promise
- the promise for the http request
getMilestone(milestone, cbopt) → {Promise}
Get a milestone
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
milestone |
string
|
the id of the milestone to fetch |
|
cb |
Requestable.callback
|
<optional> |
will receive the milestone |
Returns:
- Type:
-
Promise
- the promise for the http request
listIssueComments(issue, cbopt) → {Promise}
List comments on an issue
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
issue |
number
|
the id of the issue to get comments from |
|
cb |
Requestable.callback
|
<optional> |
will receive the comments |
Returns:
- Type:
-
Promise
- the promise for the http request
listIssueEvents(issue, cbopt) → {Promise}
List the events for an issue
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
issue |
number
|
the issue to get events for |
|
cb |
Requestable.callback
|
<optional> |
will receive the list of events |
Returns:
- Type:
-
Promise
- the promise for the http request
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:
- Type:
-
Promise
- the promise for the http request
listLabels(options, cbopt) → {Promise}
List the labels for the repository
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object
|
filtering options |
|
cb |
Requestable.callback
|
<optional> |
will receive the array of labels |
Returns:
- Type:
-
Promise
- the promise for the http request
listMilestones(options, cbopt) → {Promise}
List the milestones for the repository
- Source:
- See:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object
|
filtering options |
|
cb |
Requestable.callback
|
<optional> |
will receive the array of milestones |
Returns:
- Type:
-
Promise
- the promise for the http request