Branch: allow access to description

fixes #2604
This commit is contained in:
Thomas Gelf 2022-09-21 07:49:44 +02:00
parent c91ff3303c
commit 79f8ca26ef
3 changed files with 25 additions and 1 deletions

View File

@ -22,6 +22,9 @@ v1.10.0 (unreleased)
* BREAKING: configuration baskets no longer contain originalId (#2549)
* FEATURE: exporting/snapshot-logic has been centralized (#2549)
### Configuration Branches
* FEATURE: merge comments can now be proposed (#2604)
### REST API
* FIX: addressing service templates by name has been fixed (#2487)
* FEATURE: Stack traces can now be requested (#2570)

View File

@ -50,6 +50,7 @@ class Branch
$self->branchUuid = Uuid::fromBytes(Db\DbUtil::binaryResult($row->uuid));
$self->name = $row->branch_name;
$self->owner = $row->owner;
$self->description = $row->description;
$self->tsMergeRequest = $row->ts_merge_request;
if (isset($row->cnt_activities)) {
$self->cntActivities = $row->cnt_activities;
@ -181,6 +182,25 @@ class Branch
return $this->name;
}
/**
* @since v1.10.0
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @since v1.10.0
* @param ?string $description
* @return void
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/

View File

@ -118,7 +118,8 @@ class BranchStore
public function setReadyForMerge(Branch $branch)
{
$update = [
'ts_merge_request' => (int) floor(microtime(true) * 1000000)
'ts_merge_request' => (int) floor(microtime(true) * 1000000),
'description' => $branch->getDescription(),
];
$name = $branch->getName();