mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-11-18 10:04:17 +01:00
Merge pull request #967 from tdurieux/fix/deployment-and-repository-errors
fix: guard GitHub App deployments and distinguish removed repositories
This commit is contained in:
9 files changed
+118
-14
No files matched your search
@@ -561,12 +561,10 @@ export default class Repository {
|
||||
await this.markExpired();
|
||||
}
|
||||
}
|
||||
if (
|
||||
this.status == RepositoryStatus.EXPIRED ||
|
||||
this.status == RepositoryStatus.EXPIRING ||
|
||||
this.status == RepositoryStatus.REMOVING ||
|
||||
this.status == RepositoryStatus.REMOVED
|
||||
) {
|
||||
if (this.status == RepositoryStatus.REMOVING || this.status == RepositoryStatus.REMOVED) {
|
||||
throw new AnonymousError("is_removed", { object: this, httpStatus: 410 });
|
||||
}
|
||||
if (this.status == RepositoryStatus.EXPIRED || this.status == RepositoryStatus.EXPIRING) {
|
||||
throw new AnonymousError("repository_expired", {
|
||||
object: this,
|
||||
httpStatus: 410,
|
||||
|
||||
Reference in new issue
Block a user