Giter Club home page Giter Club logo

hacktoberfest-issue-hunt's Introduction

hacktoberfest-issue-hunt

NPM VERSION GitHub license Snyk Vulnerabilities for npm package version

This module can be used to list all the open issues for hacktoberfest on GitHub. You can resolve those issues to complete your Hacktoberfest challenge. Learn more about Hacktoberfest.

NPM

Installation

npm install hacktoberfest-issue-hunt

Usage

To use this, you need to supply your personal access token by GitHub. You can easily create one here.

const hacktoberfest = require('hacktoberfest-issue-hunt');

Using Promise

hacktoberfest({ token: 'XXXXXXXX' })
  .then((issues) => {
    // issues -> list of hacktoberfest issues
  })
  .catch(console.log);

Using callback

hacktoberfest({ token: 'XXXXXXXX' }, (err, issues) => {
  if (err) {
    console.log(err);
    return;
  }
  console.log(issues);
});

Sample response

[
  {
    title: "Add More Inspirational Quotes",
    link: "https://github.com/vinitshahdeo/inspirational-quotes/issues/4",
    labels: ["good first issue", "help wanted", "hacktoberfest"],
    state: "open",
    comments: 2,
    createdAt: "Monday, October 11th 2021",
  },
  {
    title: "Create a React App to filter Hacktoberfest issues on the basis of languages and labels",
    link: "https://github.com/vinitshahdeo/hacktoberfest-issue-hunt/issues/1",
    labels: ["good first issue", "help wanted", "hacktoberfest"],
    state: "open",
    comments: 5,
    createdAt: "Sunday, October 10th 2021",
  }
];

Kindly refer to the documentation to learn more.

Demo

git clone https://github.com/vinitshahdeo/hacktoberfest-issue-hunt.git
cd hacktoberfest-issue-hunt
npm run demo

Replace XXXXXXXXXXXXXXX with your personal access token inside example/demo.js You can try it out using npm run demo or check out the examples here.

Options

Additionally, you can provide the following options to filter the hacktoberfest issues based on labels and language.

const options = {
  token: 'XXXXXXXXXXXXXXX', // replace it with your token
  labels: 'first-timers-only',
  limit: 10,
  language: 'js',
  ignoreClosed: false, // default is true
  complete: true // default is false
};

// using promises
hacktoberfest(options)
  .then((issues) => console.log(issues))
  .catch(console.log);

// using callback
hacktoberfest(options, (err, issues) => {
  if (err) {
    console.log(err);
    return;
  }
  console.log(issues);
});

Please refer the table below to explore available options.

Option Description
labels Filter issues based on labels e.g. first timers only, help wanted, good first issues, etc. Pass a comma-separated string containing the labels
language Filter issues based on language e.g. js, go, python, etc.
limit Maximum number of issues
ignoreClosed Default is true. Pass it as false if you want to fetch closed issues as well otherwise it will return only open issues
complete Default is false. Pass it as true if you want to receive the complete info about an issue. Refer fixtures/data.js to learn more about the complete issue object

Currently the max limit is 100 as the paginated response is not supported.

Sample Applications

npm

Contributing

  • ๐Ÿšจ Please check out discussions to find out how you can contribute.
  • ๐Ÿ’ก Refer IDEAS.md to explore what you can build using this module. Your innovative ideas are most welcome.

Author

Vinit Shahdeo โฏ @vinitshahdeo

Twitter Follow

Support

Show some ๐Ÿ’™ by starring this repository or buying me a coffee!

"Buy Me A Coffee"

hacktoberfest-issue-hunt's People

Contributors

vinitshahdeo 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.