npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

libgfi

v1.1.1

Published

A module for finding good-first-issues in open source projects.

Downloads

18

Readme

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