static protected function redmineFetchLoop(Fedora $fedora,
                                               bool $progressBar,
                                               string $endpoint, string $param): array {
        if ($progressBar) {
            $pb = new ProgressBar(null, 10);
        }
        $class   = get_called_class();
        $objects = [];
        $offset  = 0;
        do {
            $flag = false;
            $url  = RC::get('redmineApiUrl') . '/' . $endpoint . '.json?offset=' . $offset . '&' . $param;
            $data = file_get_contents($url);
            if ($data) {
                $data = json_decode($data);
                foreach ($data->$endpoint as $i) {
                    $objects[] = new $class($fedora, $class::redmineId2repoId($i->id), (array) $i);
                    if ($progressBar) {
                        $pb->next();
                    }
                }
                $flag   = $data->offset + $data->limit < $data->total_count;
                $offset += $data->limit;
            }
        } while ($flag);
        if ($progressBar) {
            $pb->finish();
        }
        return $objects;
    }