mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
feat: Add summary card for repos and releases
This commit is contained in:
parent
f5cfdd80a7
commit
7685a1e98e
11 changed files with 673 additions and 247 deletions
|
@ -1146,9 +1146,10 @@ func registerRoutes(m *web.Route) {
|
|||
m.Group("/{type:issues|pulls}", func() {
|
||||
m.Group("/{index}", func() {
|
||||
m.Get("/info", repo.GetIssueInfo)
|
||||
m.Get("/summary-card", repo.GetSummaryCard)
|
||||
m.Get("/summary-card", repo.DrawIssueSummaryCard)
|
||||
})
|
||||
})
|
||||
m.Get("/-/summary-card", repo.DrawRepoSummaryCard)
|
||||
}, ignSignIn, context.RepoAssignment, context.UnitTypes()) // for "/{username}/{reponame}" which doesn't require authentication
|
||||
|
||||
// Grouping for those endpoints that do require authentication
|
||||
|
@ -1298,6 +1299,7 @@ func registerRoutes(m *web.Route) {
|
|||
m.Get("/latest", repo.LatestRelease)
|
||||
m.Get(".rss", feedEnabled, repo.ReleasesFeedRSS)
|
||||
m.Get(".atom", feedEnabled, repo.ReleasesFeedAtom)
|
||||
m.Get("/summary-card/{releaseID}", repo.DrawReleaseSummaryCard)
|
||||
}, ctxDataSet("EnableFeed", setting.Other.EnableFeed),
|
||||
repo.MustBeNotEmpty, context.RepoRefByType(context.RepoRefTag, true))
|
||||
m.Get("/releases/attachments/{uuid}", repo.MustBeNotEmpty, repo.GetAttachment)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue