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:
parent
0339933c29
commit
e5b0754fd6
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue