[copr] master: Refactor checking for unfinished actions into a separate function (we will use it on multiple places) (d94d26a)