From c9cb4700340797bb15a27dfd5261e440afe21f5a 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 (cherry picked from commit 3d6ccbac3f20c485ab95a29d280c9371e558bfac) --- 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 f7379b7e0c..13991da767 100644 --- a/models/issues/issue.go +++ b/models/issues/issue.go @@ -875,7 +875,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 45e2e19434..e7663ea350 100644 --- a/models/issues/pull.go +++ b/models/issues/pull.go @@ -689,7 +689,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).