Fix Shop project

This commit is contained in:
Pavel Dohnal
2022-06-20 15:42:03 +02:00
committed by Veljko V
parent 57937c71a0
commit a32af0c103
2 changed files with 9 additions and 2 deletions

View File

@@ -867,7 +867,7 @@ class RoboFile extends \Robo\Tasks {
$logins = $freePluginGithubController->calculateReviewers();
$io->progressAdvance();
$shopGithubController = $this->createGitHubController('shop');
$shopGithubController = $this->createGitHubController(\MailPoetTasks\Release\GitHubController::PROJECT_SHOP);
$loginsShop = $shopGithubController->calculateReviewers();
$io->progressFinish();

View File

@@ -8,6 +8,7 @@ use GuzzleHttp\Exception\ClientException;
class GitHubController {
const PROJECT_MAILPOET = 'MAILPOET';
const PROJECT_PREMIUM = 'PREMIUM';
const PROJECT_SHOP = 'SHOP';
const FREE_ZIP_FILENAME = 'mailpoet.zip';
const PREMIUM_ZIP_FILENAME = 'mailpoet-premium.zip';
@@ -275,6 +276,12 @@ class GitHubController {
}
private function getGithubPathByProject(string $project): string {
return urlencode($project === self::PROJECT_MAILPOET ? 'mailpoet' : 'mailpoet-premium');
$url = 'mailpoet-premium';
if ($project === self::PROJECT_MAILPOET) {
$url = 'mailpoet';
} elseif ($project === self::PROJECT_SHOP) {
$url = 'shop';
}
return urlencode($url);
}
}