Create issues on your GitHub repository using Node.js
First of all, we need to create a personal token following this tutorial
Once we're done, we need to copy .env.example
and paste as .env
.
On the GITHUB_PERSONAL_TOKEN
env variable we paste our personal GitHub token.
After all that you can starting using it:
const Issue = require('./issue');
const issue = new Issue();
for (let i = 0; i <= 2; i += 1) {
issue
.onRepository('leonardomaier/lab')
.withTitle(`testing #${i}`)
.withDescription('hello')
.withAssignees(['leonardomaier'])
.withLabels(['help wanted', 'good first issue'])
.create();
}