mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-10-21 07:01:16 +02:00
fix: preserve probe errors and complete refresh alerts
This commit is contained in:
1 parent
2b20abe0a5
commit
9a2707d4b8
6 files changed
+102
-11
No files matched your search
@@ -628,6 +628,14 @@ export default class Repository {
|
||||
|
||||
/** Update the repository if a new commit exists. */
|
||||
async updateIfNeeded(opt?: { force: boolean }): Promise<void> {
|
||||
try { await this.refreshIfNeeded(opt); }
|
||||
catch (error) {
|
||||
void notifyOwnerAccessProblem(this.owner.id, error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
private async refreshIfNeeded(opt?: { force: boolean }): Promise<void> {
|
||||
this.assertNotArchived();
|
||||
if (
|
||||
this._model.options.expirationMode !== "never" &&
|
||||
@@ -658,9 +666,6 @@ export default class Repository {
|
||||
repo: this.source.data.repoName,
|
||||
repositoryID: this.model.source.repositoryId,
|
||||
force: true,
|
||||
}).catch(error => {
|
||||
void notifyOwnerAccessProblem(this.owner.id, error);
|
||||
throw error;
|
||||
});
|
||||
|
||||
// update the repository name if it has changed. Persist it
|
||||
|
||||
Reference in new issue
Block a user