-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Branches management UI #2464
Branches management UI #2464
Conversation
@@ -579,6 +579,14 @@ func RegisterRoutes(m *macaron.Macaron) { | |||
m.Get("/milestones", repo.Milestones) | |||
}, context.RepoRef()) | |||
|
|||
m.Group("/branches", func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this group needs context.CheckUnit(models.UnitTypeCode)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
routers/repo/branch.go
Outdated
|
||
brs, err := ctx.Repo.GitRepo.GetBranches() | ||
func loadBranches(c *context.Context) []*Branch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we name it ctx
for consistency with other handlers? Likewise in other places
routers/routes/routes.go
Outdated
m.Get("/all", repo.AllBranches) | ||
m.Post("/delete/*", reqSignIn, reqRepoWriter, repo.DeleteBranchPost) | ||
}, repo.MustBeNotBare, func(c *context.Context) { | ||
c.Data["PageIsViewFiles"] = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "PageIsViewFiles"
used anywhere? I can't find it anywhere in this PR or in existing code.
routers/repo/branch.go
Outdated
|
||
protectBranches, err := c.Repo.Repository.GetProtectedBranches() | ||
if err != nil { | ||
c.Handle(500, "GetProtectBranchesByRepoID", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong name
@ethantkoenig all done. |
32b781c
to
bce3545
Compare
bce3545
to
b0e1124
Compare
Would be nice to provide screenshots, otherwise LGTM |
I am for adding some example screenshots too. |
seems this is duplicated with #2108 |
Yes these PR need to be merged in one :) |
#2108 will replace this one, so I close here. |
As title. This should be the first step to move
commits, branches, tags
as a submenu of Code.