| @@ 181-192 (lines=12) @@ | ||
| 178 | * |
|
| 179 | * @return \Gitonomy\Git\Commit|null |
|
| 180 | */ |
|
| 181 | public function getCommit() { |
|
| 182 | $repo = $this->getRepository(); |
|
| 183 | if($repo) { |
|
| 184 | try { |
|
| 185 | return $this->Environment()->getCommit($this->SHA); |
|
| 186 | } catch(Gitonomy\Git\Exception\ReferenceNotFoundException $ex) { |
|
| 187 | return null; |
|
| 188 | } |
|
| 189 | } |
|
| 190 | ||
| 191 | return null; |
|
| 192 | } |
|
| 193 | ||
| 194 | /** |
|
| 195 | * Get the commit URL to the commit associated with this deployment. |
|
| @@ 219-229 (lines=11) @@ | ||
| 216 | * |
|
| 217 | * @return string|null |
|
| 218 | */ |
|
| 219 | public function getCommitMessage() { |
|
| 220 | $commit = $this->getCommit(); |
|
| 221 | if($commit) { |
|
| 222 | try { |
|
| 223 | return Convert::raw2xml($this->Environment()->getCommitMessage($commit)); |
|
| 224 | } catch(Gitonomy\Git\Exception\ReferenceNotFoundException $e) { |
|
| 225 | return null; |
|
| 226 | } |
|
| 227 | } |
|
| 228 | return null; |
|
| 229 | } |
|
| 230 | ||
| 231 | /** |
|
| 232 | * Return all tags for the deployed commit. |
|