Merge pull request #11 from billlhead/master

Fixes errors with loading issues without limits and searching for issues containing white spaces
master
Roman Pedchenko 4 years ago committed by GitHub
commit 2f14392e1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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,9 +297,11 @@ class GiteaRepository extends BaseRepositoryImpl {
continue;
GiteaTaskImpl mapped = new GiteaTaskImpl(this, raw);
result.add(mapped);
limit--;
if (limit < 1)
return false;
if (limit > -1) {
limit--;
if (limit < 1)
return false;
}
}
return true;
}

Loading…
Cancel
Save