feat: GitHub Repo Issues: add optional state and labels p... (#3766)

This commit is contained in:
Andrey
2020-01-19 11:02:13 +07:00
committed by DIYgod
parent 04fefb4de9
commit 24a6a62578
3 changed files with 7 additions and 3 deletions

View File

@@ -7,6 +7,8 @@ const md = require('markdown-it')({
module.exports = async (ctx) => {
const user = ctx.params.user;
const repo = ctx.params.repo;
const state = ctx.params.state;
const labels = ctx.params.labels;
const host = `https://github.com/${user}/${repo}/issues`;
const url = `https://api.github.com/repos/${user}/${repo}/issues`;
@@ -15,6 +17,8 @@ module.exports = async (ctx) => {
method: 'get',
url,
params: {
state: state,
labels: labels,
sort: 'created',
access_token: config.github && config.github.access_token,
},