Giter Site home page Giter Site logo

libgfi's Introduction

libgfi

A module to surface GitHub issues labeled "Good First Issue" (and similar variants) for any GitHub organization, repo, or pre-defined project.

Prerequisites

To use Good First Issue, you'll need to have a few things installed:

  • Node.js 8.0.0 or above
  • npm 5.0.0 or above
    • If you already have Node.js 8.0.0 or above, you will have npm 5.0.0 or above.
    • If you need to update your npm CLI, run npm i -g npm

Usage

Installation:

npm install libgfi

An example of how libgfi can be used in a Node.js application:

const gfi = require('libgfi')

let log = async () => {
  let issues = await gfi('microsoft') // search the 'microsoft' GitHub organization
  issues.forEach(function (issue) {
    console.log('#' + issue.pr + ': ' + issue.title)
  })
}

log()

Search a specific repository:

const gfi = require('libgfi')

gfi('golang/dep')
  .then((issues) => {
    console.log(issues)
  })
  .catch((error) => {
    console.error(error)
  })

Passing in a custom set of organizations to search:

const gfi = require('libgfi')

const options = {
  projects: {
    node: {
      name: 'Node.js', // Human readable name
      q: 'org:nodejs is:issue is:open label:"good first issue"', //GitHub search query
      description: "Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine." // Human readable description
    }
  }
}

let log = async () => {
  console.log(await goodFirstIssue('node', options)) // search the 'node' property
}

log()

Passing in GitHub credentials (see Octokit's authentication documentation for more details) for authentication to exponentially increase the rate limit:

const gfi = require('libgfi')

const options = {
  auth: '<replace_with_your_github_secret_personal_access_token>' // or username/password + 2fa, or app installation access token
}

let log = async () => {
  let issues = await gfi('microsoft', options) // search the 'microsoft' GitHub organization
  issues.forEach(function (issue) {
    console.log('#' + issue.pr + ': ' + issue.title)
  })
}

log()

Examples

Good First Issue has an examples/ directory, in which we try to maintain various examples of how Good First Issue can be used as a module. If you'd like to contribute to the examples, please don't hesitate to submit a PR! ๐Ÿค—

Adding New Projects: More Information

You can pull your queries directly from a standard GitHub search! If you want to build something a bit more complex, you can use the advanced search tool if you want to build more specific custom queries: https://github.com/search/advanced

As a CLI, good-first-issue uses the Commander.js CLI framework. If you want to better understand how our CLI is built, commander.js is pretty well documented. Also used are Chalk for terminal coloring and boxen to simplify the output container implementation.

Release Process

Good First Issue follows a relatively strict release process intended to ensure the spice flows.

Versioning

Semantic Version Type Reason
Major (x.x.x) Breaking changes and non-trivial upgrades Ensuring that end-users can rely on Good First Issue not breaking however they're consuming it
Minor (x.x.x) Project additions, other feature additions Following the SemVer standard, project additions and feature additions are backwards-compatible enhancements. We generally try to ship one addition per Minor.
Patch (x.x.x) Bug fixes, minor enhancements to metadata and content Tiny, hardly visible fixes to improve UX/DX or fix the module

Labels and Milestones

We use both GitHub Labels and Milestones to track releases. Since project additions count as a minor release, we prefer to space those out and ship them individually rather than shipping many at once. This pace may be revised later, but for now, it introduces the need for a release queue and setting things up to be released ahead of them actually being released.

We use the release queue label and milestone to queue up PRs that have been reviewed and are ready to be released.

Once a PR is ready to be released, a milestone will be added that correlates to the SemVer version it will be released in. Ideally this will eventually be used for changelog tracking but for now it's just a good way to keep organized. To keep things tidy, once a new version has shipped the milestone will be closed out.

Contributing

If you are interested in fixing issues and contributing directly to the code base, please see the document CONTRIBUTING.md

libgfi's People

Contributors

bnb avatar maddhruv avatar jasonetco avatar hemal7735 avatar dschau avatar mcollina avatar greenkeeper[bot] avatar kennethvdberghe avatar markusguenther avatar robdel12 avatar lbhanuka avatar boneskull avatar hpez avatar thescientist13 avatar codebytere avatar mannyluvstacos avatar ollelauribostrom avatar tiaguinho avatar delvedor avatar emmurillo avatar estrada9166 avatar jamesgeorge007 avatar maxdevjs avatar sis0k0 avatar program247365 avatar juanpicado avatar lauriejim avatar jsulz avatar iansu avatar gr2m avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.