# -*- coding: utf-8 -*-
'''
Created on 2016年10月21日

@author: hustcc
'''

github = '''
{
    "ref": "refs/heads/master",
    "before": "a505ee7559ff0a64480d0a73e36f8d3ce3dc117a",
    "after": "f79c8445fdf5eab00ff33485e47474e0961072a7",
    "created": false,
    "deleted": false,
    "forced": false,
    "base_ref": null,
    "compare": "https://github.com/hustcc/placeholder.js/compare/a505ee7559ff...f79c8445fdf5",
    "commits": [
        {
            "id": "f79c8445fdf5eab00ff33485e47474e0961072a7",
            "distinct": true,
            "message": "modify default font",
            "timestamp": "2015-12-30T10:22:05+08:00",
            "url": "https://github.com/hustcc/placeholder.js/commit/f79c8445fdf5eab00ff33485e47474e0961072a7",
            "author": {
                "name": "hustcc",
                "email": "i@hust.cc",
                "username": "hustcc"
            },
            "committer": {
                "name": "hustcc",
                "email": "i@hust.cc",
                "username": "hustcc"
            },
            "added": [],
            "removed": [],
            "modified": [
                "server/placeholder.class.php"
            ]
        }
    ],
    "head_commit": {
        "id": "f79c8445fdf5eab00ff33485e47474e0961072a7",
        "distinct": true,
        "message": "modify default font",
        "timestamp": "2015-12-30T10:22:05+08:00",
        "url": "https://github.com/hustcc/placeholder.js/commit/f79c8445fdf5eab00ff33485e47474e0961072a7",
        "author": {
            "name": "hustcc",
            "email": "i@hust.cc",
            "username": "hustcc"
        },
        "committer": {
            "name": "hustcc",
            "email": "i@hust.cc",
            "username": "hustcc"
        },
        "added": [],
        "removed": [],
        "modified": [
            "server/placeholder.class.php"
        ]
    },
    "repository": {
        "id": 48161277,
        "name": "git-webhook",
        "full_name": "hustcc/placeholder.js",
        "owner": {
            "name": "hustcc",
            "email": "i@atool.org"
        },
        "private": false,
        "html_url": "https://github.com/hustcc/placeholder.js",
        "description": ":zap:<1kb. Client-side library generate image placeholders. Do not depends on jQuery or Other.",
        "fork": false,
        "url": "https://github.com/hustcc/placeholder.js",
        "forks_url": "https://api.github.com/repos/hustcc/placeholder.js/forks",
        "keys_url": "https://api.github.com/repos/hustcc/placeholder.js/keys{/key_id}",
        "collaborators_url": "https://api.github.com/repos/hustcc/placeholder.js/collaborators{/collaborator}",
        "teams_url": "https://api.github.com/repos/hustcc/placeholder.js/teams",
        "hooks_url": "https://api.github.com/repos/hustcc/placeholder.js/hooks",
        "issue_events_url": "https://api.github.com/repos/hustcc/placeholder.js/issues/events{/number}",
        "events_url": "https://api.github.com/repos/hustcc/placeholder.js/events",
        "assignees_url": "https://api.github.com/repos/hustcc/placeholder.js/assignees{/user}",
        "branches_url": "https://api.github.com/repos/hustcc/placeholder.js/branches{/branch}",
        "tags_url": "https://api.github.com/repos/hustcc/placeholder.js/tags",
        "blobs_url": "https://api.github.com/repos/hustcc/placeholder.js/git/blobs{/sha}",
        "git_tags_url": "https://api.github.com/repos/hustcc/placeholder.js/git/tags{/sha}",
        "git_refs_url": "https://api.github.com/repos/hustcc/placeholder.js/git/refs{/sha}",
        "trees_url": "https://api.github.com/repos/hustcc/placeholder.js/git/trees{/sha}",
        "statuses_url": "https://api.github.com/repos/hustcc/placeholder.js/statuses/{sha}",
        "languages_url": "https://api.github.com/repos/hustcc/placeholder.js/languages",
        "stargazers_url": "https://api.github.com/repos/hustcc/placeholder.js/stargazers",
        "contributors_url": "https://api.github.com/repos/hustcc/placeholder.js/contributors",
        "subscribers_url": "https://api.github.com/repos/hustcc/placeholder.js/subscribers",
        "subscription_url": "https://api.github.com/repos/hustcc/placeholder.js/subscription",
        "commits_url": "https://api.github.com/repos/hustcc/placeholder.js/commits{/sha}",
        "git_commits_url": "https://api.github.com/repos/hustcc/placeholder.js/git/commits{/sha}",
        "comments_url": "https://api.github.com/repos/hustcc/placeholder.js/comments{/number}",
        "issue_comment_url": "https://api.github.com/repos/hustcc/placeholder.js/issues/comments{/number}",
        "contents_url": "https://api.github.com/repos/hustcc/placeholder.js/contents/{+path}",
        "compare_url": "https://api.github.com/repos/hustcc/placeholder.js/compare/{base}...{head}",
        "merges_url": "https://api.github.com/repos/hustcc/placeholder.js/merges",
        "archive_url": "https://api.github.com/repos/hustcc/placeholder.js/{archive_format}{/ref}",
        "downloads_url": "https://api.github.com/repos/hustcc/placeholder.js/downloads",
        "issues_url": "https://api.github.com/repos/hustcc/placeholder.js/issues{/number}",
        "pulls_url": "https://api.github.com/repos/hustcc/placeholder.js/pulls{/number}",
        "milestones_url": "https://api.github.com/repos/hustcc/placeholder.js/milestones{/number}",
        "notifications_url": "https://api.github.com/repos/hustcc/placeholder.js/notifications{?since,all,participating}",
        "labels_url": "https://api.github.com/repos/hustcc/placeholder.js/labels{/name}",
        "releases_url": "https://api.github.com/repos/hustcc/placeholder.js/releases{/id}",
        "created_at": 1450339947,
        "updated_at": "2015-12-30T02:11:45Z",
        "pushed_at": 1451442132,
        "git_url": "git://github.com/hustcc/placeholder.js.git",
        "ssh_url": "git@github.com:hustcc/placeholder.js.git",
        "clone_url": "https://github.com/hustcc/placeholder.js.git",
        "svn_url": "https://github.com/hustcc/placeholder.js",
        "homepage": "http://placeholder.cn",
        "size": 376,
        "stargazers_count": 121,
        "watchers_count": 121,
        "language": "HTML",
        "has_issues": true,
        "has_downloads": true,
        "has_wiki": true,
        "has_pages": false,
        "forks_count": 16,
        "mirror_url": null,
        "open_issues_count": 1,
        "forks": 16,
        "open_issues": 1,
        "watchers": 121,
        "default_branch": "master",
        "stargazers": 121,
        "master_branch": "master"
    },
    "pusher": {
        "name": "hustcc",
        "email": "i@atool.org"
    },
    "sender": {
        "login": "hustcc",
        "id": 7856674,
        "avatar_url": "https://avatars.githubusercontent.com/u/7856674?v=3",
        "gravatar_id": "",
        "url": "https://api.github.com/users/hustcc",
        "html_url": "https://github.com/hustcc",
        "followers_url": "https://api.github.com/users/hustcc/followers",
        "following_url": "https://api.github.com/users/hustcc/following{/other_user}",
        "gists_url": "https://api.github.com/users/hustcc/gists{/gist_id}",
        "starred_url": "https://api.github.com/users/hustcc/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/hustcc/subscriptions",
        "organizations_url": "https://api.github.com/users/hustcc/orgs",
        "repos_url": "https://api.github.com/users/hustcc/repos",
        "events_url": "https://api.github.com/users/hustcc/events{/privacy}",
        "received_events_url": "https://api.github.com/users/hustcc/received_events",
        "type": "User",
        "site_admin": false
    }
}
'''

gitlab = '''
{
    "object_kind": "push",
    "before": "2883a17f7a69c35b2a591c63d9581e634d7c3d0e",
    "after": "d5bb5e2fbafb75c37d201de8d0b7f50e2db6b04e",
    "ref": "refs/heads/master",
    "checkout_sha": "d5bb5e2fbafb75c37d201de8d0b7f50e2db6b04e",
    "message": null,
    "user_id": 41,
    "user_name": "王志伟",
    "user_email": "i@hust.cc",
    "project_id": 10,
    "repository": {
        "name": "git-webhook",
        "url": "ssh://git@hust.cc:32200/i/code-mess.git",
        "description": "一些杂碎简单的代码，自己写起来麻烦，搜索也能搜索到，收集起来，提高效率",
        "homepage": "http://hust.cc/i/code-mess",
        "git_http_url": "http://hust.cc/i/code-mess.git",
        "git_ssh_url": "ssh://git@hust.cc:32200/i/code-mess.git",
        "visibility_level": 20
    },
    "commits": [
        {
            "id": "d5bb5e2fbafb75c37d201de8d0b7f50e2db6b04e",
            "message": "update md",
            "timestamp": "2015-02-13T14:36:08+08:00",
            "url": "http://hust.cc/i/code-mess/commit/d5bb5e2fbafb75c37d201de8d0b7f50e2db6b04e",
            "author": {
                "name": "hustcc",
                "email": "i@hust.cc"
            }
        },
        {
            "id": "689ffb6dd35ed9035264ed4155fd4ba8340fcf4d",
            "message": "增加之前做过微信易信公众号开发代码",
            "timestamp": "2015-02-13T14:31:19+08:00",
            "url": "http://hust.cc/i/code-mess/commit/689ffb6dd35ed9035264ed4155fd4ba8340fcf4d",
            "author": {
                "name": "hustcc",
                "email": "i@hust.cc"
            }
        },
        {
            "id": "2883a17f7a69c35b2a591c63d9581e634d7c3d0e",
            "message": "加了最近的一些代码，也许大家有用",
            "timestamp": "2015-02-13T13:52:12+08:00",
            "url": "http://hust.cc/i/code-mess/commit/2883a17f7a69c35b2a591c63d9581e634d7c3d0e",
            "author": {
                "name": "hustcc",
                "email": "i@hust.cc"
            }
        }
    ],
    "total_commits_count": 3
}
'''

gitosc = '''
{
    "password": "hod20x4hnkecy63", 
    "hook_name": "push_hooks", 
    "push_data": {
        "before": "26c9fb3533d1c63e3b822d58a8831b1caf6d9cd7", 
        "after": "219aa13d45276a5cae7436ecc66053da67ec2a2d", 
        "ref": "refs/heads/master", 
        "user_id": 449815, 
        "user_name": "gitlabu6d4bu8bd5u8d26u53f72", 
        "user": {
            "id": 449815, 
            "email": "gitlabtest_2@gitlab.com", 
            "name": "gitlabu6d4bu8bd5u8d26u53f72", 
            "time": "2015-11-06T14:51:55+08:00"
        }, 
        "repository": {
            "name": "test_gitosc_20151106145021322", 
            "url": "git@git.oschina.net:gitlab_test_1/test_gitosc_20151106145021322.git", 
            "description": "test_gitosc_20151106145021322 testting", 
            "homepage": "http://git.oschina.net/gitlab_test_1/test_gitosc_20151106145021322"
        }, 
        "commits": [
            {
                "id": "219aa13d45276a5cae7436ecc66053da67ec2a2d", 
                "message": "commit_access_test", 
                "timestamp": "2015-11-06T14:50:47+08:00", 
                "url": "http://git.oschina.net/gitlab_test_1/test_gitosc_20151106145021322/commit/219aa13d45276a5cae7436ecc66053da67ec2a2d", 
                "author": {
                    "name": "gitlab_test_2", 
                    "email": "gitlabtest_2@gitlab.com", 
                    "time": "2015-11-06T14:50:47+08:00"
                }
            }
        ], 
        "total_commits_count": 1, 
        "commits_more_than_ten": false
    }
}
'''

gogs = '''
{
    "sender": {
        "username": "hustcc",
        "avatar_url": "https://secure.gravatar.com/avatar/89b00603405ed96c59206c65a4f2358e",
        "id": 1,
        "full_name": "",
        "email": "wzwahl36@qq.com"
    },
    "repository": {
        "fork": false,
        "website": "",
        "open_issues_count": 0,
        "description": "test_webhook",
        "default_branch": "master",
        "created_at": "2016-10-28T15:11:35+08:00",
        "forks_count": 0,
        "html_url": "http://127.0.0.1:3000/hustcc/test_webhook",
        "private": false,
        "updated_at": "2016-10-28T15:11:36+08:00",
        "stars_count": 0,
        "clone_url": "http://127.0.0.1:3000/hustcc/test_webhook.git",
        "watchers_count": 1,
        "full_name": "hustcc/test_webhook",
        "ssh_url": "hzwangzhiwei@127.0.0.1:hustcc/test_webhook.git",
        "owner": {
            "username": "hustcc",
            "avatar_url": "https://secure.gravatar.com/avatar/89b00603405ed96c59206c65a4f2358e",
            "id": 1,
            "full_name": "",
            "email": "wzwahl36@qq.com"
        },
        "id": 1,
        "name": "test_webhook"
    },
    "pusher": {
        "username": "hustcc",
        "avatar_url": "https://secure.gravatar.com/avatar/89b00603405ed96c59206c65a4f2358e",
        "id": 1,
        "full_name": "",
        "email": "wzwahl36@qq.com"
    },
    "commits": [
        {
            "committer": {
                "username": "hustcc",
                "name": "hustcc",
                "email": "wzwahl36@qq.com"
            },
            "author": {
                "username": "hustcc",
                "name": "hustcc",
                "email": "wzwahl36@qq.com"
            },
            "url": "http://127.0.0.1:3000/hustcc/test_webhook/commit/331293f63684868be6b27da0104e35e3564059ad",
            "timestamp": "2016-10-28T15:15:21+08:00",
            "message": "test.txt",
            "id": "331293f63684868be6b27da0104e35e3564059ad"
        }
    ],
    "after": "331293f63684868be6b27da0104e35e3564059ad",
    "compare_url": "http://127.0.0.1:3000/hustcc/test_webhook/compare/b51fdb16830e2206a528aa00e778fb0163506c05...331293f63684868be6b27da0104e35e3564059ad",
    "secret": "",
    "ref": "refs/heads/master",
    "before": "b51fdb16830e2206a528aa00e778fb0163506c05"
}'''
