diff --git a/lib/platform/gitea/__snapshots__/gitea-helper.spec.ts.snap b/lib/platform/gitea/__snapshots__/gitea-helper.spec.ts.snap index ed53fce4ec7fc5f6d86682fc7f5948edbe78f3cd..355712ff2d91fd00e87841b03fcba4c22cca17ee 100644 --- a/lib/platform/gitea/__snapshots__/gitea-helper.spec.ts.snap +++ b/lib/platform/gitea/__snapshots__/gitea-helper.spec.ts.snap @@ -571,7 +571,7 @@ Array [ "user-agent": "https://github.com/renovatebot/renovate", }, "method": "GET", - "url": "https://gitea.renovatebot.com/api/v1/repos/some/repo/issues?", + "url": "https://gitea.renovatebot.com/api/v1/repos/some/repo/issues?type=issues", }, ] `; @@ -586,7 +586,7 @@ Array [ "user-agent": "https://github.com/renovatebot/renovate", }, "method": "GET", - "url": "https://gitea.renovatebot.com/api/v1/repos/some/repo/issues?state=open", + "url": "https://gitea.renovatebot.com/api/v1/repos/some/repo/issues?state=open&type=issues", }, ] `; diff --git a/lib/platform/gitea/gitea-helper.spec.ts b/lib/platform/gitea/gitea-helper.spec.ts index 5115c9ebb85eb7f31c38b520fc2947065b2eba9e..2117b298377355ffa358a99c5b1639dcd08f556b 100644 --- a/lib/platform/gitea/gitea-helper.spec.ts +++ b/lib/platform/gitea/gitea-helper.spec.ts @@ -461,7 +461,7 @@ describe('platform/gitea/gitea-helper', () => { it('should call /api/v1/repos/[repo]/issues endpoint', async () => { httpMock .scope(baseUrl) - .get(`/repos/${mockRepo.full_name}/issues`) + .get(`/repos/${mockRepo.full_name}/issues?type=issues`) .reply(200, [mockIssue]); const res = await ght.searchIssues(mockRepo.full_name, {}); @@ -472,7 +472,7 @@ describe('platform/gitea/gitea-helper', () => { it('should construct proper query parameters', async () => { httpMock .scope(baseUrl) - .get(`/repos/${mockRepo.full_name}/issues?state=open`) + .get(`/repos/${mockRepo.full_name}/issues?state=open&type=issues`) .reply(200, [mockIssue]); const res = await ght.searchIssues(mockRepo.full_name, { diff --git a/lib/platform/gitea/gitea-helper.ts b/lib/platform/gitea/gitea-helper.ts index 60ba5f35d38a744e12bf124ee5906b5a601f97d1..120220940d5306b650714892a8bfd8070a4eb891 100644 --- a/lib/platform/gitea/gitea-helper.ts +++ b/lib/platform/gitea/gitea-helper.ts @@ -379,7 +379,7 @@ export async function searchIssues( params: IssueSearchParams, options?: GiteaHttpOptions ): Promise<Issue[]> { - const query = queryParams(params).toString(); + const query = queryParams({ ...params, type: 'issues' }).toString(); const url = `repos/${repoPath}/issues?${query}`; const res = await giteaHttp.getJson<Issue[]>(url, { ...options, diff --git a/lib/platform/gitea/index.ts b/lib/platform/gitea/index.ts index 5a394fbbf34b8bef11baccaf125b12a89df79d88..9552a8e3fe6cc42571d806a3776d30e1f52a78e6 100644 --- a/lib/platform/gitea/index.ts +++ b/lib/platform/gitea/index.ts @@ -467,7 +467,7 @@ const platform: Platform = { getPrList(): Promise<Pr[]> { if (config.prList === null) { config.prList = helper - .searchPRs(config.repository, {}, { useCache: false }) + .searchPRs(config.repository, { state: 'all' }, { useCache: false }) .then((prs) => { const prList = prs.map(toRenovatePR).filter(Boolean); logger.debug(`Retrieved ${prList.length} Pull Requests`); @@ -632,7 +632,7 @@ const platform: Platform = { getIssueList(): Promise<Issue[]> { if (config.issueList === null) { config.issueList = helper - .searchIssues(config.repository, {}, { useCache: false }) + .searchIssues(config.repository, { state: 'all' }, { useCache: false }) .then((issues) => { const issueList = issues.map(toRenovateIssue); logger.debug(`Retrieved ${issueList.length} Issues`);