Open SignpostMarv opened 2 years ago
I'd love to use Shepherd for repos hosted on BitBucket.
Not perfectly sure what you mean by that, but the host for shepherd can actually be changed: https://github.com/vimeo/psalm/blob/68d88c546b286a5fbdabe4728f6be9dd1db0dbe0/src/Psalm/Config.php#L541 through options or env variables: https://github.com/vimeo/psalm/blob/386aa27f4c0d54919528145833e7d460ec4dac84/src/Psalm/Internal/Cli/Psalm.php#L304
Aside from that, Shepherd is just a plugin at Psalm's level so you could build your own https://github.com/vimeo/psalm/blob/3e837cabd047e3508543378d291094826f0772e8/src/Psalm/Plugin/Shepherd.php#L37
@orklah only github is currently supported: https://github.com/psalm/shepherd/blob/c19f58c6a380883617cbb03d84775e868665b2e6/src/PsalmData.php#L19
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
);
How feasible is it to add support for other repo providers to shepherd, either in a self-hosted context or a pr context?