Say which modules wait for a person's push, and announce the files a merge deleted (hq ADR 0236)
With a gate on the first machine and a rollback after it, a module's build rolls out by default. The ones kept back say why: the network path a rollback could not cross, the providers every consumer on a machine drops with, and the stores holding the photos. A merge's deleted files are announced, so a module whose manifest went is forgotten rather than asked to build (the public-acme plan failure).
This commit is contained in:
+11
-4
@@ -256,18 +256,25 @@ export class GiteaClient {
|
||||
* whose own files moved was not rebuilt (novox/hq issue 252). Read until a page comes back short; past
|
||||
* `most` files the list is cut and says so, and the mesh then rebuilds everything built from the
|
||||
* repository, the safe direction. */
|
||||
async listPullFiles(owner: string, repo: string, index: number, most = 3000): Promise<{ paths: string[]; truncated: boolean }> {
|
||||
/** Every file a pull request changes, and which of them it deleted: a module whose manifest the merge
|
||||
* deleted is gone from its source, and the mesh forgets it rather than asking its build (novox/hq ADR
|
||||
* 0236). The forge says `deleted`; `removed` is read the same. */
|
||||
async listPullFiles(owner: string, repo: string, index: number, most = 3000): Promise<{ paths: string[]; removed: string[]; truncated: boolean }> {
|
||||
const paths: string[] = [];
|
||||
const removed: string[] = [];
|
||||
let pageSize = 0;
|
||||
for (let page = 1; ; page++) {
|
||||
const files = (await this.request<any[]>(`/repos/${owner}/${repo}/pulls/${index}/files?limit=50&page=${page}`)) ?? [];
|
||||
if (page === 1) pageSize = files.length;
|
||||
for (const f of files) {
|
||||
const name = String(f?.filename ?? "");
|
||||
if (name !== "") paths.push(name);
|
||||
if (name === "") continue;
|
||||
paths.push(name);
|
||||
const status = String(f?.status ?? "");
|
||||
if (status === "deleted" || status === "removed") removed.push(name);
|
||||
}
|
||||
if (files.length === 0 || files.length < pageSize) return { paths, truncated: false };
|
||||
if (paths.length >= most) return { paths, truncated: true };
|
||||
if (files.length === 0 || files.length < pageSize) return { paths, removed, truncated: false };
|
||||
if (paths.length >= most) return { paths, removed, truncated: true };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user