Add command to publish release on JIRA
[MAILPOET-1884]
This commit is contained in:
committed by
Rostislav Wolný
parent
f63733abc5
commit
8b4bf19bdd
@ -662,6 +662,13 @@ class RoboFile extends \Robo\Tasks {
|
||||
$slack_notifier->notify($version['name'], $changelog[1], $version['id']);
|
||||
}
|
||||
|
||||
public function releasePublishJira($version = null) {
|
||||
$version = $this->nextReleaseVersion($version);
|
||||
$jira_controller = $this->createJiraController();
|
||||
$jira_version = $jira_controller->releaseVersion($version);
|
||||
$this->say("JIRA version '$jira_version[name]' was released.");
|
||||
}
|
||||
|
||||
protected function validateVersion($version) {
|
||||
if (!\MailPoetTasks\Release\VersionHelper::validateVersion($version)) {
|
||||
$this->yell('Incorrect version format', 40, 'red');
|
||||
|
@ -85,6 +85,16 @@ class JiraController {
|
||||
return json_decode($response->getBody()->getContents(), true);
|
||||
}
|
||||
|
||||
function releaseVersion($version_name) {
|
||||
$version = $this->getVersion($version_name);
|
||||
$response = $this->http_client->put("version/$version[id]", [
|
||||
'json' => [
|
||||
'released' => true,
|
||||
],
|
||||
]);
|
||||
return json_decode($response->getBody()->getContents(), true);
|
||||
}
|
||||
|
||||
function getIssuesDataForVersion($version) {
|
||||
$changelog_id = self::CHANGELOG_FIELD_ID;
|
||||
$release_note_id = self::RELEASENOTE_FIELD_ID;
|
||||
|
Reference in New Issue
Block a user