예제 #1
0
 public static function webhookRegister($id)
 {
     $repo = \Apigenci\Model::githubRepo($id)->name;
     $user = \Apigenci\Model::githubLogin();
     $json = \Apigenci\Model\Github::apiPost("repos/{$user}/{$repo}/hooks", trim('
         {
             "name": "web",
             "active": true,
             "events": [
               "push"
             ],
             "config": {
               "url": "https://apigen.ci/webhook",
               "content_type": "json",
               "insecure_ssl": "0"
             }
         }
     '));
 }
예제 #2
0
<!DOCTYPE HTML>
<?php 
$uri = $_SERVER['REQUEST_URI'];
$pages = [];
$pages['/'] = \Apigenci\Model::githubLogin() ?: 'Home';
if (\Session::has('token')) {
    #$pages['/orgs'] = 'Organizations';
}
$pages['/docs'] = 'Documentation';
#if (\Session::has('token')) {
#    $pages['/account'] = 'Account';
#}
?>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="csrf-token" content="{{ csrf_token() }}">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>@yield('title')</title>
        <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
        <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
        <script src="//code.jquery.com/jquery.js"></script>
        <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
        <script>