本文整理汇总了PHP中Branch::get_next_commit方法的典型用法代码示例。如果您正苦于以下问题:PHP Branch::get_next_commit方法的具体用法?PHP Branch::get_next_commit怎么用?PHP Branch::get_next_commit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Branch
的用法示例。
在下文中一共展示了Branch::get_next_commit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: colorize_status
$branch_name = "master";
}
// branch select box
start_form("", "get");
echo "<p>Showing log of branch: ";
show_select_box($all_branches, "branch", $branch_name, "submit()");
end_form();
$branch = new Branch("{$branch_name}");
$start_with = !empty($_GET["start"]) ? $_GET["start"] : 0;
$branch->set_line($start_with);
show_navigation($start_with);
// table of commits
start_table();
array_to_table_row(true, array("<b>Commit Link</b>", "<b>Status</b>", "<b>Full Log</b>", "<b>Timestamp</b>", "<b>Author</b>", "<b>Commit Message</b>"));
for ($i = 0; $i < SHOW_ITEMS; $i++) {
$last_commit = $branch->get_next_commit();
if ($last_commit->get_name() == "") {
array_to_table_row(array("=== End of log ==="));
break;
}
$last_commit->read_log();
$last_commit->read_info();
array_to_table_row($i % 2 == 1, array(get_href(substr($last_commit->get_name(), 0, 10) . "...", GITHUB_LINK . $last_commit->get_name(), true), colorize_status($last_commit->get_status()), $last_commit->was_tested() ? get_href("Log", $last_commit->get_log_file(), true) : "N/A", $last_commit->get_timestamp(), $last_commit->get_author(), substr($last_commit->get_message(), 0, 30) . (strlen($last_commit->get_message()) > 30 ? "..." : "")));
}
end_table();
show_navigation($start_with);
show_footer();
// HTML ends here
function colorize_status($status)
{
switch (substr(strtolower($status), 0, 1)) {