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
Implements pull_request web hook to health checks and client side events #255
Conversation
converts PR into an issue payload and sends up the event as an issue event. Seems to work fine Related to #598
Looking good! You might consider adding an IssueEventJob that handles the PR See here: https://developer.github.com/v3/activity/events/types/#pullrequestevent |
@discorick are you cool with a simple guard statement
|
What is
What do we do with |
I'm not exactly sure, I think GH fires synchronize when you push new code to an existing PR |
👍 So there's not a 100% overlap between the issue and PR responses. Of particular interest may be the lack of |
ok, i'll do some deeper testing might have to adds some hacks to work around this temporarily |
On a random hunch, I found that PR @discorick, any other thoughts on this? It seems solid to me (here's creating/merging a PR that closes another issue): |
Hmm, testing the creation of a PR would be an interesting case as well. |
Note huboard-testing/spooky-octo-pug#24 appearing in Backlog at the beginning of the screen cap. |
Ah, I see, cause of the lack of Toast I missed it. |
No toast when normal issues are created, either. Kind of surprised I've never noticed that before. |
Are y'all sure it doesn't wipe out the labels array when new messages come up? |
Interesting... So I do see a few unexpected behaviors with labels:
It would be handy if our event payloads included the GitHub event URL, to aid in troubleshooting. PR payload without [
{
"channel": "\/huboard-testing\/spooky-octo-pug",
"data": {
"meta": {
"action": "issue_labeled",
"timestamp": "2016-04-13T14:48:59Z",
"correlationId": null,
"user": {
"login": "dahlbyk",
"id": 133987,
"avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/133987?v=3",
"gravatar_id": "",
"url": "https:\/\/api.github.com\/users\/dahlbyk",
"html_url": "https:\/\/github.com\/dahlbyk",
"followers_url": "https:\/\/api.github.com\/users\/dahlbyk\/followers",
"following_url": "https:\/\/api.github.com\/users\/dahlbyk\/following{\/other_user}",
"gists_url": "https:\/\/api.github.com\/users\/dahlbyk\/gists{\/gist_id}",
"starred_url": "https:\/\/api.github.com\/users\/dahlbyk\/starred{\/owner}{\/repo}",
"subscriptions_url": "https:\/\/api.github.com\/users\/dahlbyk\/subscriptions",
"organizations_url": "https:\/\/api.github.com\/users\/dahlbyk\/orgs",
"repos_url": "https:\/\/api.github.com\/users\/dahlbyk\/repos",
"events_url": "https:\/\/api.github.com\/users\/dahlbyk\/events{\/privacy}",
"received_events_url": "https:\/\/api.github.com\/users\/dahlbyk\/received_events",
"type": "User",
"site_admin": false
},
"identifier": 26,
"repo_full_name": "huboard-testing\/spooky-octo-pug"
},
"payload": {
"issue": {
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/pulls\/26",
"id": 66330676,
"html_url": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug\/pull\/26",
"diff_url": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug\/pull\/26.diff",
"patch_url": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug\/pull\/26.patch",
"issue_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/26",
"number": 26,
"state": "open",
"locked": false,
"title": "Update README.md",
"user": {
"login": "dahlbyk",
"id": 133987,
"avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/133987?v=3",
"gravatar_id": "",
"url": "https:\/\/api.github.com\/users\/dahlbyk",
"html_url": "https:\/\/github.com\/dahlbyk",
"followers_url": "https:\/\/api.github.com\/users\/dahlbyk\/followers",
"following_url": "https:\/\/api.github.com\/users\/dahlbyk\/following{\/other_user}",
"gists_url": "https:\/\/api.github.com\/users\/dahlbyk\/gists{\/gist_id}",
"starred_url": "https:\/\/api.github.com\/users\/dahlbyk\/starred{\/owner}{\/repo}",
"subscriptions_url": "https:\/\/api.github.com\/users\/dahlbyk\/subscriptions",
"organizations_url": "https:\/\/api.github.com\/users\/dahlbyk\/orgs",
"repos_url": "https:\/\/api.github.com\/users\/dahlbyk\/repos",
"events_url": "https:\/\/api.github.com\/users\/dahlbyk\/events{\/privacy}",
"received_events_url": "https:\/\/api.github.com\/users\/dahlbyk\/received_events",
"type": "User",
"site_admin": false
},
"body": "Closes #25 \r\n\r\n<!---\r\n@huboard:{\"order\":1.5,\"milestone_order\":26,\"custom_state\":\"\"}\n-->\r\n",
"created_at": "2016-04-13T14:28:44Z",
"updated_at": "2016-04-13T14:48:59Z",
"closed_at": null,
"merged_at": null,
"merge_commit_sha": "6182080e9ae4c51afceac87229255601500a45ea",
"assignee": null,
"milestone": null,
"commits_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/pulls\/26\/commits",
"review_comments_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/pulls\/26\/comments",
"review_comment_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/pulls\/comments{\/number}",
"comments_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/26\/comments",
"statuses_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/statuses\/7efdd2701a4aa28e9e1e507d0cecf3d10e4d1e30",
"head": {
"label": "huboard-testing:dahlbyk-patch-2",
"ref": "dahlbyk-patch-2",
"sha": "7efdd2701a4aa28e9e1e507d0cecf3d10e4d1e30",
"user": {
"login": "huboard-testing",
"id": 9469949,
"avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/9469949?v=3",
"gravatar_id": "",
"url": "https:\/\/api.github.com\/users\/huboard-testing",
"html_url": "https:\/\/github.com\/huboard-testing",
"followers_url": "https:\/\/api.github.com\/users\/huboard-testing\/followers",
"following_url": "https:\/\/api.github.com\/users\/huboard-testing\/following{\/other_user}",
"gists_url": "https:\/\/api.github.com\/users\/huboard-testing\/gists{\/gist_id}",
"starred_url": "https:\/\/api.github.com\/users\/huboard-testing\/starred{\/owner}{\/repo}",
"subscriptions_url": "https:\/\/api.github.com\/users\/huboard-testing\/subscriptions",
"organizations_url": "https:\/\/api.github.com\/users\/huboard-testing\/orgs",
"repos_url": "https:\/\/api.github.com\/users\/huboard-testing\/repos",
"events_url": "https:\/\/api.github.com\/users\/huboard-testing\/events{\/privacy}",
"received_events_url": "https:\/\/api.github.com\/users\/huboard-testing\/received_events",
"type": "Organization",
"site_admin": false
},
"repo": {
"id": 26025028,
"name": "spooky-octo-pug",
"full_name": "huboard-testing\/spooky-octo-pug",
"owner": {
"login": "huboard-testing",
"id": 9469949,
"avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/9469949?v=3",
"gravatar_id": "",
"url": "https:\/\/api.github.com\/users\/huboard-testing",
"html_url": "https:\/\/github.com\/huboard-testing",
"followers_url": "https:\/\/api.github.com\/users\/huboard-testing\/followers",
"following_url": "https:\/\/api.github.com\/users\/huboard-testing\/following{\/other_user}",
"gists_url": "https:\/\/api.github.com\/users\/huboard-testing\/gists{\/gist_id}",
"starred_url": "https:\/\/api.github.com\/users\/huboard-testing\/starred{\/owner}{\/repo}",
"subscriptions_url": "https:\/\/api.github.com\/users\/huboard-testing\/subscriptions",
"organizations_url": "https:\/\/api.github.com\/users\/huboard-testing\/orgs",
"repos_url": "https:\/\/api.github.com\/users\/huboard-testing\/repos",
"events_url": "https:\/\/api.github.com\/users\/huboard-testing\/events{\/privacy}",
"received_events_url": "https:\/\/api.github.com\/users\/huboard-testing\/received_events",
"type": "Organization",
"site_admin": false
},
"private": false,
"html_url": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug",
"description": "",
"fork": false,
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug",
"forks_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/forks",
"keys_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/keys{\/key_id}",
"collaborators_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/collaborators{\/collaborator}",
"teams_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/teams",
"hooks_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/hooks",
"issue_events_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/events{\/number}",
"events_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/events",
"assignees_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/assignees{\/user}",
"branches_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/branches{\/branch}",
"tags_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/tags",
"blobs_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/git\/blobs{\/sha}",
"git_tags_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/git\/tags{\/sha}",
"git_refs_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/git\/refs{\/sha}",
"trees_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/git\/trees{\/sha}",
"statuses_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/statuses\/{sha}",
"languages_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/languages",
"stargazers_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/stargazers",
"contributors_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/contributors",
"subscribers_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/subscribers",
"subscription_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/subscription",
"commits_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/commits{\/sha}",
"git_commits_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/git\/commits{\/sha}",
"comments_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/comments{\/number}",
"issue_comment_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/comments{\/number}",
"contents_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/contents\/{+path}",
"compare_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/compare\/{base}...{head}",
"merges_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/merges",
"archive_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/{archive_format}{\/ref}",
"downloads_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/downloads",
"issues_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues{\/number}",
"pulls_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/pulls{\/number}",
"milestones_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/milestones{\/number}",
"notifications_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/notifications{?since,all,participating}",
"labels_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels{\/name}",
"releases_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/releases{\/id}",
"deployments_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/deployments",
"created_at": "2014-10-31T16:57:10Z",
"updated_at": "2016-04-13T04:50:06Z",
"pushed_at": "2016-04-13T14:28:45Z",
"git_url": "git:\/\/github.com\/huboard-testing\/spooky-octo-pug.git",
"ssh_url": "git@github.com:huboard-testing\/spooky-octo-pug.git",
"clone_url": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug.git",
"svn_url": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug",
"homepage": null,
"size": 2,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"open_issues_count": 5,
"forks": 0,
"open_issues": 5,
"watchers": 0,
"default_branch": "master"
}
},
"base": {
"label": "huboard-testing:master",
"ref": "master",
"sha": "5068ac2398ee52f4330169487a714ae2b133a3bd",
"user": {
"login": "huboard-testing",
"id": 9469949,
"avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/9469949?v=3",
"gravatar_id": "",
"url": "https:\/\/api.github.com\/users\/huboard-testing",
"html_url": "https:\/\/github.com\/huboard-testing",
"followers_url": "https:\/\/api.github.com\/users\/huboard-testing\/followers",
"following_url": "https:\/\/api.github.com\/users\/huboard-testing\/following{\/other_user}",
"gists_url": "https:\/\/api.github.com\/users\/huboard-testing\/gists{\/gist_id}",
"starred_url": "https:\/\/api.github.com\/users\/huboard-testing\/starred{\/owner}{\/repo}",
"subscriptions_url": "https:\/\/api.github.com\/users\/huboard-testing\/subscriptions",
"organizations_url": "https:\/\/api.github.com\/users\/huboard-testing\/orgs",
"repos_url": "https:\/\/api.github.com\/users\/huboard-testing\/repos",
"events_url": "https:\/\/api.github.com\/users\/huboard-testing\/events{\/privacy}",
"received_events_url": "https:\/\/api.github.com\/users\/huboard-testing\/received_events",
"type": "Organization",
"site_admin": false
},
"repo": {
"id": 26025028,
"name": "spooky-octo-pug",
"full_name": "huboard-testing\/spooky-octo-pug",
"owner": {
"login": "huboard-testing",
"id": 9469949,
"avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/9469949?v=3",
"gravatar_id": "",
"url": "https:\/\/api.github.com\/users\/huboard-testing",
"html_url": "https:\/\/github.com\/huboard-testing",
"followers_url": "https:\/\/api.github.com\/users\/huboard-testing\/followers",
"following_url": "https:\/\/api.github.com\/users\/huboard-testing\/following{\/other_user}",
"gists_url": "https:\/\/api.github.com\/users\/huboard-testing\/gists{\/gist_id}",
"starred_url": "https:\/\/api.github.com\/users\/huboard-testing\/starred{\/owner}{\/repo}",
"subscriptions_url": "https:\/\/api.github.com\/users\/huboard-testing\/subscriptions",
"organizations_url": "https:\/\/api.github.com\/users\/huboard-testing\/orgs",
"repos_url": "https:\/\/api.github.com\/users\/huboard-testing\/repos",
"events_url": "https:\/\/api.github.com\/users\/huboard-testing\/events{\/privacy}",
"received_events_url": "https:\/\/api.github.com\/users\/huboard-testing\/received_events",
"type": "Organization",
"site_admin": false
},
"private": false,
"html_url": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug",
"description": "",
"fork": false,
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug",
"forks_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/forks",
"keys_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/keys{\/key_id}",
"collaborators_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/collaborators{\/collaborator}",
"teams_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/teams",
"hooks_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/hooks",
"issue_events_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/events{\/number}",
"events_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/events",
"assignees_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/assignees{\/user}",
"branches_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/branches{\/branch}",
"tags_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/tags",
"blobs_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/git\/blobs{\/sha}",
"git_tags_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/git\/tags{\/sha}",
"git_refs_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/git\/refs{\/sha}",
"trees_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/git\/trees{\/sha}",
"statuses_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/statuses\/{sha}",
"languages_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/languages",
"stargazers_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/stargazers",
"contributors_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/contributors",
"subscribers_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/subscribers",
"subscription_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/subscription",
"commits_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/commits{\/sha}",
"git_commits_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/git\/commits{\/sha}",
"comments_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/comments{\/number}",
"issue_comment_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/comments{\/number}",
"contents_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/contents\/{+path}",
"compare_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/compare\/{base}...{head}",
"merges_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/merges",
"archive_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/{archive_format}{\/ref}",
"downloads_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/downloads",
"issues_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues{\/number}",
"pulls_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/pulls{\/number}",
"milestones_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/milestones{\/number}",
"notifications_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/notifications{?since,all,participating}",
"labels_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels{\/name}",
"releases_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/releases{\/id}",
"deployments_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/deployments",
"created_at": "2014-10-31T16:57:10Z",
"updated_at": "2016-04-13T04:50:06Z",
"pushed_at": "2016-04-13T14:28:45Z",
"git_url": "git:\/\/github.com\/huboard-testing\/spooky-octo-pug.git",
"ssh_url": "git@github.com:huboard-testing\/spooky-octo-pug.git",
"clone_url": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug.git",
"svn_url": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug",
"homepage": null,
"size": 2,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"open_issues_count": 5,
"forks": 0,
"open_issues": 5,
"watchers": 0,
"default_branch": "master"
}
},
"_links": {
"self": {
"href": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/pulls\/26"
},
"html": {
"href": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug\/pull\/26"
},
"issue": {
"href": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/26"
},
"comments": {
"href": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/26\/comments"
},
"review_comments": {
"href": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/pulls\/26\/comments"
},
"review_comment": {
"href": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/pulls\/comments{\/number}"
},
"commits": {
"href": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/pulls\/26\/commits"
},
"statuses": {
"href": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/statuses\/7efdd2701a4aa28e9e1e507d0cecf3d10e4d1e30"
}
},
"merged": false,
"mergeable": true,
"mergeable_state": "clean",
"merged_by": null,
"comments": 0,
"review_comments": 0,
"commits": 1,
"additions": 1,
"deletions": 1,
"changed_files": 1,
"current_state": {
"name": "__nil__"
},
"number_searchable": "26",
"other_labels": [
],
"_data": {
"order": 1.5,
"milestone_order": 26,
"custom_state": ""
},
"repo": {
"owner": {
"login": "huboard-testing"
},
"name": "spooky-octo-pug",
"full_name": "huboard-testing\/spooky-octo-pug"
}
},
"actor": {
"login": "dahlbyk",
"id": 133987,
"avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/133987?v=3",
"gravatar_id": "",
"url": "https:\/\/api.github.com\/users\/dahlbyk",
"html_url": "https:\/\/github.com\/dahlbyk",
"followers_url": "https:\/\/api.github.com\/users\/dahlbyk\/followers",
"following_url": "https:\/\/api.github.com\/users\/dahlbyk\/following{\/other_user}",
"gists_url": "https:\/\/api.github.com\/users\/dahlbyk\/gists{\/gist_id}",
"starred_url": "https:\/\/api.github.com\/users\/dahlbyk\/starred{\/owner}{\/repo}",
"subscriptions_url": "https:\/\/api.github.com\/users\/dahlbyk\/subscriptions",
"organizations_url": "https:\/\/api.github.com\/users\/dahlbyk\/orgs",
"repos_url": "https:\/\/api.github.com\/users\/dahlbyk\/repos",
"events_url": "https:\/\/api.github.com\/users\/dahlbyk\/events{\/privacy}",
"received_events_url": "https:\/\/api.github.com\/users\/dahlbyk\/received_events",
"type": "User",
"site_admin": false
}
}
}
}
] Issue payload with [
{
"channel": "\/huboard-testing\/spooky-octo-pug",
"data": {
"meta": {
"action": "issue_unlabeled",
"timestamp": "2016-04-13T14:48:27Z",
"correlationId": null,
"user": {
"login": "dahlbyk",
"id": 133987,
"avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/133987?v=3",
"gravatar_id": "",
"url": "https:\/\/api.github.com\/users\/dahlbyk",
"html_url": "https:\/\/github.com\/dahlbyk",
"followers_url": "https:\/\/api.github.com\/users\/dahlbyk\/followers",
"following_url": "https:\/\/api.github.com\/users\/dahlbyk\/following{\/other_user}",
"gists_url": "https:\/\/api.github.com\/users\/dahlbyk\/gists{\/gist_id}",
"starred_url": "https:\/\/api.github.com\/users\/dahlbyk\/starred{\/owner}{\/repo}",
"subscriptions_url": "https:\/\/api.github.com\/users\/dahlbyk\/subscriptions",
"organizations_url": "https:\/\/api.github.com\/users\/dahlbyk\/orgs",
"repos_url": "https:\/\/api.github.com\/users\/dahlbyk\/repos",
"events_url": "https:\/\/api.github.com\/users\/dahlbyk\/events{\/privacy}",
"received_events_url": "https:\/\/api.github.com\/users\/dahlbyk\/received_events",
"type": "User",
"site_admin": false
},
"identifier": 25,
"repo_full_name": "huboard-testing\/spooky-octo-pug"
},
"payload": {
"issue": {
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/25",
"repository_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug",
"labels_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/25\/labels{\/name}",
"comments_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/25\/comments",
"events_url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/issues\/25\/events",
"html_url": "https:\/\/github.com\/huboard-testing\/spooky-octo-pug\/issues\/25",
"id": 147951246,
"number": 25,
"title": "Test issue!",
"user": {
"login": "dahlbyk",
"id": 133987,
"avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/133987?v=3",
"gravatar_id": "",
"url": "https:\/\/api.github.com\/users\/dahlbyk",
"html_url": "https:\/\/github.com\/dahlbyk",
"followers_url": "https:\/\/api.github.com\/users\/dahlbyk\/followers",
"following_url": "https:\/\/api.github.com\/users\/dahlbyk\/following{\/other_user}",
"gists_url": "https:\/\/api.github.com\/users\/dahlbyk\/gists{\/gist_id}",
"starred_url": "https:\/\/api.github.com\/users\/dahlbyk\/starred{\/owner}{\/repo}",
"subscriptions_url": "https:\/\/api.github.com\/users\/dahlbyk\/subscriptions",
"organizations_url": "https:\/\/api.github.com\/users\/dahlbyk\/orgs",
"repos_url": "https:\/\/api.github.com\/users\/dahlbyk\/repos",
"events_url": "https:\/\/api.github.com\/users\/dahlbyk\/events{\/privacy}",
"received_events_url": "https:\/\/api.github.com\/users\/dahlbyk\/received_events",
"type": "User",
"site_admin": false
},
"labels": [
{
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels\/1%20-%20Ready",
"name": "1 - Ready",
"color": "CCCCCC",
"index": "1",
"text": "Ready",
"wip": 0
},
{
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels\/bug",
"name": "bug",
"color": "fc2929"
},
{
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels\/duplicate",
"name": "duplicate",
"color": "cccccc"
},
{
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels\/invalid",
"name": "invalid",
"color": "e6e6e6"
},
{
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels\/question",
"name": "question",
"color": "cc317c"
}
],
"state": "open",
"locked": false,
"assignee": null,
"milestone": null,
"comments": 0,
"created_at": "2016-04-13T05:36:23Z",
"updated_at": "2016-04-13T14:48:27Z",
"closed_at": null,
"body": "",
"current_state": {
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels\/1%20-%20Ready",
"name": "1 - Ready",
"color": "CCCCCC",
"index": "1",
"text": "Ready",
"wip": 0
},
"number_searchable": "25",
"other_labels": [
{
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels\/bug",
"name": "bug",
"color": "fc2929"
},
{
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels\/duplicate",
"name": "duplicate",
"color": "cccccc"
},
{
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels\/invalid",
"name": "invalid",
"color": "e6e6e6"
},
{
"url": "https:\/\/api.github.com\/repos\/huboard-testing\/spooky-octo-pug\/labels\/question",
"name": "question",
"color": "cc317c"
}
],
"_data": {
"order": 25,
"milestone_order": 25
},
"repo": {
"owner": {
"login": "huboard-testing"
},
"name": "spooky-octo-pug",
"full_name": "huboard-testing\/spooky-octo-pug"
}
},
"actor": {
"login": "dahlbyk",
"id": 133987,
"avatar_url": "https:\/\/avatars.githubusercontent.com\/u\/133987?v=3",
"gravatar_id": "",
"url": "https:\/\/api.github.com\/users\/dahlbyk",
"html_url": "https:\/\/github.com\/dahlbyk",
"followers_url": "https:\/\/api.github.com\/users\/dahlbyk\/followers",
"following_url": "https:\/\/api.github.com\/users\/dahlbyk\/following{\/other_user}",
"gists_url": "https:\/\/api.github.com\/users\/dahlbyk\/gists{\/gist_id}",
"starred_url": "https:\/\/api.github.com\/users\/dahlbyk\/starred{\/owner}{\/repo}",
"subscriptions_url": "https:\/\/api.github.com\/users\/dahlbyk\/subscriptions",
"organizations_url": "https:\/\/api.github.com\/users\/dahlbyk\/orgs",
"repos_url": "https:\/\/api.github.com\/users\/dahlbyk\/repos",
"events_url": "https:\/\/api.github.com\/users\/dahlbyk\/events{\/privacy}",
"received_events_url": "https:\/\/api.github.com\/users\/dahlbyk\/received_events",
"type": "User",
"site_admin": false
}
}
}
}
] |
I stand corrected - turns out the PR webhook payload doesn't align with Actual webhook payload for the above PR event includes the added/removed label, but not the current list of all labels. Similarly, creating a PR fires an {
"action": "labeled",
"number": 26,
"pull_request": {
"url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls/26",
"id": 66330676,
"html_url": "https://github.com/huboard-testing/spooky-octo-pug/pull/26",
"diff_url": "https://github.com/huboard-testing/spooky-octo-pug/pull/26.diff",
"patch_url": "https://github.com/huboard-testing/spooky-octo-pug/pull/26.patch",
"issue_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues/26",
"number": 26,
"state": "open",
"locked": false,
"title": "Update README.md",
"user": {
"login": "dahlbyk",
"id": 133987,
"avatar_url": "https://avatars.githubusercontent.com/u/133987?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/dahlbyk",
"html_url": "https://github.com/dahlbyk",
"followers_url": "https://api.github.com/users/dahlbyk/followers",
"following_url": "https://api.github.com/users/dahlbyk/following{/other_user}",
"gists_url": "https://api.github.com/users/dahlbyk/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dahlbyk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dahlbyk/subscriptions",
"organizations_url": "https://api.github.com/users/dahlbyk/orgs",
"repos_url": "https://api.github.com/users/dahlbyk/repos",
"events_url": "https://api.github.com/users/dahlbyk/events{/privacy}",
"received_events_url": "https://api.github.com/users/dahlbyk/received_events",
"type": "User",
"site_admin": false
},
"body": "Closes #25 \r\n\r\n<!---\r\n@huboard:{\"order\":1.5,\"milestone_order\":26,\"custom_state\":\"\"}\n-->\r\n",
"created_at": "2016-04-13T14:28:44Z",
"updated_at": "2016-04-13T14:48:59Z",
"closed_at": null,
"merged_at": null,
"merge_commit_sha": "6182080e9ae4c51afceac87229255601500a45ea",
"assignee": null,
"milestone": null,
"commits_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls/26/commits",
"review_comments_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls/26/comments",
"review_comment_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls/comments{/number}",
"comments_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues/26/comments",
"statuses_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/statuses/7efdd2701a4aa28e9e1e507d0cecf3d10e4d1e30",
"head": {
"label": "huboard-testing:dahlbyk-patch-2",
"ref": "dahlbyk-patch-2",
"sha": "7efdd2701a4aa28e9e1e507d0cecf3d10e4d1e30",
"user": {
"login": "huboard-testing",
"id": 9469949,
"avatar_url": "https://avatars.githubusercontent.com/u/9469949?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/huboard-testing",
"html_url": "https://github.com/huboard-testing",
"followers_url": "https://api.github.com/users/huboard-testing/followers",
"following_url": "https://api.github.com/users/huboard-testing/following{/other_user}",
"gists_url": "https://api.github.com/users/huboard-testing/gists{/gist_id}",
"starred_url": "https://api.github.com/users/huboard-testing/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huboard-testing/subscriptions",
"organizations_url": "https://api.github.com/users/huboard-testing/orgs",
"repos_url": "https://api.github.com/users/huboard-testing/repos",
"events_url": "https://api.github.com/users/huboard-testing/events{/privacy}",
"received_events_url": "https://api.github.com/users/huboard-testing/received_events",
"type": "Organization",
"site_admin": false
},
"repo": {
"id": 26025028,
"name": "spooky-octo-pug",
"full_name": "huboard-testing/spooky-octo-pug",
"owner": {
"login": "huboard-testing",
"id": 9469949,
"avatar_url": "https://avatars.githubusercontent.com/u/9469949?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/huboard-testing",
"html_url": "https://github.com/huboard-testing",
"followers_url": "https://api.github.com/users/huboard-testing/followers",
"following_url": "https://api.github.com/users/huboard-testing/following{/other_user}",
"gists_url": "https://api.github.com/users/huboard-testing/gists{/gist_id}",
"starred_url": "https://api.github.com/users/huboard-testing/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huboard-testing/subscriptions",
"organizations_url": "https://api.github.com/users/huboard-testing/orgs",
"repos_url": "https://api.github.com/users/huboard-testing/repos",
"events_url": "https://api.github.com/users/huboard-testing/events{/privacy}",
"received_events_url": "https://api.github.com/users/huboard-testing/received_events",
"type": "Organization",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/huboard-testing/spooky-octo-pug",
"description": "",
"fork": false,
"url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug",
"forks_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/forks",
"keys_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/teams",
"hooks_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/hooks",
"issue_events_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues/events{/number}",
"events_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/events",
"assignees_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/assignees{/user}",
"branches_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/branches{/branch}",
"tags_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/tags",
"blobs_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/statuses/{sha}",
"languages_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/languages",
"stargazers_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/stargazers",
"contributors_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/contributors",
"subscribers_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/subscribers",
"subscription_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/subscription",
"commits_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/contents/{+path}",
"compare_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/merges",
"archive_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/downloads",
"issues_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues{/number}",
"pulls_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls{/number}",
"milestones_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/milestones{/number}",
"notifications_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/labels{/name}",
"releases_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/releases{/id}",
"deployments_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/deployments",
"created_at": "2014-10-31T16:57:10Z",
"updated_at": "2016-04-13T04:50:06Z",
"pushed_at": "2016-04-13T14:28:45Z",
"git_url": "git://github.com/huboard-testing/spooky-octo-pug.git",
"ssh_url": "git@github.com:huboard-testing/spooky-octo-pug.git",
"clone_url": "https://github.com/huboard-testing/spooky-octo-pug.git",
"svn_url": "https://github.com/huboard-testing/spooky-octo-pug",
"homepage": null,
"size": 2,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"open_issues_count": 5,
"forks": 0,
"open_issues": 5,
"watchers": 0,
"default_branch": "master"
}
},
"base": {
"label": "huboard-testing:master",
"ref": "master",
"sha": "5068ac2398ee52f4330169487a714ae2b133a3bd",
"user": {
"login": "huboard-testing",
"id": 9469949,
"avatar_url": "https://avatars.githubusercontent.com/u/9469949?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/huboard-testing",
"html_url": "https://github.com/huboard-testing",
"followers_url": "https://api.github.com/users/huboard-testing/followers",
"following_url": "https://api.github.com/users/huboard-testing/following{/other_user}",
"gists_url": "https://api.github.com/users/huboard-testing/gists{/gist_id}",
"starred_url": "https://api.github.com/users/huboard-testing/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huboard-testing/subscriptions",
"organizations_url": "https://api.github.com/users/huboard-testing/orgs",
"repos_url": "https://api.github.com/users/huboard-testing/repos",
"events_url": "https://api.github.com/users/huboard-testing/events{/privacy}",
"received_events_url": "https://api.github.com/users/huboard-testing/received_events",
"type": "Organization",
"site_admin": false
},
"repo": {
"id": 26025028,
"name": "spooky-octo-pug",
"full_name": "huboard-testing/spooky-octo-pug",
"owner": {
"login": "huboard-testing",
"id": 9469949,
"avatar_url": "https://avatars.githubusercontent.com/u/9469949?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/huboard-testing",
"html_url": "https://github.com/huboard-testing",
"followers_url": "https://api.github.com/users/huboard-testing/followers",
"following_url": "https://api.github.com/users/huboard-testing/following{/other_user}",
"gists_url": "https://api.github.com/users/huboard-testing/gists{/gist_id}",
"starred_url": "https://api.github.com/users/huboard-testing/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huboard-testing/subscriptions",
"organizations_url": "https://api.github.com/users/huboard-testing/orgs",
"repos_url": "https://api.github.com/users/huboard-testing/repos",
"events_url": "https://api.github.com/users/huboard-testing/events{/privacy}",
"received_events_url": "https://api.github.com/users/huboard-testing/received_events",
"type": "Organization",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/huboard-testing/spooky-octo-pug",
"description": "",
"fork": false,
"url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug",
"forks_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/forks",
"keys_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/teams",
"hooks_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/hooks",
"issue_events_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues/events{/number}",
"events_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/events",
"assignees_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/assignees{/user}",
"branches_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/branches{/branch}",
"tags_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/tags",
"blobs_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/statuses/{sha}",
"languages_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/languages",
"stargazers_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/stargazers",
"contributors_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/contributors",
"subscribers_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/subscribers",
"subscription_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/subscription",
"commits_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/contents/{+path}",
"compare_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/merges",
"archive_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/downloads",
"issues_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues{/number}",
"pulls_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls{/number}",
"milestones_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/milestones{/number}",
"notifications_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/labels{/name}",
"releases_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/releases{/id}",
"deployments_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/deployments",
"created_at": "2014-10-31T16:57:10Z",
"updated_at": "2016-04-13T04:50:06Z",
"pushed_at": "2016-04-13T14:28:45Z",
"git_url": "git://github.com/huboard-testing/spooky-octo-pug.git",
"ssh_url": "git@github.com:huboard-testing/spooky-octo-pug.git",
"clone_url": "https://github.com/huboard-testing/spooky-octo-pug.git",
"svn_url": "https://github.com/huboard-testing/spooky-octo-pug",
"homepage": null,
"size": 2,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"open_issues_count": 5,
"forks": 0,
"open_issues": 5,
"watchers": 0,
"default_branch": "master"
}
},
"_links": {
"self": {
"href": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls/26"
},
"html": {
"href": "https://github.com/huboard-testing/spooky-octo-pug/pull/26"
},
"issue": {
"href": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues/26"
},
"comments": {
"href": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues/26/comments"
},
"review_comments": {
"href": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls/26/comments"
},
"review_comment": {
"href": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls/comments{/number}"
},
"commits": {
"href": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls/26/commits"
},
"statuses": {
"href": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/statuses/7efdd2701a4aa28e9e1e507d0cecf3d10e4d1e30"
}
},
"merged": false,
"mergeable": true,
"mergeable_state": "clean",
"merged_by": null,
"comments": 0,
"review_comments": 0,
"commits": 1,
"additions": 1,
"deletions": 1,
"changed_files": 1
},
"label": {
"url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/labels/bug",
"name": "bug",
"color": "fc2929"
},
"repository": {
"id": 26025028,
"name": "spooky-octo-pug",
"full_name": "huboard-testing/spooky-octo-pug",
"owner": {
"login": "huboard-testing",
"id": 9469949,
"avatar_url": "https://avatars.githubusercontent.com/u/9469949?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/huboard-testing",
"html_url": "https://github.com/huboard-testing",
"followers_url": "https://api.github.com/users/huboard-testing/followers",
"following_url": "https://api.github.com/users/huboard-testing/following{/other_user}",
"gists_url": "https://api.github.com/users/huboard-testing/gists{/gist_id}",
"starred_url": "https://api.github.com/users/huboard-testing/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/huboard-testing/subscriptions",
"organizations_url": "https://api.github.com/users/huboard-testing/orgs",
"repos_url": "https://api.github.com/users/huboard-testing/repos",
"events_url": "https://api.github.com/users/huboard-testing/events{/privacy}",
"received_events_url": "https://api.github.com/users/huboard-testing/received_events",
"type": "Organization",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/huboard-testing/spooky-octo-pug",
"description": "",
"fork": false,
"url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug",
"forks_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/forks",
"keys_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/teams",
"hooks_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/hooks",
"issue_events_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues/events{/number}",
"events_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/events",
"assignees_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/assignees{/user}",
"branches_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/branches{/branch}",
"tags_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/tags",
"blobs_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/statuses/{sha}",
"languages_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/languages",
"stargazers_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/stargazers",
"contributors_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/contributors",
"subscribers_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/subscribers",
"subscription_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/subscription",
"commits_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/contents/{+path}",
"compare_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/merges",
"archive_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/downloads",
"issues_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/issues{/number}",
"pulls_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/pulls{/number}",
"milestones_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/milestones{/number}",
"notifications_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/labels{/name}",
"releases_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/releases{/id}",
"deployments_url": "https://api.github.com/repos/huboard-testing/spooky-octo-pug/deployments",
"created_at": "2014-10-31T16:57:10Z",
"updated_at": "2016-04-13T04:50:06Z",
"pushed_at": "2016-04-13T14:28:45Z",
"git_url": "git://github.com/huboard-testing/spooky-octo-pug.git",
"ssh_url": "git@github.com:huboard-testing/spooky-octo-pug.git",
"clone_url": "https://github.com/huboard-testing/spooky-octo-pug.git",
"svn_url": "https://github.com/huboard-testing/spooky-octo-pug",
"homepage": null,
"size": 2,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"open_issues_count": 5,
"forks": 0,
"open_issues": 5,
"watchers": 0,
"default_branch": "master"
},
"organization": {
"login": "huboard-testing",
"id": 9469949,
"url": "https://api.github.com/orgs/huboard-testing",
"repos_url": "https://api.github.com/orgs/huboard-testing/repos",
"events_url": "https://api.github.com/orgs/huboard-testing/events",
"hooks_url": "https://api.github.com/orgs/huboard-testing/hooks",
"issues_url": "https://api.github.com/orgs/huboard-testing/issues",
"members_url": "https://api.github.com/orgs/huboard-testing/members{/member}",
"public_members_url": "https://api.github.com/orgs/huboard-testing/public_members{/member}",
"avatar_url": "https://avatars.githubusercontent.com/u/9469949?v=3",
"description": "Test projects for HuBoard, an open source task management platform built directly on top of your existing GitHub repositories"
},
"sender": {
"login": "dahlbyk",
"id": 133987,
"avatar_url": "https://avatars.githubusercontent.com/u/133987?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/dahlbyk",
"html_url": "https://github.com/dahlbyk",
"followers_url": "https://api.github.com/users/dahlbyk/followers",
"following_url": "https://api.github.com/users/dahlbyk/following{/other_user}",
"gists_url": "https://api.github.com/users/dahlbyk/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dahlbyk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dahlbyk/subscriptions",
"organizations_url": "https://api.github.com/users/dahlbyk/orgs",
"repos_url": "https://api.github.com/users/dahlbyk/repos",
"events_url": "https://api.github.com/users/dahlbyk/events{/privacy}",
"received_events_url": "https://api.github.com/users/dahlbyk/received_events",
"type": "User",
"site_admin": false
}
} |
@dahlbyk the reason these events work is due to this line: https://github.com/huboard/huboard-web/pull/255/files#diff-a92dfded40042b12657ab3904a649acaR31 The The label changes missing is a front-end issue, the toast is picking up but the subscriber that actually handles the message is not - @rauhryan I think thats really all there is left to the PR otherwise I am happy to |
Just picking this PR and taking it over the finish line. TODO list for Events:
|
… exactly match the object in memory)
the cache key use the label name to prevent duplicate messages getting published to the client
class_attribute is a safer and cleaner way to allow subclasses to override properties from class methods
class_attribute is a safer and cleaner way to allow subclasses to override properties from class methods
to deploy HuBoard in production with sucker_punch
@huboard/committers I've tested everything and feel like this is dev complete and ready to deploy |
cache_key ->(message) { | ||
label_name = message[:payload][:label] ? message[:payload][:label]['name'] : "" | ||
|
||
"#{message[:meta][:action]}.#{message[:meta][:user]["login"]}.#{message[:meta][:identifier]}.#{message[:meta][:timestamp]}.#{ label_name }" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks duplicated. Leverage a class method so that we don't screw this up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cache_key
is a class method that will override the default _cache_key
class_attribute
It's syntactic DSL sugar to override default behavior of the cache key for labels.
So, I think it's already doing what you suggested
it might be confusing because it's not using parenthesis
cache_key(->(message) { "here.derp" })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any issue messages that wouldn't be cached with at least #{message[:meta][:action]}.#{message[:meta][:user]["login"]}.#{message[:meta][:identifier]}.#{message[:meta][:timestamp]}
? Could the override just specify a suffix for the key if necessary, to avoid duplicating the action/login/id/timestamp code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actual delta at this point is three lines - should definitely extract a base class to DRY this up.
converts PR into an issue payload and sends up the
event as an issue event.
Seems to work
Closes #231
Closes huboard/huboard#608
Related to huboard/huboard#598