1
1
mirror of https://github.com/go-gitea/gitea synced 2025-11-08 23:38:13 +00:00

Merge branch 'main' into lunny/refactor-issue

This commit is contained in:
Lunny Xiao
2024-11-21 12:08:03 -08:00
862 changed files with 21003 additions and 15953 deletions

View File

@@ -870,7 +870,7 @@ func GetPinnedIssues(ctx context.Context, repoID int64, isPull bool) (IssueList,
return issues, nil
}
// IsNewPinnedAllowed returns if a new Issue or Pull request can be pinned
// IsNewPinAllowed returns if a new Issue or Pull request can be pinned
func IsNewPinAllowed(ctx context.Context, repoID int64, isPull bool) (bool, error) {
var maxPin int
_, err := db.GetEngine(ctx).SQL("SELECT COUNT(pin_order) FROM issue WHERE repo_id = ? AND is_pull = ? AND pin_order > 0", repoID, isPull).Get(&maxPin)