| @@ 182-193 (lines=12) @@ | ||
| 179 | * |
|
| 180 | * @return \Gitonomy\Git\Commit|null |
|
| 181 | */ |
|
| 182 | public function getCommit() { |
|
| 183 | $repo = $this->getRepository(); |
|
| 184 | if($repo) { |
|
| 185 | try { |
|
| 186 | return $this->Environment()->getCommit($this->SHA); |
|
| 187 | } catch(Gitonomy\Git\Exception\ReferenceNotFoundException $ex) { |
|
| 188 | return null; |
|
| 189 | } |
|
| 190 | } |
|
| 191 | ||
| 192 | return null; |
|
| 193 | } |
|
| 194 | ||
| 195 | /** |
|
| 196 | * Get the commit URL to the commit associated with this deployment. |
|
| @@ 220-230 (lines=11) @@ | ||
| 217 | * |
|
| 218 | * @return string|null |
|
| 219 | */ |
|
| 220 | public function getCommitMessage() { |
|
| 221 | $commit = $this->getCommit(); |
|
| 222 | if($commit) { |
|
| 223 | try { |
|
| 224 | return Convert::raw2xml($this->Environment()->getCommitMessage($commit)); |
|
| 225 | } catch(Gitonomy\Git\Exception\ReferenceNotFoundException $e) { |
|
| 226 | return null; |
|
| 227 | } |
|
| 228 | } |
|
| 229 | return null; |
|
| 230 | } |
|
| 231 | ||
| 232 | /** |
|
| 233 | * Gets the commit message. |
|
| @@ 237-247 (lines=11) @@ | ||
| 234 | * |
|
| 235 | * @return string|null |
|
| 236 | */ |
|
| 237 | public function getCommitSubjectMessage() { |
|
| 238 | $commit = $this->getCommit(); |
|
| 239 | if($commit) { |
|
| 240 | try { |
|
| 241 | return Convert::raw2xml($this->Environment()->getCommitSubjectMessage($commit)); |
|
| 242 | } catch(Gitonomy\Git\Exception\ReferenceNotFoundException $e) { |
|
| 243 | return null; |
|
| 244 | } |
|
| 245 | } |
|
| 246 | return null; |
|
| 247 | } |
|
| 248 | ||
| 249 | /** |
|
| 250 | * Return all tags for the deployed commit. |
|