|
@@ 1147-1155 (lines=9) @@
|
| 1144 |
|
* @param \Gitonomy\Git\Commit $commit |
| 1145 |
|
* @return string |
| 1146 |
|
*/ |
| 1147 |
|
public function getCommitMessage(\Gitonomy\Git\Commit $commit) { |
| 1148 |
|
$cachekey = $this->ID . '_message_' . $commit->getRevision(); |
| 1149 |
|
$cache = self::get_git_cache(); |
| 1150 |
|
if (!($result = $cache->load($cachekey))) { |
| 1151 |
|
$result = $commit->getMessage(); |
| 1152 |
|
$cache->save($result, $cachekey, ['gitonomy', 'message', 'project_' . $this->ID]); |
| 1153 |
|
} |
| 1154 |
|
return $result; |
| 1155 |
|
} |
| 1156 |
|
|
| 1157 |
|
/** |
| 1158 |
|
* get the commit "subject", getCommitMessage get the full message |
|
@@ 1163-1171 (lines=9) @@
|
| 1160 |
|
* @param \Gitonomy\Git\Commit $commit |
| 1161 |
|
* @return string |
| 1162 |
|
*/ |
| 1163 |
|
public function getCommitSubjectMessage(\Gitonomy\Git\Commit $commit) { |
| 1164 |
|
$cachekey = $this->ID . '_message_subject' . $commit->getRevision(); |
| 1165 |
|
$cache = self::get_git_cache(); |
| 1166 |
|
if (!($result = $cache->load($cachekey))) { |
| 1167 |
|
$result = $commit->getSubjectMessage(); |
| 1168 |
|
$cache->save($result, $cachekey, ['gitonomy', 'message', 'project_' . $this->ID]); |
| 1169 |
|
} |
| 1170 |
|
return $result; |
| 1171 |
|
} |
| 1172 |
|
|
| 1173 |
|
/** |
| 1174 |
|
* @param \Gitonomy\Git\Commit $commit |