Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions bin/good-first-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,25 @@ const projects = require('../data/projects.json')

cli
.version(packageJSON.version, '-v, --version')
.description(packageJSON.description)
.description(`${packageJSON.description}

Options:`)
.arguments('[project]')
.option('-o, --open', 'Open in browser')
.option('-f, --first', 'Return first/top issue')
.option('-a, --auth <token>', 'Authenticate with the GitHub API (increased rate limits)')
.option('-o, --open', 'Open issue in browser after fetching')
.option('-f, --first', 'Return only the top/first issue')
.option('-a, --auth <token>', 'Use a GitHub token to avoid API rate limits')
.on('--help', () => {
console.log(`
Examples:
$ good-first-issue # Interactive project selection
$ good-first-issue node # Fetch issues for 'node' project
$ good-first-issue node -f # Get only the top issue
$ good-first-issue node -o # Open issue in browser
$ good-first-issue node -a <token> # Authenticate with a GitHub token

Tip: Generate a GitHub token at: https://github.com/settings/tokens
`);
})
.action(async (project, cmd) => {
const options = { // options for libgfi
projects: projects
Expand Down