Skip to content
Snippets Groups Projects
Commit ef163ba7 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

show approval

parent 47f4b434
No related branches found
No related tags found
No related merge requests found
...@@ -54,27 +54,16 @@ final class MergerequestsController extends TracToGitlab\GitlabController ...@@ -54,27 +54,16 @@ final class MergerequestsController extends TracToGitlab\GitlabController
} }
return true; return true;
// foreach (['worksforme', 'wontfix', 'Duplicate', 'invalid'] as $label) {
// if (in_array($label, $issue['labels'])) {
// return false;
// }
// }
//
// $has_version = array_reduce($issue['labels'], function ($has_version, $label) {
// return $has_version || strpos($label, 'Version::') === 0;
// }, false);
// return $has_version;
}); });
// var_dump($mrs);die; $mrs = array_map(function ($mr) {
// $mr['approvals'] = $this->gitlab->mergeRequests()->approvals(
// $issues = array_map(function ($issue) { $this->gitlabProjectId,
// $issue['studip_version'] = $this->extractVersion($issue['labels']); $mr['iid']
// $issue['mr'] = $this->fetchRelatedMergeRequest($issue['iid']); );
// return $issue; return $mr;
// }, $issues); }, $mrs);
//
usort($mrs, function ($a, $b) { usort($mrs, function ($a, $b) {
return strcmp($b['updated_at'], $a['updated_at']); return strcmp($b['updated_at'], $a['updated_at']);
}); });
......
...@@ -30,6 +30,12 @@ ...@@ -30,6 +30,12 @@
<a href="<?= htmlReady($mr['web_url']) ?>" target="_blank"> <a href="<?= htmlReady($mr['web_url']) ?>" target="_blank">
#<?= htmlReady($mr['iid']) ?>: #<?= htmlReady($mr['iid']) ?>:
<?= htmlReady($mr['title']) ?> <?= htmlReady($mr['title']) ?>
</a>
<? if ($mr['approvals']['approved']): ?>
<?= Icon::create('check-circle', Icon::ROLE_STATUS_GREEN)->asImg([
'class' => 'text-bottom',
]) ?>
<? endif; ?>
</td> </td>
<td> <td>
<? if ($mr['task_completion_status']['count'] === $mr['task_completion_status']['completed_count']): ?> <? if ($mr['task_completion_status']['count'] === $mr['task_completion_status']['completed_count']): ?>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment