@@ -389,21 +389,23 @@ func Issues(ctx *context.Context) {
389
389
390
390
reposQuery := ctx .Query ("repos" )
391
391
var repoIDs []int64
392
- if issueReposQueryPattern .MatchString (reposQuery ) {
393
- // remove "[" and "]" from string
394
- reposQuery = reposQuery [1 : len (reposQuery )- 1 ]
395
- //for each ID (delimiter ",") add to int to repoIDs
396
- for _ , rID := range strings .Split (reposQuery , "," ) {
397
- // Ensure nonempty string entries
398
- if rID != "" && rID != "0" {
399
- rIDint64 , err := strconv .ParseInt (rID , 10 , 64 )
400
- if err == nil {
401
- repoIDs = append (repoIDs , rIDint64 )
392
+ if len (reposQuery ) != 0 {
393
+ if issueReposQueryPattern .MatchString (reposQuery ) {
394
+ // remove "[" and "]" from string
395
+ reposQuery = reposQuery [1 : len (reposQuery )- 1 ]
396
+ //for each ID (delimiter ",") add to int to repoIDs
397
+ for _ , rID := range strings .Split (reposQuery , "," ) {
398
+ // Ensure nonempty string entries
399
+ if rID != "" && rID != "0" {
400
+ rIDint64 , err := strconv .ParseInt (rID , 10 , 64 )
401
+ if err == nil {
402
+ repoIDs = append (repoIDs , rIDint64 )
403
+ }
402
404
}
403
405
}
406
+ } else {
407
+ log .Error ("issueReposQueryPattern not match with query" )
404
408
}
405
- } else {
406
- log .Error ("issueReposQueryPattern not match with query" )
407
409
}
408
410
409
411
isShowClosed := ctx .Query ("state" ) == "closed"
0 commit comments