-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Formats, Nits & Unused Func/Var deletions #15286
Changes from all commits
afe0ec1
5e8a3fe
e8cddb8
59329f2
739acee
da5050c
79afd91
2b76a26
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,7 +141,6 @@ func SearchIssues(ctx *context.APIContext) { | |
keyword = "" | ||
} | ||
var issueIDs []int64 | ||
var labelIDs []int64 | ||
if len(keyword) > 0 && len(repoIDs) > 0 { | ||
if issueIDs, err = issue_indexer.SearchIssuesByKeyword(repoIDs, keyword); err != nil { | ||
ctx.Error(http.StatusInternalServerError, "SearchIssuesByKeyword", err) | ||
|
@@ -176,7 +175,7 @@ func SearchIssues(ctx *context.APIContext) { | |
|
||
// Only fetch the issues if we either don't have a keyword or the search returned issues | ||
// This would otherwise return all issues if no issues were found by the search. | ||
if len(keyword) == 0 || len(issueIDs) > 0 || len(labelIDs) > 0 { | ||
if len(keyword) == 0 || len(issueIDs) > 0 || len(includedLabelNames) > 0 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This maybe a bug but not a refactor? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. didn't dig into it yet - posible There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. look's like in an edge case the label filter potentially is not applied, but I could not hit it, so It's a code improvement to prevent becoming a bug in the future |
||
issuesOpt := &models.IssuesOptions{ | ||
ListOptions: models.ListOptions{ | ||
Page: ctx.QueryInt("page"), | ||
|
@@ -675,7 +674,7 @@ func EditIssue(ctx *context.APIContext) { | |
} | ||
} | ||
if form.State != nil { | ||
issue.IsClosed = (api.StateClosed == api.StateType(*form.State)) | ||
issue.IsClosed = api.StateClosed == api.StateType(*form.State) | ||
} | ||
statusChangeComment, titleChanged, err := models.UpdateIssueByAPI(issue, ctx.User) | ||
if err != nil { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of dead code
see L100 & L110
If we like to keep it, we need a reason we should write down here ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lunny do we have a reason to keep it?