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 install hacktoberfest-issue-hunt
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');
hacktoberfest({ token: 'XXXXXXXX' })
.then((issues) => {
// issues -> list of hacktoberfest issues
})
.catch(console.log);
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",
},
{
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",
}
]
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.
- Learn more about personal access token
- Generate your personal access token
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',
complete: true
};
// 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 |
complete |
Default is false . Pass it as true if you want to receive the complete data about an issue, otherwise it will return only title and link to the issue |
Currently the max limit is 100 as the paginated response is not supported.
- ๐จ 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.
Vinit Shahdeo | @vinitshahdeo
Show some ๐ by starring this repository or buying me a coffee!