From 3d6ccbac3f20c485ab95a29d280c9371e558bfac Mon Sep 17 00:00:00 2001 From: wangjingcun Date: Tue, 22 Oct 2024 08:41:05 +0800 Subject: [PATCH] chore: fix some function names in comment (#32300) fix some function names in comment --- cmd/admin_auth_ldap.go | 2 +- models/issues/issue.go | 2 +- models/issues/pull.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/admin_auth_ldap.go b/cmd/admin_auth_ldap.go index e3c81809f8..aff2a12855 100644 --- a/cmd/admin_auth_ldap.go +++ b/cmd/admin_auth_ldap.go @@ -386,7 +386,7 @@ func (a *authService) addLdapSimpleAuth(c *cli.Context) error { return a.createAuthSource(ctx, authSource) } -// updateLdapBindDn updates a new LDAP (simple auth) authentication source. +// updateLdapSimpleAuth updates a new LDAP (simple auth) authentication source. func (a *authService) updateLdapSimpleAuth(c *cli.Context) error { ctx, cancel := installSignals() defer cancel() diff --git a/models/issues/issue.go b/models/issues/issue.go index 40462ed09d..9ccf2859ea 100644 --- a/models/issues/issue.go +++ b/models/issues/issue.go @@ -872,7 +872,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) diff --git a/models/issues/pull.go b/models/issues/pull.go index b327ebc625..4475ab3a4f 100644 --- a/models/issues/pull.go +++ b/models/issues/pull.go @@ -701,7 +701,7 @@ func GetPullRequestByIssueID(ctx context.Context, issueID int64) (*PullRequest, return pr, pr.LoadAttributes(ctx) } -// GetPullRequestsByBaseHeadInfo returns the pull request by given base and head +// GetPullRequestByBaseHeadInfo returns the pull request by given base and head func GetPullRequestByBaseHeadInfo(ctx context.Context, baseID, headID int64, base, head string) (*PullRequest, error) { pr := &PullRequest{} sess := db.GetEngine(ctx).