diff --git a/lib/routes/github/pulls.ts b/lib/routes/github/pulls.ts index 1d0c87698..7dcf7550f 100644 --- a/lib/routes/github/pulls.ts +++ b/lib/routes/github/pulls.ts @@ -14,7 +14,29 @@ export const route: Route = { path: '/pull/:user/:repo/:state?/:labels?', categories: ['programming'], example: '/github/pull/DIYgod/RSSHub', - parameters: { user: 'User name', repo: 'Repo name', state: 'the state of pull requests. Can be either `open`, `closed`, or `all`. Default: `open`.', labels: 'a list of comma separated label names' }, + parameters: { + user: 'GitHub username', + repo: 'GitHub repo name', + state: { + description: 'the state of pull requests.', + default: 'open', + options: [ + { + label: 'Open', + value: 'open', + }, + { + label: 'Closed', + value: 'closed', + }, + { + label: 'All', + value: 'all', + }, + ], + }, + labels: 'a list of comma separated label names', + }, features: { requireConfig: false, requirePuppeteer: false, @@ -61,7 +83,7 @@ async function handler(ctx) { return { allowEmpty: true, - title: `${user}/${repo} Pull requests`, + title: `${user}/${repo} ${state.replace(/^\S/, (s) => s.toUpperCase())} Pull Requests${labels ? ' - ' + labels : ''}`, link: host, item: data.map((item) => ({ title: item.title,