Merge pull request #42 from MaxenceG2M/master

Fix #26 - Element with id XX is already registered
This commit is contained in:
Alexander Panov 2022-08-26 14:31:20 +02:00 committed by GitHub
commit 934ad3aec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ export class IssueProvider implements vscode.TreeDataProvider<Issue> {
const giteaConnector = new GiteaConnector(config.token, config.sslVerify);
const issues = [];
let page = 0;
let page = 1;
while (page < 11) {
const issuesOfPage = (await giteaConnector.getIssues(config.repoApiUrl, this.state, page)).data;
issues.push(...issuesOfPage);
@ -37,7 +37,7 @@ export class IssueProvider implements vscode.TreeDataProvider<Issue> {
c.creator = c.user.login;
});
page++;
if (issues.length < 10) {
if (issuesOfPage.length < 10) {
break;
}
}