File tree Expand file tree Collapse file tree
src/main/java/com/dkaedv/glghproxy/controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,15 @@ public class RedirectsController {
1010
1111 @ Value ("${gitlabUrl}" )
1212 private String gitlabUrl ;
13-
13+
14+ @ RequestMapping ("/{namespace}" )
15+ public String namespace (
16+ @ PathVariable String namespace
17+ ) {
18+
19+ return "redirect:" + gitlabUrl + "/" + namespace ;
20+ }
21+
1422 @ RequestMapping ("/{namespace}/{repo}" )
1523 public String repoHomepage (
1624 @ PathVariable String namespace ,
@@ -29,5 +37,15 @@ public String commit(
2937
3038 return "redirect:" + gitlabUrl + "/" + namespace + "/" + repo + "/commit/" + sha ;
3139 }
32-
40+
41+ @ RequestMapping ("/{namespace}/{repo}/tree/{branch}" )
42+ public String repoTree (
43+ @ PathVariable String namespace ,
44+ @ PathVariable String repo ,
45+ @ PathVariable String branch
46+ ) {
47+
48+ return "redirect:" + gitlabUrl + "/" + namespace + "/" + repo + "/tree/" + branch ;
49+ }
50+
3351}
You can’t perform that action at this time.
0 commit comments