After having observed the PullRequestPoller in action for a bit, I've noticed some weird behavior. Say a very old open PR A exists, and there is a closed PR B that is newer. Then on the first round, PR A will be returned and maxUpdatedAt will be set to updatedAt of PR A. On the second round, this will cause PR B to be returned.
While not a huge deal on its own, it can interact with other behavior to make things weird. I think a simple way to mitigate this is to limit how far back maxUpdatedAt can be set to. A conservative value would be based on the CLOSED_PR_AGE_LIMIT constant.
While not a huge deal on its own, it can interact with other behavior to make things weird. I think a simple way to mitigate this is to limit how far back maxUpdatedAt can be set to. A conservative value would be based on the CLOSED_PR_AGE_LIMIT constant.