|
|
@ -389,21 +389,23 @@ func Issues(ctx *context.Context) { |
|
|
|
|
|
|
|
|
|
|
|
reposQuery := ctx.Query("repos") |
|
|
|
reposQuery := ctx.Query("repos") |
|
|
|
var repoIDs []int64 |
|
|
|
var repoIDs []int64 |
|
|
|
if issueReposQueryPattern.MatchString(reposQuery) { |
|
|
|
if len(reposQuery) != 0 { |
|
|
|
// remove "[" and "]" from string
|
|
|
|
if issueReposQueryPattern.MatchString(reposQuery) { |
|
|
|
reposQuery = reposQuery[1 : len(reposQuery)-1] |
|
|
|
// remove "[" and "]" from string
|
|
|
|
//for each ID (delimiter ",") add to int to repoIDs
|
|
|
|
reposQuery = reposQuery[1 : len(reposQuery)-1] |
|
|
|
for _, rID := range strings.Split(reposQuery, ",") { |
|
|
|
//for each ID (delimiter ",") add to int to repoIDs
|
|
|
|
// Ensure nonempty string entries
|
|
|
|
for _, rID := range strings.Split(reposQuery, ",") { |
|
|
|
if rID != "" && rID != "0" { |
|
|
|
// Ensure nonempty string entries
|
|
|
|
rIDint64, err := strconv.ParseInt(rID, 10, 64) |
|
|
|
if rID != "" && rID != "0" { |
|
|
|
if err == nil { |
|
|
|
rIDint64, err := strconv.ParseInt(rID, 10, 64) |
|
|
|
repoIDs = append(repoIDs, rIDint64) |
|
|
|
if err == nil { |
|
|
|
|
|
|
|
repoIDs = append(repoIDs, rIDint64) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
log.Error("issueReposQueryPattern not match with query") |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
log.Error("issueReposQueryPattern not match with query") |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
isShowClosed := ctx.Query("state") == "closed" |
|
|
|
isShowClosed := ctx.Query("state") == "closed" |
|
|
|