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 org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
@ -260,7 +261,7 @@ class GiteaRepository extends BaseRepositoryImpl {
|
|||||||
|
|
||||||
StringBuilder qu = new StringBuilder();
|
StringBuilder qu = new StringBuilder();
|
||||||
if (query != null)
|
if (query != null)
|
||||||
qu.append("?q=").append(query);
|
qu.append("?q=").append(URLEncoder.encode(query, "UTF-8"));
|
||||||
if (withClosed)
|
if (withClosed)
|
||||||
qu.append("&state=closed");
|
qu.append("&state=closed");
|
||||||
qu.append("&page=");
|
qu.append("&page=");
|
||||||
@ -296,9 +297,11 @@ class GiteaRepository extends BaseRepositoryImpl {
|
|||||||
continue;
|
continue;
|
||||||
GiteaTaskImpl mapped = new GiteaTaskImpl(this, raw);
|
GiteaTaskImpl mapped = new GiteaTaskImpl(this, raw);
|
||||||
result.add(mapped);
|
result.add(mapped);
|
||||||
limit--;
|
if (limit > -1) {
|
||||||
if (limit < 1)
|
limit--;
|
||||||
return false;
|
if (limit < 1)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user