ework-web 0.10.63 → 0.10.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/giteaApi.ts +1 -1
- package/src/index.ts +2 -2
package/package.json
CHANGED
package/src/giteaApi.ts
CHANGED
|
@@ -153,7 +153,7 @@ export async function handleGiteaApi(
|
|
|
153
153
|
const limitRaw = Number(url.searchParams.get("limit") ?? 50);
|
|
154
154
|
const limit = Number.isFinite(limitRaw) && limitRaw > 0 ? Math.min(limitRaw, 200) : 50;
|
|
155
155
|
try {
|
|
156
|
-
const rows = await listAllIssues({ q, state, limit, viewerLogin: user.login, viewerIsAdmin: user.is_admin === 1 });
|
|
156
|
+
const rows = await listAllIssues({ q, state, limit, viewerLogin: user.login, viewerIsAdmin: caller.is_admin === 1 && user.is_admin === 1 });
|
|
157
157
|
const body = [];
|
|
158
158
|
for (const row of rows) {
|
|
159
159
|
const project = await getProject(row.project_owner, row.project_name);
|
package/src/index.ts
CHANGED
|
@@ -2260,8 +2260,8 @@ async function handle(req: Request, url: URL, ip: string, ctx: { authed: boolean
|
|
|
2260
2260
|
const dispatchCfg = await getConfigAll();
|
|
2261
2261
|
const dispatchOff = dispatchCfg[`dispatchOff:${owner}/${repo}`] === "1";
|
|
2262
2262
|
const globalDispatchOff = dispatchCfg["dispatchEnabled"] === "false";
|
|
2263
|
-
const
|
|
2264
|
-
const processingCount =
|
|
2263
|
+
const running = await getRunningSessionsForProject(`${owner}/${repo}`);
|
|
2264
|
+
const processingCount = new Set(running.map((r) => r.issueNumber)).size;
|
|
2265
2265
|
return html(buildProjectAiPage(project, dispatchOff, globalDispatchOff, processingCount).html);
|
|
2266
2266
|
}
|
|
2267
2267
|
|