| @@ 168-179 (lines=12) @@ | ||
| 165 | * |
|
| 166 | * @return \Gitonomy\Git\Commit|null |
|
| 167 | */ |
|
| 168 | public function getCommit() { |
|
| 169 | $repo = $this->getRepository(); |
|
| 170 | if($repo) { |
|
| 171 | try { |
|
| 172 | return $this->Environment()->getCommit($this->SHA); |
|
| 173 | } catch(Gitonomy\Git\Exception\ReferenceNotFoundException $ex) { |
|
| 174 | return null; |
|
| 175 | } |
|
| 176 | } |
|
| 177 | ||
| 178 | return null; |
|
| 179 | } |
|
| 180 | ||
| 181 | /** |
|
| 182 | * Get the commit URL to the commit associated with this deployment. |
|
| @@ 206-216 (lines=11) @@ | ||
| 203 | * |
|
| 204 | * @return string|null |
|
| 205 | */ |
|
| 206 | public function getCommitMessage() { |
|
| 207 | $commit = $this->getCommit(); |
|
| 208 | if($commit) { |
|
| 209 | try { |
|
| 210 | return Convert::raw2xml($this->Environment()->getCommitMessage($commit)); |
|
| 211 | } catch(Gitonomy\Git\Exception\ReferenceNotFoundException $e) { |
|
| 212 | return null; |
|
| 213 | } |
|
| 214 | } |
|
| 215 | return null; |
|
| 216 | } |
|
| 217 | ||
| 218 | /** |
|
| 219 | * Return all tags for the deployed commit. |
|