{"action":"created","comment":{"url":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/comments/56610487","id":56610487,"diff_hunk":"@@ -0,0 +1,105 @@\n+import React, { Component, PropTypes } from 'react';\n+import reactMixin                      from 'react-mixin';\n+import { ListenerMixin }               from 'reflux';\n+import _                               from 'lodash';\n+import Mozaik                          from 'mozaik/browser';\n+\n+\n+class RepositoryBadge extends Component {\n+    constructor(props) {\n+        super(props);\n+        this.state = {\n+            repository: null\n+        };\n+    }\n+\n+    getApiRequest() {\n+        let { repository } = this.props;\n+\n+        return {\n+            id:     `github.repository.${ repository }`,\n+            params: {\n+                repository: repository\n+            }\n+        };\n+    }\n+\n+    onApiData(repository) {\n+        this.setState({\n+            repository: repository\n+        });\n+    }\n+\n+    render() {\n+        let { repository, title } = this.props;\n+        var titleNode = (\n+            <span>\n+                <span className=\"widget__header__subject\">{title || repository}</span>\n+            </span>\n+        );\n+        var repositoryNode = (\n+            <div className=\"widget__body\" />\n+        );\n+\n+        if (this.state.repository) {\n+            titleNode = title === undefined ? (\n+                <span>\n+                    <span className=\"widget__header__subject\">{this.state.repository.name}</span>","path":"src/components/RepositoryBadge.jsx","position":47,"original_position":47,"commit_id":"720d2c24f935dc84b878e0316386984bc9b96039","original_commit_id":"720d2c24f935dc84b878e0316386984bc9b96039","user":{"login":"plouc","id":501642,"avatar_url":"https://avatars.githubusercontent.com/u/501642?v=3","gravatar_id":"","url":"https://api.github.com/users/plouc","html_url":"https://github.com/plouc","followers_url":"https://api.github.com/users/plouc/followers","following_url":"https://api.github.com/users/plouc/following{/other_user}","gists_url":"https://api.github.com/users/plouc/gists{/gist_id}","starred_url":"https://api.github.com/users/plouc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plouc/subscriptions","organizations_url":"https://api.github.com/users/plouc/orgs","repos_url":"https://api.github.com/users/plouc/repos","events_url":"https://api.github.com/users/plouc/events{/privacy}","received_events_url":"https://api.github.com/users/plouc/received_events","type":"User","site_admin":false},"body":"I think it should also include repository owner.","created_at":"2016-03-18T03:47:05Z","updated_at":"2016-03-18T03:47:05Z","html_url":"https://github.com/plouc/mozaik-ext-github/pull/8#discussion_r56610487","pull_request_url":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/comments/56610487"},"html":{"href":"https://github.com/plouc/mozaik-ext-github/pull/8#discussion_r56610487"},"pull_request":{"href":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/8","id":63323169,"html_url":"https://github.com/plouc/mozaik-ext-github/pull/8","diff_url":"https://github.com/plouc/mozaik-ext-github/pull/8.diff","patch_url":"https://github.com/plouc/mozaik-ext-github/pull/8.patch","issue_url":"https://api.github.com/repos/plouc/mozaik-ext-github/issues/8","number":8,"state":"open","locked":false,"title":"Create RepositoryBadge","user":{"login":"benediktvaldez","id":1928103,"avatar_url":"https://avatars.githubusercontent.com/u/1928103?v=3","gravatar_id":"","url":"https://api.github.com/users/benediktvaldez","html_url":"https://github.com/benediktvaldez","followers_url":"https://api.github.com/users/benediktvaldez/followers","following_url":"https://api.github.com/users/benediktvaldez/following{/other_user}","gists_url":"https://api.github.com/users/benediktvaldez/gists{/gist_id}","starred_url":"https://api.github.com/users/benediktvaldez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benediktvaldez/subscriptions","organizations_url":"https://api.github.com/users/benediktvaldez/orgs","repos_url":"https://api.github.com/users/benediktvaldez/repos","events_url":"https://api.github.com/users/benediktvaldez/events{/privacy}","received_events_url":"https://api.github.com/users/benediktvaldez/received_events","type":"User","site_admin":false},"body":"Not sure if these fields are the best option - just an idea","created_at":"2016-03-18T03:19:26Z","updated_at":"2016-03-18T03:47:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b00b6a94e7d241800088a3757a6a773a2f9a6bbf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/8/commits","review_comments_url":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/8/comments","review_comment_url":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/comments{/number}","comments_url":"https://api.github.com/repos/plouc/mozaik-ext-github/issues/8/comments","statuses_url":"https://api.github.com/repos/plouc/mozaik-ext-github/statuses/720d2c24f935dc84b878e0316386984bc9b96039","head":{"label":"IcelandairLabs:repo-badge","ref":"repo-badge","sha":"720d2c24f935dc84b878e0316386984bc9b96039","user":{"login":"IcelandairLabs","id":16290061,"avatar_url":"https://avatars.githubusercontent.com/u/16290061?v=3","gravatar_id":"","url":"https://api.github.com/users/IcelandairLabs","html_url":"https://github.com/IcelandairLabs","followers_url":"https://api.github.com/users/IcelandairLabs/followers","following_url":"https://api.github.com/users/IcelandairLabs/following{/other_user}","gists_url":"https://api.github.com/users/IcelandairLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/IcelandairLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IcelandairLabs/subscriptions","organizations_url":"https://api.github.com/users/IcelandairLabs/orgs","repos_url":"https://api.github.com/users/IcelandairLabs/repos","events_url":"https://api.github.com/users/IcelandairLabs/events{/privacy}","received_events_url":"https://api.github.com/users/IcelandairLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":54126869,"name":"mozaik-ext-github","full_name":"IcelandairLabs/mozaik-ext-github","owner":{"login":"IcelandairLabs","id":16290061,"avatar_url":"https://avatars.githubusercontent.com/u/16290061?v=3","gravatar_id":"","url":"https://api.github.com/users/IcelandairLabs","html_url":"https://github.com/IcelandairLabs","followers_url":"https://api.github.com/users/IcelandairLabs/followers","following_url":"https://api.github.com/users/IcelandairLabs/following{/other_user}","gists_url":"https://api.github.com/users/IcelandairLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/IcelandairLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IcelandairLabs/subscriptions","organizations_url":"https://api.github.com/users/IcelandairLabs/orgs","repos_url":"https://api.github.com/users/IcelandairLabs/repos","events_url":"https://api.github.com/users/IcelandairLabs/events{/privacy}","received_events_url":"https://api.github.com/users/IcelandairLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IcelandairLabs/mozaik-ext-github","description":"Mozaïk github widgets","fork":true,"url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github","forks_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/forks","keys_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/teams","hooks_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/hooks","issue_events_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/issues/events{/number}","events_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/events","assignees_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/assignees{/user}","branches_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/branches{/branch}","tags_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/tags","blobs_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/git/refs{/sha}","trees_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/statuses/{sha}","languages_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/languages","stargazers_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/stargazers","contributors_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/contributors","subscribers_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/subscribers","subscription_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/subscription","commits_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/commits{/sha}","git_commits_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/git/commits{/sha}","comments_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/comments{/number}","issue_comment_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/issues/comments{/number}","contents_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/contents/{+path}","compare_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/merges","archive_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/downloads","issues_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/issues{/number}","pulls_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/pulls{/number}","milestones_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/milestones{/number}","notifications_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/labels{/name}","releases_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/releases{/id}","deployments_url":"https://api.github.com/repos/IcelandairLabs/mozaik-ext-github/deployments","created_at":"2016-03-17T14:57:36Z","updated_at":"2016-03-17T14:57:37Z","pushed_at":"2016-03-18T03:22:11Z","git_url":"git://github.com/IcelandairLabs/mozaik-ext-github.git","ssh_url":"git@github.com:IcelandairLabs/mozaik-ext-github.git","clone_url":"https://github.com/IcelandairLabs/mozaik-ext-github.git","svn_url":"https://github.com/IcelandairLabs/mozaik-ext-github","homepage":"","size":401,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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"}},"base":{"label":"plouc:master","ref":"master","sha":"b36d812bd2fb9acc50bfefa66fb975b986d22527","user":{"login":"plouc","id":501642,"avatar_url":"https://avatars.githubusercontent.com/u/501642?v=3","gravatar_id":"","url":"https://api.github.com/users/plouc","html_url":"https://github.com/plouc","followers_url":"https://api.github.com/users/plouc/followers","following_url":"https://api.github.com/users/plouc/following{/other_user}","gists_url":"https://api.github.com/users/plouc/gists{/gist_id}","starred_url":"https://api.github.com/users/plouc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plouc/subscriptions","organizations_url":"https://api.github.com/users/plouc/orgs","repos_url":"https://api.github.com/users/plouc/repos","events_url":"https://api.github.com/users/plouc/events{/privacy}","received_events_url":"https://api.github.com/users/plouc/received_events","type":"User","site_admin":false},"repo":{"id":30884554,"name":"mozaik-ext-github","full_name":"plouc/mozaik-ext-github","owner":{"login":"plouc","id":501642,"avatar_url":"https://avatars.githubusercontent.com/u/501642?v=3","gravatar_id":"","url":"https://api.github.com/users/plouc","html_url":"https://github.com/plouc","followers_url":"https://api.github.com/users/plouc/followers","following_url":"https://api.github.com/users/plouc/following{/other_user}","gists_url":"https://api.github.com/users/plouc/gists{/gist_id}","starred_url":"https://api.github.com/users/plouc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plouc/subscriptions","organizations_url":"https://api.github.com/users/plouc/orgs","repos_url":"https://api.github.com/users/plouc/repos","events_url":"https://api.github.com/users/plouc/events{/privacy}","received_events_url":"https://api.github.com/users/plouc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/plouc/mozaik-ext-github","description":"Mozaïk github widgets","fork":false,"url":"https://api.github.com/repos/plouc/mozaik-ext-github","forks_url":"https://api.github.com/repos/plouc/mozaik-ext-github/forks","keys_url":"https://api.github.com/repos/plouc/mozaik-ext-github/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plouc/mozaik-ext-github/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plouc/mozaik-ext-github/teams","hooks_url":"https://api.github.com/repos/plouc/mozaik-ext-github/hooks","issue_events_url":"https://api.github.com/repos/plouc/mozaik-ext-github/issues/events{/number}","events_url":"https://api.github.com/repos/plouc/mozaik-ext-github/events","assignees_url":"https://api.github.com/repos/plouc/mozaik-ext-github/assignees{/user}","branches_url":"https://api.github.com/repos/plouc/mozaik-ext-github/branches{/branch}","tags_url":"https://api.github.com/repos/plouc/mozaik-ext-github/tags","blobs_url":"https://api.github.com/repos/plouc/mozaik-ext-github/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plouc/mozaik-ext-github/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plouc/mozaik-ext-github/git/refs{/sha}","trees_url":"https://api.github.com/repos/plouc/mozaik-ext-github/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plouc/mozaik-ext-github/statuses/{sha}","languages_url":"https://api.github.com/repos/plouc/mozaik-ext-github/languages","stargazers_url":"https://api.github.com/repos/plouc/mozaik-ext-github/stargazers","contributors_url":"https://api.github.com/repos/plouc/mozaik-ext-github/contributors","subscribers_url":"https://api.github.com/repos/plouc/mozaik-ext-github/subscribers","subscription_url":"https://api.github.com/repos/plouc/mozaik-ext-github/subscription","commits_url":"https://api.github.com/repos/plouc/mozaik-ext-github/commits{/sha}","git_commits_url":"https://api.github.com/repos/plouc/mozaik-ext-github/git/commits{/sha}","comments_url":"https://api.github.com/repos/plouc/mozaik-ext-github/comments{/number}","issue_comment_url":"https://api.github.com/repos/plouc/mozaik-ext-github/issues/comments{/number}","contents_url":"https://api.github.com/repos/plouc/mozaik-ext-github/contents/{+path}","compare_url":"https://api.github.com/repos/plouc/mozaik-ext-github/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plouc/mozaik-ext-github/merges","archive_url":"https://api.github.com/repos/plouc/mozaik-ext-github/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plouc/mozaik-ext-github/downloads","issues_url":"https://api.github.com/repos/plouc/mozaik-ext-github/issues{/number}","pulls_url":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls{/number}","milestones_url":"https://api.github.com/repos/plouc/mozaik-ext-github/milestones{/number}","notifications_url":"https://api.github.com/repos/plouc/mozaik-ext-github/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plouc/mozaik-ext-github/labels{/name}","releases_url":"https://api.github.com/repos/plouc/mozaik-ext-github/releases{/id}","deployments_url":"https://api.github.com/repos/plouc/mozaik-ext-github/deployments","created_at":"2015-02-16T19:34:55Z","updated_at":"2016-01-15T12:26:09Z","pushed_at":"2016-03-18T03:22:11Z","git_url":"git://github.com/plouc/mozaik-ext-github.git","ssh_url":"git@github.com:plouc/mozaik-ext-github.git","clone_url":"https://github.com/plouc/mozaik-ext-github.git","svn_url":"https://github.com/plouc/mozaik-ext-github","homepage":"","size":315,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/8"},"html":{"href":"https://github.com/plouc/mozaik-ext-github/pull/8"},"issue":{"href":"https://api.github.com/repos/plouc/mozaik-ext-github/issues/8"},"comments":{"href":"https://api.github.com/repos/plouc/mozaik-ext-github/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/plouc/mozaik-ext-github/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/plouc/mozaik-ext-github/statuses/720d2c24f935dc84b878e0316386984bc9b96039"}}}}