Github.buildGithubSearchString()

Build a GitHub search string (the 'q' parameter for use with the GitHub Search API).

Usage

Hover over inputs/exits for more info.

var Github = require('machinepack-github');


// Build a GitHub search string (the 'q' parameter for use with the GitHub Search API).

Github.buildGithubSearchString({

repo: 'sails',

owner: 'balderdashy',

state: 'open',

lastUpdatedBefore: 1442710858715,

withAllOfTheseLabels: [ 'question' ],

withNoneOfTheseLabels: [ 'bug' ],

type: 'pr',

}).execSync();

Inputs

repo

The name of the Github repo (i.e. as it appears in the URL on GitHub)

'sails'
owner

The name of the organization or user that owns the repo (i.e. as it appears in the URL on GitHub)

'balderdashy'
state

The state to filter issues by (either "open" or "closed".

'open'
lastUpdatedBefore

A JS timestamp.

1442710858715
withAllOfTheseLabels

A set of issue labels.

[ 'question' ]
withNoneOfTheseLabels

A set of issue labels.

[ 'bug' ]
type

The type of issues to return (either `pr` or `issue).

'pr'

Exits

error

An unexpected error occurred.

success

OK.

'repo:balderdashy/sails state:open'