fix(route): complete GitHub file params (#14987)

* fix(route): complete GitHub file params

* Apply suggestions from code review

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

--------
This commit is contained in:
stydxm
2024-03-28 00:49:05 +08:00
committed by GitHub
parent 0339933c29
commit e5b0754fd6
+9 -2
View File
@@ -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,
};