Bug Fix:Destroy Repos that We No Longer Have Credentials For (#10056)

This commit is contained in:
Molly Struve 2020-08-28 14:06:38 -05:00 committed by GitHub
parent 8a44eb9421
commit 92b9af0261
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ module GithubRepos
info_hash: fetched_repo.to_hash,
)
repo.user&.touch(:github_repos_updated_at)
rescue Github::Errors::NotFound
rescue Github::Errors::NotFound, Github::Errors::Unauthorized
repo.destroy
end
end