psalm/shepherd

query re: bitbucket / other repo providers

Opened this issue · 3 comments

How feasible is it to add support for other repo providers to shepherd, either in a self-hosted context or a pr context?

I'd love to use Shepherd for repos hosted on BitBucket.

@orklah only github is currently supported:

if (!empty($payload['build']['CI_REPO_OWNER'])

        if (!empty($payload['build']['CI_REPO_OWNER'])
            && !empty($payload['build']['CI_REPO_NAME'])
            && empty($payload['build']['CI_PR_REPO_OWNER'])
            && empty($payload['build']['CI_PR_REPO_NAME'])
        ) {
            $repository = new Model\GithubRepository(
                $payload['build']['CI_REPO_OWNER'],
                $payload['build']['CI_REPO_NAME']
            );

            if (($payload['build']['CI_BRANCH'] ?? '') === GithubApi::fetchDefaultBranch($repository)) {
                /** @var string $date */
                $date = date('Y-m-d H:i:s', $payload['git']['head']['date'] ?? date('U'));
                GithubData::setRepositoryForMasterCommit($git_commit, $repository, $date);
            }
        }

        self::savePsalmData(
            $git_commit,
            $payload['issues'],
            $payload['coverage'][0],
            $payload['coverage'][1],
            $payload['level'] ?? null
        );