| @@ 196-207 (lines=12) @@ | ||
| 193 | * |
|
| 194 | * @return \Gitonomy\Git\Commit|null |
|
| 195 | */ |
|
| 196 | public function getCommit() { |
|
| 197 | $repo = $this->getRepository(); |
|
| 198 | if($repo) { |
|
| 199 | try { |
|
| 200 | return $this->Environment()->getCommit($this->SHA); |
|
| 201 | } catch(Gitonomy\Git\Exception\ReferenceNotFoundException $ex) { |
|
| 202 | return null; |
|
| 203 | } |
|
| 204 | } |
|
| 205 | ||
| 206 | return null; |
|
| 207 | } |
|
| 208 | ||
| 209 | /** |
|
| 210 | * Get the commit URL to the commit associated with this deployment. |
|
| @@ 234-244 (lines=11) @@ | ||
| 231 | * |
|
| 232 | * @return string|null |
|
| 233 | */ |
|
| 234 | public function getCommitMessage() { |
|
| 235 | $commit = $this->getCommit(); |
|
| 236 | if($commit) { |
|
| 237 | try { |
|
| 238 | return Convert::raw2xml($this->Environment()->getCommitMessage($commit)); |
|
| 239 | } catch(Gitonomy\Git\Exception\ReferenceNotFoundException $e) { |
|
| 240 | return null; |
|
| 241 | } |
|
| 242 | } |
|
| 243 | return null; |
|
| 244 | } |
|
| 245 | ||
| 246 | /** |
|
| 247 | * Return all tags for the deployed commit. |
|