mirror of
https://gitea.com/gitea/tea.git
synced 2025-09-07 04:12:55 +02:00
Merge branch 'main' into lunny/fallback_confirm
This commit is contained in:
@ -13,7 +13,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"code.gitea.io/sdk/gitea"
|
||||
"code.gitea.io/tea/modules/config"
|
||||
"code.gitea.io/tea/modules/git"
|
||||
"code.gitea.io/tea/modules/theme"
|
||||
@ -37,22 +36,6 @@ type TeaContext struct {
|
||||
LocalRepo *git.TeaRepo // is set if flags specified a local repo via --repo, or if $PWD is a git repo
|
||||
}
|
||||
|
||||
// GetListOptions return ListOptions based on PaginationFlags
|
||||
func (ctx *TeaContext) GetListOptions() gitea.ListOptions {
|
||||
page := ctx.Int("page")
|
||||
limit := ctx.Int("limit")
|
||||
if limit < 0 {
|
||||
limit = 0
|
||||
}
|
||||
if limit != 0 && page == 0 {
|
||||
page = 1
|
||||
}
|
||||
return gitea.ListOptions{
|
||||
Page: page,
|
||||
PageSize: limit,
|
||||
}
|
||||
}
|
||||
|
||||
// GetRemoteRepoHTMLURL returns the web-ui url of the remote repo,
|
||||
// after ensuring a remote repo is present in the context.
|
||||
func (ctx *TeaContext) GetRemoteRepoHTMLURL() string {
|
||||
|
Reference in New Issue
Block a user