RFR: 1594: Convert rest of bots polling PRs and Issues to use new pollers

Erik Helin ehelin at openjdk.org
Mon Nov 7 09:26:15 UTC 2022

On Wed, 2 Nov 2022 17:19:52 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

> The new PullRequestPoller has now been in use in the PullRequestBot for a while, and hopefully most of the kinks have been ironed out. I think it's time to convert the rest of the bots that poll PRs (and the CSRIssueBot that polls Issues) to use the new pollers. 
> The conversion is pretty straight forward. In the case of the CSRBots, they were missing the retry callback, so I added that functionality in line with other bots.
> The new factory tests needed to be modified slightly, as the PullRequestPoller calls to the Forge/Host object of a repository during initialization, so we need a TestHost instance there instead of `null`.
> I deliberately left out two bots here, the JEPBot and the TestInfoBot. The TestInfoBot is handled separately already in #1411. For the JEPBot, I think it needs a general overhaul. In the end it should function more or less the same as the CSRBot, but I'm still not sure that the CSRBot is where I want it to be.

Looks good, the code using `PullRequestPoller` turned out much nicer 👍

I feel like I'm always comment on naming, feel free to ignore such suggestions, they are just suggestions 😃 In this case I would have renamed `PullRequestPoller.lastBatchHandled` to `PullRequestPoller.ignore(List<PullRequest> prs)` and the bots would typically call `poller.ignore(prs);`


Marked as reviewed by ehelin (Reviewer).

PR: https://git.openjdk.org/skara/pull/1412

More information about the skara-dev mailing list