diff --git a/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubRevalidationQueue.java b/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubRevalidationQueue.java index 02ea0c4e453cd800315fa47e1a522696d92960bc..0a852e9ec4d4c6146e4ff89d08b2fc3db621844c 100644 --- a/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubRevalidationQueue.java +++ b/src/main/java/org/eclipsefoundation/git/eca/tasks/GithubRevalidationQueue.java @@ -137,8 +137,15 @@ public class GithubRevalidationQueue { // log the message so we can see what happened LOGGER.error("Error while revalidating request w/ ID {}", requestToRevalidate.getId(), e); } finally { - // whether successful or failed, update the updated field + // whether successful or failed, update the updated time field requestToRevalidate.setLastUpdated(DateTimeHelper.now()); + + // if in a closed state, we shouldn't try to revalidate again as it will never be valid + // if a PR is reopened, it should create a new event and validate anyways + if ("closed".equalsIgnoreCase(requestToRevalidate.getLastKnownState())) { + LOGGER.debug("Tracking request {} set to not revalidate as it was closed", requestToRevalidate.getId()); + requestToRevalidate.setNeedsRevalidation(false); + } // push the update with the potentially updated validation flag or error count dao.add(new RDBMSQuery<>(wrap, filters.get(GithubWebhookTracking.class)), Arrays.asList(requestToRevalidate)); }