{"action":"created","comment":{"url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/comments/221856669","pull_request_review_id":160604327,"id":221856669,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTg1NjY2OQ==","diff_hunk":"@@ -67,33 +69,57 @@ const BuildRow = (props) => {\n     ? `/user/${repository.fullName}/${buildId}`\n     : null;\n \n-  return (\n-    <Row key={ buildId }>\n-      <Data col=\"15\">\n-        { buildUrl\n-          ? <Link to={buildUrl}>{`#${buildId}`}</Link>\n-          : <span>{`#${buildId}`}</span>\n-        }\n-      </Data>\n-      <Data col=\"20\">\n-        { getBuildTriggerMessage(repository, reason, commitId) }\n-      </Data>\n-      <Data col=\"15\">\n-        {architecture}\n-      </Data>\n-      <Data col=\"15\">\n-        {humanDuration}\n-      </Data>\n-      <Data col=\"35\">\n-        <BuildStatus\n-          link={buildUrl}\n-          colour={colour}\n-          statusMessage={statusMessage}\n-          dateStarted={dateStarted}\n-        />\n-      </Data>\n-    </Row>\n+  const buildTriggerCell = (\n+    <Data col=\"20\">\n+      { getBuildTriggerMessage(repository, reason, commitId) }\n+    </Data>\n   );\n+\n+  if (isRequest) {","path":"src/common/components/build-row/index.js","position":52,"original_position":52,"commit_id":"c731e42b784c7f922fdaac1015b3a70a5a74d49e","original_commit_id":"cc8cd7222c41976be227328578c0b0dba66c046f","user":{"login":"cjwatson","id":2429141,"node_id":"MDQ6VXNlcjI0MjkxNDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2429141?v=4","gravatar_id":"","url":"https://api.github.com/users/cjwatson","html_url":"https://github.com/cjwatson","followers_url":"https://api.github.com/users/cjwatson/followers","following_url":"https://api.github.com/users/cjwatson/following{/other_user}","gists_url":"https://api.github.com/users/cjwatson/gists{/gist_id}","starred_url":"https://api.github.com/users/cjwatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjwatson/subscriptions","organizations_url":"https://api.github.com/users/cjwatson/orgs","repos_url":"https://api.github.com/users/cjwatson/repos","events_url":"https://api.github.com/users/cjwatson/events{/privacy}","received_events_url":"https://api.github.com/users/cjwatson/received_events","type":"User","site_admin":false},"body":"That was what I did in my first pass.  When I worked out that the internal API needs to merge builds and requests I merged them back into a single component, but maybe you're right that they'd be better separated.  I'll look into that.\r\n\r\nThe `statusMessage` comparison is IMO not as bad as it looks, because that's effectively an enumerated list controlled by BSI (see `UserFacingState`), and there's some precedent such as in `src/common/containers/build-details.js`.  I agree that it would be nicer to have this be something that's more obviously an enum rather than display text, but since it's following an existing pattern I think we could reasonably do that in a separate PR?","created_at":"2018-10-02T08:06:26Z","updated_at":"2018-10-02T08:06:26Z","html_url":"https://github.com/canonical-websites/build.snapcraft.io/pull/1152#discussion_r221856669","pull_request_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/1152","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/comments/221856669"},"html":{"href":"https://github.com/canonical-websites/build.snapcraft.io/pull/1152#discussion_r221856669"},"pull_request":{"href":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/1152"}},"in_reply_to_id":221854073},"pull_request":{"url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/1152","id":219444742,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5NDQ0NzQy","html_url":"https://github.com/canonical-websites/build.snapcraft.io/pull/1152","diff_url":"https://github.com/canonical-websites/build.snapcraft.io/pull/1152.diff","patch_url":"https://github.com/canonical-websites/build.snapcraft.io/pull/1152.patch","issue_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/issues/1152","number":1152,"state":"open","locked":false,"title":"Prepare UI for upcoming build request changes","user":{"login":"cjwatson","id":2429141,"node_id":"MDQ6VXNlcjI0MjkxNDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2429141?v=4","gravatar_id":"","url":"https://api.github.com/users/cjwatson","html_url":"https://github.com/cjwatson","followers_url":"https://api.github.com/users/cjwatson/followers","following_url":"https://api.github.com/users/cjwatson/following{/other_user}","gists_url":"https://api.github.com/users/cjwatson/gists{/gist_id}","starred_url":"https://api.github.com/users/cjwatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjwatson/subscriptions","organizations_url":"https://api.github.com/users/cjwatson/orgs","repos_url":"https://api.github.com/users/cjwatson/repos","events_url":"https://api.github.com/users/cjwatson/events{/privacy}","received_events_url":"https://api.github.com/users/cjwatson/received_events","type":"User","site_admin":false},"body":"We will shortly need to change new snap build requests to be dispatched\r\nmore asynchronously, in order that Launchpad can fetch `snapcraft.yaml`\r\nfrom the repository and decide which architectures the snap should be\r\nbuilt for.  This means that a snap can be in a state where it has\r\npending build requests (different from pending builds: for instance,\r\nthey don't have an architecture), and also where it has failed build\r\nrequests in its history (for example, because `snapcraft.yaml` is\r\nmalformed in such a way that Launchpad can't determine which\r\narchitectures it should be built for).\r\n\r\nThis prepares the UI layer for that work by ensuring that it can\r\nunderstand the modified server responses and render build requests in\r\nthe builds list.  The server side hasn't been changed yet (that will be\r\na follow-up PR), so this should result in no functional change for the\r\nmoment.\r\n\r\nBuild requests will be interleaved with builds in server responses, and\r\nthe UI tells them apart by looking at the `resource_type_link`.  This\r\nwasn't my first choice for designing the internal API, but it turns out\r\nto be the simplest option: in particular, if we want to be able to\r\nsupport sensible pagination of the combined build and build request\r\nhistory in future then we need to be iterating over a single collection.\r\n\r\nPart of #556.","created_at":"2018-10-01T16:53:22Z","updated_at":"2018-10-02T08:06:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44eb29822a047ce6f116274a69fae47159da03b5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/1152/commits","review_comments_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/1152/comments","review_comment_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/issues/1152/comments","statuses_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/statuses/c731e42b784c7f922fdaac1015b3a70a5a74d49e","head":{"label":"cjwatson:build-request-ui","ref":"build-request-ui","sha":"c731e42b784c7f922fdaac1015b3a70a5a74d49e","user":{"login":"cjwatson","id":2429141,"node_id":"MDQ6VXNlcjI0MjkxNDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2429141?v=4","gravatar_id":"","url":"https://api.github.com/users/cjwatson","html_url":"https://github.com/cjwatson","followers_url":"https://api.github.com/users/cjwatson/followers","following_url":"https://api.github.com/users/cjwatson/following{/other_user}","gists_url":"https://api.github.com/users/cjwatson/gists{/gist_id}","starred_url":"https://api.github.com/users/cjwatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjwatson/subscriptions","organizations_url":"https://api.github.com/users/cjwatson/orgs","repos_url":"https://api.github.com/users/cjwatson/repos","events_url":"https://api.github.com/users/cjwatson/events{/privacy}","received_events_url":"https://api.github.com/users/cjwatson/received_events","type":"User","site_admin":false},"repo":{"id":74580616,"node_id":"MDEwOlJlcG9zaXRvcnk3NDU4MDYxNg==","name":"build.snapcraft.io","full_name":"cjwatson/build.snapcraft.io","private":false,"owner":{"login":"cjwatson","id":2429141,"node_id":"MDQ6VXNlcjI0MjkxNDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2429141?v=4","gravatar_id":"","url":"https://api.github.com/users/cjwatson","html_url":"https://github.com/cjwatson","followers_url":"https://api.github.com/users/cjwatson/followers","following_url":"https://api.github.com/users/cjwatson/following{/other_user}","gists_url":"https://api.github.com/users/cjwatson/gists{/gist_id}","starred_url":"https://api.github.com/users/cjwatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjwatson/subscriptions","organizations_url":"https://api.github.com/users/cjwatson/orgs","repos_url":"https://api.github.com/users/cjwatson/repos","events_url":"https://api.github.com/users/cjwatson/events{/privacy}","received_events_url":"https://api.github.com/users/cjwatson/received_events","type":"User","site_admin":false},"html_url":"https://github.com/cjwatson/build.snapcraft.io","description":"The Snapcraft Build site.","fork":true,"url":"https://api.github.com/repos/cjwatson/build.snapcraft.io","forks_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/forks","keys_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/teams","hooks_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/hooks","issue_events_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/issues/events{/number}","events_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/events","assignees_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/assignees{/user}","branches_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/branches{/branch}","tags_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/tags","blobs_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/statuses/{sha}","languages_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/languages","stargazers_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/stargazers","contributors_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/contributors","subscribers_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/subscribers","subscription_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/subscription","commits_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/contents/{+path}","compare_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/merges","archive_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/downloads","issues_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/issues{/number}","pulls_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/pulls{/number}","milestones_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/milestones{/number}","notifications_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/labels{/name}","releases_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/releases{/id}","deployments_url":"https://api.github.com/repos/cjwatson/build.snapcraft.io/deployments","created_at":"2016-11-23T13:44:40Z","updated_at":"2018-08-03T21:08:30Z","pushed_at":"2018-10-02T07:58:06Z","git_url":"git://github.com/cjwatson/build.snapcraft.io.git","ssh_url":"git@github.com:cjwatson/build.snapcraft.io.git","clone_url":"https://github.com/cjwatson/build.snapcraft.io.git","svn_url":"https://github.com/cjwatson/build.snapcraft.io","homepage":"","size":1551,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"canonical-websites:master","ref":"master","sha":"7ddbbc69f4dc643a820d6f95c8b465b8347aa553","user":{"login":"canonical-websites","id":26072773,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDcyNzcz","avatar_url":"https://avatars2.githubusercontent.com/u/26072773?v=4","gravatar_id":"","url":"https://api.github.com/users/canonical-websites","html_url":"https://github.com/canonical-websites","followers_url":"https://api.github.com/users/canonical-websites/followers","following_url":"https://api.github.com/users/canonical-websites/following{/other_user}","gists_url":"https://api.github.com/users/canonical-websites/gists{/gist_id}","starred_url":"https://api.github.com/users/canonical-websites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canonical-websites/subscriptions","organizations_url":"https://api.github.com/users/canonical-websites/orgs","repos_url":"https://api.github.com/users/canonical-websites/repos","events_url":"https://api.github.com/users/canonical-websites/events{/privacy}","received_events_url":"https://api.github.com/users/canonical-websites/received_events","type":"Organization","site_admin":false},"repo":{"id":74463479,"node_id":"MDEwOlJlcG9zaXRvcnk3NDQ2MzQ3OQ==","name":"build.snapcraft.io","full_name":"canonical-websites/build.snapcraft.io","private":false,"owner":{"login":"canonical-websites","id":26072773,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MDcyNzcz","avatar_url":"https://avatars2.githubusercontent.com/u/26072773?v=4","gravatar_id":"","url":"https://api.github.com/users/canonical-websites","html_url":"https://github.com/canonical-websites","followers_url":"https://api.github.com/users/canonical-websites/followers","following_url":"https://api.github.com/users/canonical-websites/following{/other_user}","gists_url":"https://api.github.com/users/canonical-websites/gists{/gist_id}","starred_url":"https://api.github.com/users/canonical-websites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canonical-websites/subscriptions","organizations_url":"https://api.github.com/users/canonical-websites/orgs","repos_url":"https://api.github.com/users/canonical-websites/repos","events_url":"https://api.github.com/users/canonical-websites/events{/privacy}","received_events_url":"https://api.github.com/users/canonical-websites/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/canonical-websites/build.snapcraft.io","description":"The Snapcraft Build site.","fork":false,"url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io","forks_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/forks","keys_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/teams","hooks_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/hooks","issue_events_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/issues/events{/number}","events_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/events","assignees_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/assignees{/user}","branches_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/branches{/branch}","tags_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/tags","blobs_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/statuses/{sha}","languages_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/languages","stargazers_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/stargazers","contributors_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/contributors","subscribers_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/subscribers","subscription_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/subscription","commits_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/contents/{+path}","compare_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/merges","archive_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/downloads","issues_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/issues{/number}","pulls_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls{/number}","milestones_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/milestones{/number}","notifications_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/labels{/name}","releases_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/releases{/id}","deployments_url":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/deployments","created_at":"2016-11-22T10:55:35Z","updated_at":"2018-10-02T07:55:01Z","pushed_at":"2018-10-02T07:58:07Z","git_url":"git://github.com/canonical-websites/build.snapcraft.io.git","ssh_url":"git@github.com:canonical-websites/build.snapcraft.io.git","clone_url":"https://github.com/canonical-websites/build.snapcraft.io.git","svn_url":"https://github.com/canonical-websites/build.snapcraft.io","homepage":"","size":1763,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"archived":false,"open_issues_count":215,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":18,"open_issues":215,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/1152"},"html":{"href":"https://github.com/canonical-websites/build.snapcraft.io/pull/1152"},"issue":{"href":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/issues/1152"},"comments":{"href":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/issues/1152/comments"},"review_comments":{"href":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/1152/comments"},"review_comment":{"href":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/pulls/1152/commits"},"statuses":{"href":"https://api.github.com/repos/canonical-websites/build.snapcraft.io/statuses/c731e42b784c7f922fdaac1015b3a70a5a74d49e"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"cjwatson"}}