fix: send one access alert per repository until owner action

This commit is contained in:
Thomas Durieux committed 2026-10-09 07:38:52 +00:00
1 parent c55efd14ed
commit d519a0a9bb
19 files changed
+172 -116

No files matched your search

+2 -2
View File
@@ -225,7 +225,7 @@ export default class Repository {
const streamed = this.model.source.type !== "Zip";
const source = this.source;
const files = await source.getFiles(opt.progress).catch(error => {
void notifyOwnerAccessProblem(this.owner.id, error);
void notifyOwnerAccessProblem(this.owner.id, error, { kind: "repository", id: String(this.model._id) });
throw error;
});
const sourceWithTruncation = source as unknown as { truncatedFolderList?: string[] };
@@ -630,7 +630,7 @@ export default class Repository {
async updateIfNeeded(opt?: { force: boolean }): Promise<void> {
try { await this.refreshIfNeeded(opt); }
catch (error) {
void notifyOwnerAccessProblem(this.owner.id, error);
void notifyOwnerAccessProblem(this.owner.id, error, { kind: "repository", id: String(this.model._id) });
throw error;
}
}