Skip to content

Commit b1d445b

Browse files
committed
Changed merge() to merged() as is very misleading
1 parent b9dc07f commit b1d445b

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

lib/Gitlab/Model/MergeRequest.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,29 @@ public function update(array $params)
5757
return MergeRequest::fromArray($this->getClient(), $this->project, $data);
5858
}
5959

60-
public function close()
60+
public function close($comment = null)
6161
{
62-
return $this->update(array('state_event' => 'close'));
62+
if ($comment) {
63+
$this->addComment($comment);
64+
}
65+
66+
return $this->update(array(
67+
'state_event' => 'close'
68+
));
6369
}
6470

65-
public function open()
71+
public function reopen()
6672
{
67-
return $this->update(array('state_event' => 'reopen'));
73+
return $this->update(array(
74+
'state_event' => 'reopen'
75+
));
6876
}
6977

70-
public function merge()
78+
public function merged()
7179
{
72-
return $this->update(array('state_event' => 'merge'));
80+
return $this->update(array(
81+
'state_event' => 'merge'
82+
));
7383
}
7484

7585
public function addComment($note)

0 commit comments

Comments
 (0)