diff --git a/RoboFile.php b/RoboFile.php index 499c413b25..28b7b43557 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -685,18 +685,15 @@ class RoboFile extends \Robo\Tasks { } protected function getChangelogController() { - return \MailPoetTasks\Release\ChangelogController::createWithJiraCredentials( - getenv('WP_JIRA_TOKEN'), - getenv('WP_JIRA_USER'), - \MailPoetTasks\Release\JiraController::PROJECT_MAILPOET, + return new \MailPoetTasks\Release\ChangelogController( + $this->createJiraController(), __DIR__ . '/readme.txt' ); } protected function getReleaseVersionController() { - return \MailPoetTasks\Release\ReleaseVersionController::createWithJiraCredentials( - getenv('WP_JIRA_TOKEN'), - getenv('WP_JIRA_USER'), + return new \MailPoetTasks\Release\ReleaseVersionController( + $this->createJiraController(), \MailPoetTasks\Release\JiraController::PROJECT_MAILPOET ); } diff --git a/tasks/release/ChangelogController.php b/tasks/release/ChangelogController.php index ccd7f84d26..4484608584 100644 --- a/tasks/release/ChangelogController.php +++ b/tasks/release/ChangelogController.php @@ -18,10 +18,6 @@ class ChangelogController { $this->readme_file = $readme_file; } - static function createWithJiraCredentials($token, $user, $project, $readme_file) { - return new self(new JiraController($token, $user, $project), $readme_file); - } - function update($version_name = null) { $changelog_data = $this->get($version_name); $this->updateReadme($changelog_data[0], $changelog_data[1]); diff --git a/tasks/release/ReleaseVersionController.php b/tasks/release/ReleaseVersionController.php index 71de6620b9..e0d4a4a532 100644 --- a/tasks/release/ReleaseVersionController.php +++ b/tasks/release/ReleaseVersionController.php @@ -15,10 +15,6 @@ class ReleaseVersionController { $this->project = $project; } - static function createWithJiraCredentials($token, $user, $project) { - return new self(new JiraController($token, $user, $project), $project); - } - function assignVersionToCompletedTickets($version = null) { $version = $this->ensureCorrectVersion($version); if (!$version) {