diff options
author | Nanguan Lin <70063547+lng2020@users.noreply.github.com> | 2023-10-20 20:01:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-20 14:01:25 +0200 |
commit | eb1478791f2bdf77f54853e25878e3c5371a80d3 (patch) | |
tree | 09992e5e1ce4e4f2905ca99e6282a9a6e350667b /modules/indexer/issues | |
parent | cab7b7f59c008eea8b3b484a8818eaaf48daa805 (diff) | |
download | gitea-eb1478791f2bdf77f54853e25878e3c5371a80d3.tar.gz gitea-eb1478791f2bdf77f54853e25878e3c5371a80d3.zip |
Clean some functions about project issue (#27705)
1. remove unused function `MoveIssueAcrossProjectBoards`
2. extract the project board condition into a function
3. use db.NoCondition instead of -1. (BTW, the usage of db.NoCondition
is too confusing. Is there any way to avoid that?)
4. remove the unnecessary comment since the ctx refactor is completed.
5. Change `b.ID != 0` to `b.ID > 0`. It's more intuitive but I think
they're the same since board ID can't be negative.
Diffstat (limited to 'modules/indexer/issues')
-rw-r--r-- | modules/indexer/issues/db/options.go | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/modules/indexer/issues/db/options.go b/modules/indexer/issues/db/options.go index 4d3fa44ca6..e149066494 100644 --- a/modules/indexer/issues/db/options.go +++ b/modules/indexer/issues/db/options.go @@ -96,7 +96,6 @@ func ToDBOptions(ctx context.Context, options *internal.SearchOptions) (*issue_m } if len(options.IncludedLabelIDs) == 0 && len(options.IncludedAnyLabelIDs) > 0 { - _ = ctx // issue_model.GetLabelsByIDs should be called with ctx, this line can be removed when it's done. labels, err := issue_model.GetLabelsByIDs(ctx, options.IncludedAnyLabelIDs, "name") if err != nil { return nil, fmt.Errorf("GetLabelsByIDs: %v", err) |