feat(gitea-provider): auto-paginate Gitea repository and organization listing; respect explicit page option and default perPage to 50
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-02-24 - 2.5.0 - feat(gitea-provider)
|
||||
auto-paginate Gitea repository and organization listing; respect explicit page option and default perPage to 50
|
||||
|
||||
- getProjects and getGroups now auto-fetch all pages when opts.page is not provided
|
||||
- When opts.page is provided, the provider respects it and does not auto-paginate
|
||||
- Defaults perPage to 50 for paginated requests
|
||||
- Dependency @design.estate/dees-catalog bumped from ^3.43.0 to ^3.43.3
|
||||
|
||||
## 2026-02-24 - 2.4.0 - feat(opsserver)
|
||||
serve embedded frontend bundle from committed ts_bundled instead of using external dist_serve directory
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@api.global/typedrequest-interfaces": "^3.0.19",
|
||||
"@design.estate/dees-catalog": "^3.43.0",
|
||||
"@design.estate/dees-catalog": "^3.43.3",
|
||||
"@design.estate/dees-element": "^2.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/gitops',
|
||||
version: '2.4.0',
|
||||
version: '2.5.0',
|
||||
description: 'GitOps management app for Gitea and GitLab - manage secrets, browse projects, view CI pipelines, and stream build logs'
|
||||
}
|
||||
|
||||
@@ -18,15 +18,47 @@ export class GiteaProvider extends BaseProvider {
|
||||
}
|
||||
|
||||
async getProjects(opts?: IListOptions): Promise<interfaces.data.IProject[]> {
|
||||
// If caller explicitly requests a specific page, respect it (no auto-pagination)
|
||||
if (opts?.page) {
|
||||
const repos = await this.client.getRepos(opts);
|
||||
return repos.map((r) => this.mapProject(r));
|
||||
}
|
||||
|
||||
const allRepos: plugins.giteaClient.IGiteaRepository[] = [];
|
||||
const perPage = opts?.perPage || 50;
|
||||
let page = 1;
|
||||
|
||||
while (true) {
|
||||
const repos = await this.client.getRepos({ ...opts, page, perPage });
|
||||
allRepos.push(...repos);
|
||||
if (repos.length < perPage) break;
|
||||
page++;
|
||||
}
|
||||
|
||||
return allRepos.map((r) => this.mapProject(r));
|
||||
}
|
||||
|
||||
async getGroups(opts?: IListOptions): Promise<interfaces.data.IGroup[]> {
|
||||
// If caller explicitly requests a specific page, respect it (no auto-pagination)
|
||||
if (opts?.page) {
|
||||
const orgs = await this.client.getOrgs(opts);
|
||||
return orgs.map((o) => this.mapGroup(o));
|
||||
}
|
||||
|
||||
const allOrgs: plugins.giteaClient.IGiteaOrganization[] = [];
|
||||
const perPage = opts?.perPage || 50;
|
||||
let page = 1;
|
||||
|
||||
while (true) {
|
||||
const orgs = await this.client.getOrgs({ ...opts, page, perPage });
|
||||
allOrgs.push(...orgs);
|
||||
if (orgs.length < perPage) break;
|
||||
page++;
|
||||
}
|
||||
|
||||
return allOrgs.map((o) => this.mapGroup(o));
|
||||
}
|
||||
|
||||
// --- Project Secrets ---
|
||||
|
||||
async getProjectSecrets(projectId: string): Promise<interfaces.data.ISecret[]> {
|
||||
|
||||
1400
ts_bundled/bundle.js
1400
ts_bundled/bundle.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/gitops',
|
||||
version: '2.4.0',
|
||||
version: '2.5.0',
|
||||
description: 'GitOps management app for Gitea and GitLab - manage secrets, browse projects, view CI pipelines, and stream build logs'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user