Created
December 18, 2015 11:51
-
-
Save flodolo/177c9a95397663896064 to your computer and use it in GitHub Desktop.
Temp Transvision
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Transvision; | |
$output = ''; | |
foreach ($changelog as $release => $changes) { | |
// Add release title and initialize variables | |
$output .= $release_title($release); | |
$new_section = $empty_release = true; | |
$section = ''; | |
foreach ($changes as $change => $attributes) { | |
if ($section != $attributes['section'][0]) { | |
$new_section = true; | |
$section = $attributes['section'][0]; | |
} | |
if ($new_section) { | |
if (! $empty_release) { | |
$output .= "</ul>\n"; | |
} | |
$output .= '<h3>' . $get_sections($section) . "</h3>\n<ul>\n"; | |
$new_section = false; | |
$empty_release = false; | |
} | |
$output .= " <li>"; | |
$output .= isset($attributes['type']) ? $relnotes($attributes['type'][0]) . ' ' : ''; | |
$output .= isset($attributes['issues']) ? $issue($attributes['issues']) : ''; | |
$output .= isset($attributes['commit']) ? $commit($attributes['commit']) : ''; | |
$output .= $attributes['message'][0]; | |
$output .= isset($attributes['authors']) ? $authors($attributes['authors']) : ''; | |
$output .= "</li>\n"; | |
} | |
$output .= "</ul>\n"; | |
$output .= $github_link($release); | |
$section = ''; | |
} | |
printf($output); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment