Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
Cleanup github repos if they are deleted in Git Org (#80)
Browse files Browse the repository at this point in the history
* Cleanup github repos if they are deleted in Git Org

* Cleanup github repos if they are deleted in Git Org

* Cleanup github repos if they are deleted in Git Org
  • Loading branch information
nireeshT authored Apr 30, 2022
1 parent e075878 commit 16eaf74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</description>
<url>https://github.com/Hygieia/${repository.name}</url>
<packaging>jar</packaging>
<version>3.3.11-SNAPSHOT</version>
<version>3.3.12-SNAPSHOT</version>


<parent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,11 @@ public void collectProcess(Collector collector, List<GitHubRepo> reposToCollect)
long endSleeping = System.currentTimeMillis();
LOG.info(String.format("Waking up after [%d] sec, at: %s", (endSleeping - startSleeping) / 1000L, new DateTime(endSleeping).toString("yyyy-MM-dd hh:mm:ss.SSa")));
}
if (hc.getStatusCode() == HttpStatus.NOT_FOUND) {
LOG.error(String.format("Received 404 HttpStatusCodeException from GitHub. Status code=%s ResponseBody=%s", hc.getStatusCode(), hc.getResponseBodyAsString()));
LOG.info(String.format("Deleting Github repo from collector-items=%s ", repoUrl));
gitHubRepoRepository.delete(repo.getId());
}
repo.getErrors().add(error);
} catch (RestClientException | MalformedURLException ex) {
LOG.error(String.format("Error fetching commits for:%s", repo.getRepoUrl()), ex);
Expand Down

0 comments on commit 16eaf74

Please sign in to comment.