apache / openwhisk

Apache OpenWhisk is an open source serverless cloud platform
https://openwhisk.apache.org/
Apache License 2.0
6.54k stars 1.17k forks source link

Update github package webhook trigger with sample output #240

Closed csantanapr closed 8 years ago

csantanapr commented 8 years ago

Update the docs in catalog

To add a sample JSON object what the trigger emits like

{
    "repository": {
        "tags_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/tags",
        "statuses_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/statuses/{sha}",
        "has_downloads": true,
        "blobs_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/git/blobs{/sha}",
        "git_refs_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/git/refs{/sha}",
        "issue_events_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/issues/events{/number}",
        "name": "openwhisk-github-integration",
        "has_issues": true,
        "watchers_count": 0,
        "forks": 0,
        "private": false,
        "size": 5,
        "open_issues_count": 0,
        "open_issues": 0,
        "subscribers_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/subscribers",
        "stargazers_count": 0,
        "url": "https://github.com/csantanapr/openwhisk-github-integration",
        "full_name": "csantanapr/openwhisk-github-integration",
        "releases_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/releases{/id}",
        "description": "Repository to demo openwhisk triggers and actions",
        "trees_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/git/trees{/sha}",
        "branches_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/branches{/branch}",
        "pushed_at": 1461186768,
        "git_url": "git://github.com/csantanapr/openwhisk-github-integration.git",
        "collaborators_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/collaborators{/collaborator}",
        "subscription_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/subscription",
        "languages_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/languages",
        "has_wiki": true,
        "commits_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/commits{/sha}",
        "contents_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/contents/{+path}",
        "fork": false,
        "git_tags_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/git/tags{/sha}",
        "downloads_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/downloads",
        "svn_url": "https://github.com/csantanapr/openwhisk-github-integration",
        "milestones_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/milestones{/number}",
        "id": 56718386,
        "compare_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/compare/{base}...{head}",
        "notifications_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/notifications{?since,all,participating}",
        "comments_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/comments{/number}",
        "pulls_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/pulls{/number}",
        "teams_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/teams",
        "forks_count": 0,
        "merges_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/merges",
        "stargazers": 0,
        "keys_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/keys{/key_id}",
        "deployments_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/deployments",
        "master_branch": "master",
        "contributors_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/contributors",
        "forks_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/forks",
        "clone_url": "https://github.com/csantanapr/openwhisk-github-integration.git",
        "created_at": 1461183654,
        "hooks_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/hooks",
        "ssh_url": "git@github.com:csantanapr/openwhisk-github-integration.git",
        "owner": {
            "email": "csantana23@gmail.com",
            "name": "csantanapr"
        },
        "html_url": "https://github.com/csantanapr/openwhisk-github-integration",
        "archive_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/{archive_format}{/ref}",
        "default_branch": "master",
        "updated_at": "2016-04-20T20:20:54Z",
        "issues_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/issues{/number}",
        "assignees_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/assignees{/user}",
        "events_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/events",
        "watchers": 0,
        "issue_comment_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/issues/comments{/number}",
        "labels_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/labels{/name}",
        "has_pages": false,
        "git_commits_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/git/commits{/sha}",
        "stargazers_url": "https://api.github.com/repos/csantanapr/openwhisk-github-integration/stargazers"
    },
    "before": "cd9acb00210e7badf191bf7243d6572259d972f5",
    "pusher": {
        "email": "csantana23@gmail.com",
        "name": "csantanapr"
    },
    "ref": "refs/heads/master",
    "commits": [
        {
            "author": {
                "username": "csantanapr",
                "email": "csantana@us.ibm.com",
                "name": "Carlos Santana"
            },
            "timestamp": "2016-04-20T17:12:42-04:00",
            "url": "https://github.com/csantanapr/openwhisk-github-integration/commit/b8a6922f88d1a83999a02f083de0674ba9183141",
            "tree_id": "01f437c196b3c7561c49d30a7856cecdf399d2e9",
            "removed": [],
            "modified": [
                "README.md"
            ],
            "added": [],
            "id": "b8a6922f88d1a83999a02f083de0674ba9183141",
            "distinct": true,
            "message": "update readme to trigger event",
            "committer": {
                "username": "csantanapr",
                "email": "csantana@us.ibm.com",
                "name": "Carlos Santana"
            }
        }
    ],
    "after": "b8a6922f88d1a83999a02f083de0674ba9183141",
    "forced": false,
    "sender": {
        "gists_url": "https://api.github.com/users/csantanapr/gists{/gist_id}",
        "organizations_url": "https://api.github.com/users/csantanapr/orgs",
        "gravatar_id": "",
        "url": "https://api.github.com/users/csantanapr",
        "repos_url": "https://api.github.com/users/csantanapr/repos",
        "received_events_url": "https://api.github.com/users/csantanapr/received_events",
        "id": 1094878,
        "following_url": "https://api.github.com/users/csantanapr/following{/other_user}",
        "site_admin": false,
        "subscriptions_url": "https://api.github.com/users/csantanapr/subscriptions",
        "starred_url": "https://api.github.com/users/csantanapr/starred{/owner}{/repo}",
        "html_url": "https://github.com/csantanapr",
        "login": "csantanapr",
        "type": "User",
        "events_url": "https://api.github.com/users/csantanapr/events{/privacy}",
        "avatar_url": "https://avatars.githubusercontent.com/u/1094878?v=3",
        "followers_url": "https://api.github.com/users/csantanapr/followers"
    },
    "head_commit": {
        "author": {
            "username": "csantanapr",
            "email": "csantana@us.ibm.com",
            "name": "Carlos Santana"
        },
        "timestamp": "2016-04-20T17:12:42-04:00",
        "url": "https://github.com/csantanapr/openwhisk-github-integration/commit/b8a6922f88d1a83999a02f083de0674ba9183141",
        "tree_id": "01f437c196b3c7561c49d30a7856cecdf399d2e9",
        "removed": [],
        "modified": [
            "README.md"
        ],
        "added": [],
        "id": "b8a6922f88d1a83999a02f083de0674ba9183141",
        "distinct": true,
        "message": "update readme to trigger event",
        "committer": {
            "username": "csantanapr",
            "email": "csantana@us.ibm.com",
            "name": "Carlos Santana"
        }
    },
    "compare": "https://github.com/csantanapr/openwhisk-github-integration/compare/cd9acb00210e...b8a6922f88d1",
    "deleted": false,
    "created": false
}
csantanapr commented 8 years ago

Actually it's better to point to the Github docs on what the payload of the webhook looks like