mirror of
https://github.com/e1fueg0/intellij-gitea-plugin.git
synced 2024-10-27 20:34:04 +00:00
Merge pull request #11 from billlhead/master
Fixes errors with loading issues without limits and searching for issues containing white spaces
This commit is contained in:
commit
2f14392e1e
@ -30,6 +30,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
@ -260,7 +261,7 @@ class GiteaRepository extends BaseRepositoryImpl {
|
||||
|
||||
StringBuilder qu = new StringBuilder();
|
||||
if (query != null)
|
||||
qu.append("?q=").append(query);
|
||||
qu.append("?q=").append(URLEncoder.encode(query, "UTF-8"));
|
||||
if (withClosed)
|
||||
qu.append("&state=closed");
|
||||
qu.append("&page=");
|
||||
@ -296,10 +297,12 @@ class GiteaRepository extends BaseRepositoryImpl {
|
||||
continue;
|
||||
GiteaTaskImpl mapped = new GiteaTaskImpl(this, raw);
|
||||
result.add(mapped);
|
||||
if (limit > -1) {
|
||||
limit--;
|
||||
if (limit < 1)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user