Make staging (changes) the default repo view
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -22,7 +22,7 @@ public class RepoController
|
||||
@GetMapping("/repo/{name}")
|
||||
public String repo(@PathVariable String name)
|
||||
{
|
||||
return "redirect:/repo/" + name + "/branches";
|
||||
return "redirect:/repo/" + name + "/changes";
|
||||
}
|
||||
|
||||
@GetMapping("/repo/{name}/branches")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</head>
|
||||
<frameset cols="180,*">
|
||||
<frame th:src="${selectedRepo != null} ? '/nav?repo=' + ${selectedRepo} : '/nav'" name="nav">
|
||||
<frame th:src="${showCloneForm} ? '/clone-form' : (${selectedRepo != null} ? '/repo/' + ${selectedRepo} + '/branches' : '/welcome')" name="content">
|
||||
<frame th:src="${showCloneForm} ? '/clone-form' : (${selectedRepo != null} ? '/repo/' + ${selectedRepo} + '/changes' : '/welcome')" name="content">
|
||||
<noframes>
|
||||
<body>
|
||||
<p>Your browser does not support frames. <a href="/repos">Click here</a> to continue.</p>
|
||||
|
||||
@@ -25,11 +25,11 @@ class RepoControllerTest
|
||||
private GitService gitService;
|
||||
|
||||
@Test
|
||||
void repoRedirectsToBranches() throws Exception
|
||||
void repoRedirectsToChanges() throws Exception
|
||||
{
|
||||
mockMvc.perform(get("/repo/myrepo"))
|
||||
.andExpect(status().is3xxRedirection())
|
||||
.andExpect(redirectedUrl("/repo/myrepo/branches"));
|
||||
.andExpect(redirectedUrl("/repo/myrepo/changes"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user