Github Webhook Integration returning 400
Closed this issue · 2 comments
ethernomad commented
{"repository":{"owner":{"name":["This field is required."]}},"head_commit":["This field is required."]}
Payload:
{
"zen": "It's not fully shipped until it's fast.",
"hook_id": 9852399,
"hook": {
"type": "Repository",
"id": 9852399,
"name": "web",
"active": true,
"events": [
"push"
],
"config": {
"content_type": "json",
"insecure_ssl": "0",
"url": "https://www.4byte.directory/api/v1/receive-github-webhook/"
},
"updated_at": "2016-09-10T02:36:16Z",
"created_at": "2016-09-10T02:36:16Z",
"url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/hooks/9852399",
"test_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/hooks/9852399/test",
"ping_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/hooks/9852399/pings",
"last_response": {
"code": null,
"status": "unused",
"message": null
}
},
"repository": {
"id": 46935750,
"name": "blobstore-ethereum",
"full_name": "bluedroplet/blobstore-ethereum",
"owner": {
"login": "bluedroplet",
"id": 1980379,
"avatar_url": "https://avatars.githubusercontent.com/u/1980379?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/bluedroplet",
"html_url": "https://github.com/bluedroplet",
"followers_url": "https://api.github.com/users/bluedroplet/followers",
"following_url": "https://api.github.com/users/bluedroplet/following{/other_user}",
"gists_url": "https://api.github.com/users/bluedroplet/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bluedroplet/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bluedroplet/subscriptions",
"organizations_url": "https://api.github.com/users/bluedroplet/orgs",
"repos_url": "https://api.github.com/users/bluedroplet/repos",
"events_url": "https://api.github.com/users/bluedroplet/events{/privacy}",
"received_events_url": "https://api.github.com/users/bluedroplet/received_events",
"type": "Organization",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/bluedroplet/blobstore-ethereum",
"description": "Stores arbitrary-sizes blobs of data in Ethereum's transaction log.",
"fork": false,
"url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum",
"forks_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/forks",
"keys_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/teams",
"hooks_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/hooks",
"issue_events_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/issues/events{/number}",
"events_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/events",
"assignees_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/assignees{/user}",
"branches_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/branches{/branch}",
"tags_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/tags",
"blobs_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/statuses/{sha}",
"languages_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/languages",
"stargazers_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/stargazers",
"contributors_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/contributors",
"subscribers_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/subscribers",
"subscription_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/subscription",
"commits_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/contents/{+path}",
"compare_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/merges",
"archive_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/downloads",
"issues_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/issues{/number}",
"pulls_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/pulls{/number}",
"milestones_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/milestones{/number}",
"notifications_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/labels{/name}",
"releases_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/releases{/id}",
"deployments_url": "https://api.github.com/repos/bluedroplet/blobstore-ethereum/deployments",
"created_at": "2015-11-26T15:59:07Z",
"updated_at": "2016-05-30T19:58:53Z",
"pushed_at": "2016-09-08T15:01:30Z",
"git_url": "git://github.com/bluedroplet/blobstore-ethereum.git",
"ssh_url": "git@github.com:bluedroplet/blobstore-ethereum.git",
"clone_url": "https://github.com/bluedroplet/blobstore-ethereum.git",
"svn_url": "https://github.com/bluedroplet/blobstore-ethereum",
"homepage": null,
"size": 53,
"stargazers_count": 0,
"watchers_count": 0,
"language": "JavaScript",
"has_issues": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"open_issues_count": 0,
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "master"
},
"sender": {
"login": "ethernomad",
"id": 161566,
"avatar_url": "https://avatars.githubusercontent.com/u/161566?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/ethernomad",
"html_url": "https://github.com/ethernomad",
"followers_url": "https://api.github.com/users/ethernomad/followers",
"following_url": "https://api.github.com/users/ethernomad/following{/other_user}",
"gists_url": "https://api.github.com/users/ethernomad/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ethernomad/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ethernomad/subscriptions",
"organizations_url": "https://api.github.com/users/ethernomad/orgs",
"repos_url": "https://api.github.com/users/ethernomad/repos",
"events_url": "https://api.github.com/users/ethernomad/events{/privacy}",
"received_events_url": "https://api.github.com/users/ethernomad/received_events",
"type": "User",
"site_admin": false
}
}
pipermerriam commented
Looks like github changed the payload of their webhook?
https://github.com/pipermerriam/ethereum-function-signature-registry/blob/master/func_sig_registry/registry/serializers.py#L120 expects there to be a name
field in the repository.owner
object which I'm sure was present at some point because the webhook worked recently.
Looks like I need to update that serializer to use the repository.owner.login
field instead.
pipermerriam commented
@ethernomad this should now be fixed. Can you confirm that your webhook is now working?