List GitHub issues matching the specified criteria.
var Github = require('machinepack-github');
// List GitHub issues matching the specified criteria.
Github.searchIssues({
repo: 'sails',
owner: 'balderdashy',
: ,
state: 'open',
lastUpdatedBefore: 1442710858715,
withAllOfTheseLabels: [ 'question' ],
withNoneOfTheseLabels: [ 'bug' ],
includePullRequests: false,
includeOtherIssues: true,
}).exec({
// An unexpected error occurred.
error: function (err) {
},
// OK.
success: function (issues) {
},
});
The name of the Github repo (i.e. as it appears in the URL on GitHub)
'sails'
The name of the organization or user that owns the repo (i.e. as it appears in the URL on GitHub)
'balderdashy'
The state to filter issues by (either "open" or "closed".
'open'
A JS timestamp.
1442710858715
A set of issue labels.
[ 'question' ]
A set of issue labels.
[ 'bug' ]
Whether to include pull requests in search results.
false
Whether to include normal issues (i.e. things that aren't pull requests) in search results.
true
An unexpected error occurred.
OK.
[
{
id: 83393186,
url: 'https://api.github.com/repos/balderdashy/sails/issues/2976',
number: 2976,
state: 'open',
pull_request: '*',
title: 'Error 500 on duplicate key found in database',
body: 'How to catch the `error` occured while db find a duplicate key...',
locked: false,
assignee: '*',
milestone: '*',
comments: 2,
created_at: '2015-06-01T08:52:02Z',
updated_at: '2015-06-02T09:15:20Z',
user: {
id: 5616249,
login: 'nikhiljohn10',
avatar_url: 'https://avatars.githubusercontent.com/u/5616249?v=3',
html_url: 'https://github.com/nikhiljohn10'
},
labels: [
{
url: 'https://api.github.com/repos/balderdashy/sails/labels/featurerequest',
name: 'featurerequest',
color: '16ACC2'
}
]
}
]