Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for "Page build" hook #85

Open
ghost opened this issue Jul 10, 2014 · 2 comments
Open

Add support for "Page build" hook #85

ghost opened this issue Jul 10, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 10, 2014

Currently, Notifico returns a HTTP 500 response for the Page build hook.

@Dav1dde
Copy link
Contributor

Dav1dde commented Jul 10, 2014

This appears to be a new event, can you post a sample payload, I can't seem to find documentation on the hook.

@Mikaela
Copy link

Mikaela commented Jul 10, 2014

I think that this has always existed and is used for Jekyll notifications.

request

Request URL: http://n.tkte.ch/h/<filtered>
Request method: POST
content-type: application/json
Expect: 
User-Agent: GitHub Hookshot 4734d0d
X-GitHub-Delivery: a427c680-003e-11e4-9cc6-8d18638d6002
X-GitHub-Event: page_build

payload

{
  "id": 8095672,
  "build": {
    "url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/pages/builds/8095672",
    "status": "built",
    "error": {
      "message": null
    },
    "pusher": {
      "login": "Mkaysi",
      "id": 831184,
      "avatar_url": "https://avatars.githubusercontent.com/u/831184?",
      "gravatar_id": "469841b73c4bb76d9598b97f1a0c39d2",
      "url": "https://api.github.com/users/Mkaysi",
      "html_url": "https://github.com/Mkaysi",
      "followers_url": "https://api.github.com/users/Mkaysi/followers",
      "following_url": "https://api.github.com/users/Mkaysi/following{/other_user}",
      "gists_url": "https://api.github.com/users/Mkaysi/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/Mkaysi/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/Mkaysi/subscriptions",
      "organizations_url": "https://api.github.com/users/Mkaysi/orgs",
      "repos_url": "https://api.github.com/users/Mkaysi/repos",
      "events_url": "https://api.github.com/users/Mkaysi/events{/privacy}",
      "received_events_url": "https://api.github.com/users/Mkaysi/received_events",
      "type": "User",
      "site_admin": false
    },
    "commit": "2cf74b82e5e1d15e29259917677a2aaa406e2d70",
    "duration": 1883,
    "created_at": "2014-06-30T10:09:35Z",
    "updated_at": "2014-06-30T10:09:37Z"
  },
  "repository": {
    "id": 19966395,
    "name": "mkaysi.github.io",
    "full_name": "Mkaysi/mkaysi.github.io",
    "owner": {
      "login": "Mkaysi",
      "id": 831184,
      "avatar_url": "https://avatars.githubusercontent.com/u/831184?",
      "gravatar_id": "469841b73c4bb76d9598b97f1a0c39d2",
      "url": "https://api.github.com/users/Mkaysi",
      "html_url": "https://github.com/Mkaysi",
      "followers_url": "https://api.github.com/users/Mkaysi/followers",
      "following_url": "https://api.github.com/users/Mkaysi/following{/other_user}",
      "gists_url": "https://api.github.com/users/Mkaysi/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/Mkaysi/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/Mkaysi/subscriptions",
      "organizations_url": "https://api.github.com/users/Mkaysi/orgs",
      "repos_url": "https://api.github.com/users/Mkaysi/repos",
      "events_url": "https://api.github.com/users/Mkaysi/events{/privacy}",
      "received_events_url": "https://api.github.com/users/Mkaysi/received_events",
      "type": "User",
      "site_admin": false
    },
    "private": false,
    "html_url": "https://github.com/Mkaysi/mkaysi.github.io",
    "description": "Source of mkaysi.github.io - my homepage which fill hopefully be better than last time.",
    "fork": false,
    "url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io",
    "forks_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/forks",
    "keys_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/teams",
    "hooks_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/hooks",
    "issue_events_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/issues/events{/number}",
    "events_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/events",
    "assignees_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/assignees{/user}",
    "branches_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/branches{/branch}",
    "tags_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/tags",
    "blobs_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/languages",
    "stargazers_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/stargazers",
    "contributors_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/contributors",
    "subscribers_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/subscribers",
    "subscription_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/subscription",
    "commits_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/issues/comments/{number}",
    "contents_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/contents/{+path}",
    "compare_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/merges",
    "archive_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/downloads",
    "issues_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/issues{/number}",
    "pulls_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/labels{/name}",
    "releases_url": "https://api.github.com/repos/Mkaysi/mkaysi.github.io/releases{/id}",
    "created_at": "2014-05-20T03:28:07Z",
    "updated_at": "2014-06-26T15:59:54Z",
    "pushed_at": "2014-06-30T10:09:35Z",
    "git_url": "git://github.com/Mkaysi/mkaysi.github.io.git",
    "ssh_url": "[email protected]:Mkaysi/mkaysi.github.io.git",
    "clone_url": "https://github.com/Mkaysi/mkaysi.github.io.git",
    "svn_url": "https://github.com/Mkaysi/mkaysi.github.io",
    "homepage": "https://mkaysi.github.io/",
    "size": 7077,
    "stargazers_count": 1,
    "watchers_count": 1,
    "language": "PHP",
    "has_issues": true,
    "has_downloads": true,
    "has_wiki": true,
    "forks_count": 1,
    "mirror_url": null,
    "open_issues_count": 9,
    "forks": 1,
    "open_issues": 9,
    "watchers": 1,
    "default_branch": "master"
  },
  "sender": {
    "login": "Mkaysi",
    "id": 831184,
    "avatar_url": "https://avatars.githubusercontent.com/u/831184?",
    "gravatar_id": "469841b73c4bb76d9598b97f1a0c39d2",
    "url": "https://api.github.com/users/Mkaysi",
    "html_url": "https://github.com/Mkaysi",
    "followers_url": "https://api.github.com/users/Mkaysi/followers",
    "following_url": "https://api.github.com/users/Mkaysi/following{/other_user}",
    "gists_url": "https://api.github.com/users/Mkaysi/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/Mkaysi/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/Mkaysi/subscriptions",
    "organizations_url": "https://api.github.com/users/Mkaysi/orgs",
    "repos_url": "https://api.github.com/users/Mkaysi/repos",
    "events_url": "https://api.github.com/users/Mkaysi/events{/privacy}",
    "received_events_url": "https://api.github.com/users/Mkaysi/received_events",
    "type": "User",
    "site_admin": false
  }
}

response

headers

Content-Length: 3395
Content-Type: text/html; charset=utf-8
Date: Mon, 30 Jun 2014 10:09:38 GMT
Server: gunicorn/0.17.2

body

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Notifico!</title>
    <meta name="description" content="">
    <meta name="author" content="">

    <link href="/css/bootstrap.css?v=3" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>


    <link href="/css/bootstrap-responsive.min.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-11145163-15']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>

  </head>

  <body>
    <div class="wrapper">
      <div class="nav-container">
        <div class="container">
          <div class="navbar nav-top">
            <div class="navbar-inner">
              <a class="brand" href="/">Notifico</a>
              <ul class="nav pull-right">
                <li class="

">
                  <a href="/"><i class="icon-home"></i> Home</a>
                </li>

                <li>
                  <a href="/u/login">
                    <i class="icon-signin"></i> Login
                  </a>
                </li>
                <li>
                  <a href="/u/register">
                    <i class="icon-plus"></i> Register
                  </a>
                </li>

              </ul>
            </div>
          </div>
        </div>
      </div>
      <div class="container content">

<div class="row-fluid content_main">
  <div class="span12 content_page">



    <div class="contents">

  <h3>Whoops! - 500</h3>
  <div class="section-content">
    <p>
        Something's gone terribly wrong! The monkeys have been dispatched to
        resolve it as soon as possible.
    </p>

    <ul class="inline">
        <li>
            <a href="/">
                &larr; Home
            </a>
        </li>
    </ul>
  </div>

    </div>
  </div>
</div>

      </div>
    </div>
    <div class="footer">
      <div class="container">
        <div class="row-fluid">
          <div class="span12 footer-copyright">
            Copyright &copy; <span class="current_year">2013</span> Tyler Kennedy
          </div>
        </div>
      </div>
    </div>

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="/js/jquery.min.js"><\/script>')</script>
    <script src="/js/bootstrap.js"></script>

    <script>
      $(function(){
          // Focus on the username box, but only if
          // the user hasn't already focused on something else.
          if($(document.activeElement).is('body')) {
              $('.focus').focus();
          }

          $('.current_year').text(new Date().getFullYear());
      });
    </script>

  </body>
</html>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants