GitHub PullRequestEvent at 2014-04-28 10:59:26
Repository: gobot
Actor: zankich
Payload: {"action":"closed","number":52,"pull_request":{"url":"https://api.github.com/repos/hybridgroup/gobot/pulls/52","id":15209111,"html_url":"https://github.com/hybridgroup/gobot/pull/52","diff_url":"https://github.com/hybridgroup/gobot/pull/52.diff","patch_url":"https://github.com/hybridgroup/gobot/pull/52.patch","issue_url":"https://api.github.com/repos/hybridgroup/gobot/issues/52","number":52,"state":"closed","title":"added Halt() to a collection of devices","user":{"login":"mattetti","id":113,"avatar_url":"https://avatars.githubusercontent.com/u/113?","gravatar_id":"c69521d6e22fc0bbd69337ec8b1698df","url":"https://api.github.com/users/mattetti","html_url":"https://github.com/mattetti","followers_url":"https://api.github.com/users/mattetti/followers","following_url":"https://api.github.com/users/mattetti/following{/other_user}","gists_url":"https://api.github.com/users/mattetti/gists{/gist_id}","starred_url":"https://api.github.com/users/mattetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattetti/subscriptions","organizations_url":"https://api.github.com/users/mattetti/orgs","repos_url":"https://api.github.com/users/mattetti/repos","events_url":"https://api.github.com/users/mattetti/events{/privacy}","received_events_url":"https://api.github.com/users/mattetti/received_events","type":"User","site_admin":false},"body":"I added a devices type alias (might want to export it) so one can operate on a collection of devices.\r\nI found that the API was cleaner when halting devices so the robot doesn't have to have any knowledge of halt and that is instead handled at the collection level.\r\n\r\nNote that if we need to do more things on the devices, we could also implement an iterator:\r\n\r\n```go\r\nfunc(coll devices) Each(f func(*device)) {\r\n  for _, d := range coll {\r\n    f(d)\r\n  }\r\n}\r\n\r\n// which can be called like so\r\nr.devices.Each(func(d *device){\r\n  d.Halt()\r\n})\r\n```","created_at":"2014-04-27T04:56:15Z","updated_at":"2014-04-28T10:59:26Z","closed_at":"2014-04-28T10:59:26Z","merged_at":"2014-04-28T10:59:26Z","merge_commit_sha":"3b43bcc6c2f272ad29c0ac2455a6b90138948a10","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hybridgroup/gobot/pulls/52/commits","review_comments_url":"https://api.github.com/repos/hybridgroup/gobot/pulls/52/comments","review_comment_url":"https://api.github.com/repos/hybridgroup/gobot/pulls/comments/{number}","comments_url":"https://api.github.com/repos/hybridgroup/gobot/issues/52/comments","statuses_url":"https://api.github.com/repos/hybridgroup/gobot/statuses/852a7699c1ccf796be3007f8189aaf0d2d73f395","head":{"label":"mattetti:single_repo","ref":"single_repo","sha":"852a7699c1ccf796be3007f8189aaf0d2d73f395","user":{"login":"mattetti","id":113,"avatar_url":"https://avatars.githubusercontent.com/u/113?","gravatar_id":"c69521d6e22fc0bbd69337ec8b1698df","url":"https://api.github.com/users/mattetti","html_url":"https://github.com/mattetti","followers_url":"https://api.github.com/users/mattetti/followers","following_url":"https://api.github.com/users/mattetti/following{/other_user}","gists_url":"https://api.github.com/users/mattetti/gists{/gist_id}","starred_url":"https://api.github.com/users/mattetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattetti/subscriptions","organizations_url":"https://api.github.com/users/mattetti/orgs","repos_url":"https://api.github.com/users/mattetti/repos","events_url":"https://api.github.com/users/mattetti/events{/privacy}","received_events_url":"https://api.github.com/users/mattetti/received_events","type":"User","site_admin":false},"repo":{"id":19165246,"name":"gobot","full_name":"mattetti/gobot","owner":{"login":"mattetti","id":113,"avatar_url":"https://avatars.githubusercontent.com/u/113?","gravatar_id":"c69521d6e22fc0bbd69337ec8b1698df","url":"https://api.github.com/users/mattetti","html_url":"https://github.com/mattetti","followers_url":"https://api.github.com/users/mattetti/followers","following_url":"https://api.github.com/users/mattetti/following{/other_user}","gists_url":"https://api.github.com/users/mattetti/gists{/gist_id}","starred_url":"https://api.github.com/users/mattetti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattetti/subscriptions","organizations_url":"https://api.github.com/users/mattetti/orgs","repos_url":"https://api.github.com/users/mattetti/repos","events_url":"https://api.github.com/users/mattetti/events{/privacy}","received_events_url":"https://api.github.com/users/mattetti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mattetti/gobot","description":"A Go framework/set of libraries for robotics and physical computing","fork":true,"url":"https://api.github.com/repos/mattetti/gobot","forks_url":"https://api.github.com/repos/mattetti/gobot/forks","keys_url":"https://api.github.com/repos/mattetti/gobot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattetti/gobot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattetti/gobot/teams","hooks_url":"https://api.github.com/repos/mattetti/gobot/hooks","issue_events_url":"https://api.github.com/repos/mattetti/gobot/issues/events{/number}","events_url":"https://api.github.com/repos/mattetti/gobot/events","assignees_url":"https://api.github.com/repos/mattetti/gobot/assignees{/user}","branches_url":"https://api.github.com/repos/mattetti/gobot/branches{/branch}","tags_url":"https://api.github.com/repos/mattetti/gobot/tags","blobs_url":"https://api.github.com/repos/mattetti/gobot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattetti/gobot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattetti/gobot/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattetti/gobot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattetti/gobot/statuses/{sha}","languages_url":"https://api.github.com/repos/mattetti/gobot/languages","stargazers_url":"https://api.github.com/repos/mattetti/gobot/stargazers","contributors_url":"https://api.github.com/repos/mattetti/gobot/contributors","subscribers_url":"https://api.github.com/repos/mattetti/gobot/subscribers","subscription_url":"https://api.github.com/repos/mattetti/gobot/subscription","commits_url":"https://api.github.com/repos/mattetti/gobot/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattetti/gobot/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattetti/gobot/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattetti/gobot/issues/comments/{number}","contents_url":"https://api.github.com/repos/mattetti/gobot/contents/{+path}","compare_url":"https://api.github.com/repos/mattetti/gobot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattetti/gobot/merges","archive_url":"https://api.github.com/repos/mattetti/gobot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattetti/gobot/downloads","issues_url":"https://api.github.com/repos/mattetti/gobot/issues{/number}","pulls_url":"https://api.github.com/repos/mattetti/gobot/pulls{/number}","milestones_url":"https://api.github.com/repos/mattetti/gobot/milestones{/number}","notifications_url":"https://api.github.com/repos/mattetti/gobot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattetti/gobot/labels{/name}","releases_url":"https://api.github.com/repos/mattetti/gobot/releases{/id}","created_at":"2014-04-26T00:57:01Z","updated_at":"2014-04-28T10:59:26Z","pushed_at":"2014-04-27T04:53:06Z","git_url":"git://github.com/mattetti/gobot.git","ssh_url":"git@github.com:mattetti/gobot.git","clone_url":"https://github.com/mattetti/gobot.git","svn_url":"https://github.com/mattetti/gobot","homepage":"http://gobot.io","size":6714,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hybridgroup:single_repo","ref":"single_repo","sha":"82b8fd5224800a04d0c6f978da4da77104c63dc0","user":{"login":"hybridgroup","id":212109,"avatar_url":"https://avatars.githubusercontent.com/u/212109?","gravatar_id":"3faedf7528a101e9c40cdd2e28d6cbe9","url":"https://api.github.com/users/hybridgroup","html_url":"https://github.com/hybridgroup","followers_url":"https://api.github.com/users/hybridgroup/followers","following_url":"https://api.github.com/users/hybridgroup/following{/other_user}","gists_url":"https://api.github.com/users/hybridgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/hybridgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hybridgroup/subscriptions","organizations_url":"https://api.github.com/users/hybridgroup/orgs","repos_url":"https://api.github.com/users/hybridgroup/repos","events_url":"https://api.github.com/users/hybridgroup/events{/privacy}","received_events_url":"https://api.github.com/users/hybridgroup/received_events","type":"Organization","site_admin":false},"repo":{"id":12996196,"name":"gobot","full_name":"hybridgroup/gobot","owner":{"login":"hybridgroup","id":212109,"avatar_url":"https://avatars.githubusercontent.com/u/212109?","gravatar_id":"3faedf7528a101e9c40cdd2e28d6cbe9","url":"https://api.github.com/users/hybridgroup","html_url":"https://github.com/hybridgroup","followers_url":"https://api.github.com/users/hybridgroup/followers","following_url":"https://api.github.com/users/hybridgroup/following{/other_user}","gists_url":"https://api.github.com/users/hybridgroup/gists{/gist_id}","starred_url":"https://api.github.com/users/hybridgroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hybridgroup/subscriptions","organizations_url":"https://api.github.com/users/hybridgroup/orgs","repos_url":"https://api.github.com/users/hybridgroup/repos","events_url":"https://api.github.com/users/hybridgroup/events{/privacy}","received_events_url":"https://api.github.com/users/hybridgroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hybridgroup/gobot","description":"A Go framework/set of libraries for robotics and physical computing","fork":false,"url":"https://api.github.com/repos/hybridgroup/gobot","forks_url":"https://api.github.com/repos/hybridgroup/gobot/forks","keys_url":"https://api.github.com/repos/hybridgroup/gobot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hybridgroup/gobot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hybridgroup/gobot/teams","hooks_url":"https://api.github.com/repos/hybridgroup/gobot/hooks","issue_events_url":"https://api.github.com/repos/hybridgroup/gobot/issues/events{/number}","events_url":"https://api.github.com/repos/hybridgroup/gobot/events","assignees_url":"https://api.github.com/repos/hybridgroup/gobot/assignees{/user}","branches_url":"https://api.github.com/repos/hybridgroup/gobot/branches{/branch}","tags_url":"https://api.github.com/repos/hybridgroup/gobot/tags","blobs_url":"https://api.github.com/repos/hybridgroup/gobot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hybridgroup/gobot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hybridgroup/gobot/git/refs{/sha}","trees_url":"https://api.github.com/repos/hybridgroup/gobot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hybridgroup/gobot/statuses/{sha}","languages_url":"https://api.github.com/repos/hybridgroup/gobot/languages","stargazers_url":"https://api.github.com/repos/hybridgroup/gobot/stargazers","contributors_url":"https://api.github.com/repos/hybridgroup/gobot/contributors","subscribers_url":"https://api.github.com/repos/hybridgroup/gobot/subscribers","subscription_url":"https://api.github.com/repos/hybridgroup/gobot/subscription","commits_url":"https://api.github.com/repos/hybridgroup/gobot/commits{/sha}","git_commits_url":"https://api.github.com/repos/hybridgroup/gobot/git/commits{/sha}","comments_url":"https://api.github.com/repos/hybridgroup/gobot/comments{/number}","issue_comment_url":"https://api.github.com/repos/hybridgroup/gobot/issues/comments/{number}","contents_url":"https://api.github.com/repos/hybridgroup/gobot/contents/{+path}","compare_url":"https://api.github.com/repos/hybridgroup/gobot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hybridgroup/gobot/merges","archive_url":"https://api.github.com/repos/hybridgroup/gobot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hybridgroup/gobot/downloads","issues_url":"https://api.github.com/repos/hybridgroup/gobot/issues{/number}","pulls_url":"https://api.github.com/repos/hybridgroup/gobot/pulls{/number}","milestones_url":"https://api.github.com/repos/hybridgroup/gobot/milestones{/number}","notifications_url":"https://api.github.com/repos/hybridgroup/gobot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hybridgroup/gobot/labels{/name}","releases_url":"https://api.github.com/repos/hybridgroup/gobot/releases{/id}","created_at":"2013-09-21T14:09:19Z","updated_at":"2014-04-28T10:59:26Z","pushed_at":"2014-04-28T10:59:26Z","git_url":"git://github.com/hybridgroup/gobot.git","ssh_url":"git@github.com:hybridgroup/gobot.git","clone_url":"https://github.com/hybridgroup/gobot.git","svn_url":"https://github.com/hybridgroup/gobot","homepage":"http://gobot.io","size":6714,"stargazers_count":367,"watchers_count":367,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":16,"mirror_url":null,"open_issues_count":0,"forks":16,"open_issues":0,"watchers":367,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hybridgroup/gobot/pulls/52"},"html":{"href":"https://github.com/hybridgroup/gobot/pull/52"},"issue":{"href":"https://api.github.com/repos/hybridgroup/gobot/issues/52"},"comments":{"href":"https://api.github.com/repos/hybridgroup/gobot/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/hybridgroup/gobot/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/hybridgroup/gobot/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/hybridgroup/gobot/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/hybridgroup/gobot/statuses/852a7699c1ccf796be3007f8189aaf0d2d73f395"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"zankich","id":1727934,"avatar_url":"https://avatars.githubusercontent.com/u/1727934?","gravatar_id":"fbc9c9b33dc1ce68c353b3233ca22bfe","url":"https://api.github.com/users/zankich","html_url":"https://github.com/zankich","followers_url":"https://api.github.com/users/zankich/followers","following_url":"https://api.github.com/users/zankich/following{/other_user}","gists_url":"https://api.github.com/users/zankich/gists{/gist_id}","starred_url":"https://api.github.com/users/zankich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zankich/subscriptions","organizations_url":"https://api.github.com/users/zankich/orgs","repos_url":"https://api.github.com/users/zankich/repos","events_url":"https://api.github.com/users/zankich/events{/privacy}","received_events_url":"https://api.github.com/users/zankich/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":16,"deletions":13,"changed_files":3}}