From e5b0754fd695ff7ad278064e234c0d3bf297e428 Mon Sep 17 00:00:00 2001 From: stydxm <1773834430@qq.com> Date: Thu, 28 Mar 2024 00:49:05 +0800 Subject: [PATCH] fix(route): complete GitHub file params (#14987) * fix(route): complete GitHub file params * Apply suggestions from code review Co-authored-by: Tony -------- --- lib/routes/github/file.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/routes/github/file.ts b/lib/routes/github/file.ts index f44113890..63684353c 100644 --- a/lib/routes/github/file.ts +++ b/lib/routes/github/file.ts @@ -5,14 +5,21 @@ import queryString from 'query-string'; export const route: Route = { path: '/file/:user/:repo/:branch/:filepath{.+}', + example: '/github/file/DIYgod/RSSHub/master/README.md', + parameters: { + user: "GitHub user or org name", + repo: "repository name", + branch: "branch name", + filepath: "path of target file", + }, radar: [ { source: ['github.com/:user/:repo/blob/:branch/*filepath'], target: '/file/:user/:repo/:branch/:filepath', }, ], - name: 'Unknown', - maintainers: [], + name: 'File Commits', + maintainers: ['zengxs'], handler, };