{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/content-publisher/pulls/comments/204758858","pull_request_review_id":139894148,"id":204758858,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDc1ODg1OA==","diff_hunk":"@@ -48,11 +49,11 @@ def options\n   private\n \n     def supertype_options\n-      YAML.load_file(\"app/formats/supertypes.yml\").map do |supertype|\n+      SupertypeSchema.all.map do |supertype|","path":"app/controllers/new_document_controller.rb","position":25,"original_position":25,"commit_id":"8e208ded21333057c264c526903c48b8113c4f44","original_commit_id":"8e208ded21333057c264c526903c48b8113c4f44","user":{"login":"benthorner","id":9029009,"node_id":"MDQ6VXNlcjkwMjkwMDk=","avatar_url":"https://avatars2.githubusercontent.com/u/9029009?v=4","gravatar_id":"","url":"https://api.github.com/users/benthorner","html_url":"https://github.com/benthorner","followers_url":"https://api.github.com/users/benthorner/followers","following_url":"https://api.github.com/users/benthorner/following{/other_user}","gists_url":"https://api.github.com/users/benthorner/gists{/gist_id}","starred_url":"https://api.github.com/users/benthorner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benthorner/subscriptions","organizations_url":"https://api.github.com/users/benthorner/orgs","repos_url":"https://api.github.com/users/benthorner/repos","events_url":"https://api.github.com/users/benthorner/events{/privacy}","received_events_url":"https://api.github.com/users/benthorner/received_events","type":"User","site_admin":false},"body":"Oh, I meant just this bit (assigning @supertype_schemas in the controller).\r\n\r\n```\r\n      @supertype_schemas.all.map do |supertype|\r\n        {\r\n          value: supertype.id,\r\n          text: supertype.label,\r\n          hint_text: supertype.description,\r\n          bold: true,\r\n        }\r\n      end\r\n    end\r\n```\r\n\r\nCompare with line 7 of choose_document_types.html.erb.","created_at":"2018-07-24T13:40:32Z","updated_at":"2018-07-24T13:40:33Z","html_url":"https://github.com/alphagov/content-publisher/pull/37#discussion_r204758858","pull_request_url":"https://api.github.com/repos/alphagov/content-publisher/pulls/37","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/alphagov/content-publisher/pulls/comments/204758858"},"html":{"href":"https://github.com/alphagov/content-publisher/pull/37#discussion_r204758858"},"pull_request":{"href":"https://api.github.com/repos/alphagov/content-publisher/pulls/37"}},"in_reply_to_id":204755796},"pull_request":{"url":"https://api.github.com/repos/alphagov/content-publisher/pulls/37","id":203526457,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNTI2NDU3","html_url":"https://github.com/alphagov/content-publisher/pull/37","diff_url":"https://github.com/alphagov/content-publisher/pull/37.diff","patch_url":"https://github.com/alphagov/content-publisher/pull/37.patch","issue_url":"https://api.github.com/repos/alphagov/content-publisher/issues/37","number":37,"state":"closed","locked":false,"title":"Refactor Document type / Super type concepts","user":{"login":"tijmenb","id":233676,"node_id":"MDQ6VXNlcjIzMzY3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/233676?v=4","gravatar_id":"","url":"https://api.github.com/users/tijmenb","html_url":"https://github.com/tijmenb","followers_url":"https://api.github.com/users/tijmenb/followers","following_url":"https://api.github.com/users/tijmenb/following{/other_user}","gists_url":"https://api.github.com/users/tijmenb/gists{/gist_id}","starred_url":"https://api.github.com/users/tijmenb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tijmenb/subscriptions","organizations_url":"https://api.github.com/users/tijmenb/orgs","repos_url":"https://api.github.com/users/tijmenb/repos","events_url":"https://api.github.com/users/tijmenb/events{/privacy}","received_events_url":"https://api.github.com/users/tijmenb/received_events","type":"User","site_admin":false},"body":"This refactors the app to use the `DocumentTypeSchema` and `SupertypeSchema` classes. Also fixes the bug that we tried to fix in https://github.com/alphagov/content-publisher/pull/36.\n\nBest reviewed per-commit, and with reading the commit message about ActiveModel.\n\nhttps://trello.com/c/PxtaaObC/69-how-can-we-define-format-rules-l\n","created_at":"2018-07-24T13:27:23Z","updated_at":"2018-07-24T13:40:33Z","closed_at":"2018-07-24T13:34:22Z","merged_at":"2018-07-24T13:34:22Z","merge_commit_sha":"903b6f29decdd3429dac01248d7d56c62339516b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/content-publisher/pulls/37/commits","review_comments_url":"https://api.github.com/repos/alphagov/content-publisher/pulls/37/comments","review_comment_url":"https://api.github.com/repos/alphagov/content-publisher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/content-publisher/issues/37/comments","statuses_url":"https://api.github.com/repos/alphagov/content-publisher/statuses/8e208ded21333057c264c526903c48b8113c4f44","head":{"label":"alphagov:refactor-controllers-with-objects","ref":"refactor-controllers-with-objects","sha":"8e208ded21333057c264c526903c48b8113c4f44","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":140405637,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA0MDU2Mzc=","name":"content-publisher","full_name":"alphagov/content-publisher","owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/content-publisher","description":"WIP - Future publisher of content on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/content-publisher","forks_url":"https://api.github.com/repos/alphagov/content-publisher/forks","keys_url":"https://api.github.com/repos/alphagov/content-publisher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/content-publisher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/content-publisher/teams","hooks_url":"https://api.github.com/repos/alphagov/content-publisher/hooks","issue_events_url":"https://api.github.com/repos/alphagov/content-publisher/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/content-publisher/events","assignees_url":"https://api.github.com/repos/alphagov/content-publisher/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/content-publisher/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/content-publisher/tags","blobs_url":"https://api.github.com/repos/alphagov/content-publisher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/content-publisher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/content-publisher/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/content-publisher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/content-publisher/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/content-publisher/languages","stargazers_url":"https://api.github.com/repos/alphagov/content-publisher/stargazers","contributors_url":"https://api.github.com/repos/alphagov/content-publisher/contributors","subscribers_url":"https://api.github.com/repos/alphagov/content-publisher/subscribers","subscription_url":"https://api.github.com/repos/alphagov/content-publisher/subscription","commits_url":"https://api.github.com/repos/alphagov/content-publisher/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/content-publisher/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/content-publisher/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/content-publisher/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/content-publisher/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/content-publisher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/content-publisher/merges","archive_url":"https://api.github.com/repos/alphagov/content-publisher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/content-publisher/downloads","issues_url":"https://api.github.com/repos/alphagov/content-publisher/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/content-publisher/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/content-publisher/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/content-publisher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/content-publisher/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/content-publisher/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/content-publisher/deployments","created_at":"2018-07-10T09:00:26Z","updated_at":"2018-07-24T13:34:24Z","pushed_at":"2018-07-24T13:36:34Z","git_url":"git://github.com/alphagov/content-publisher.git","ssh_url":"git@github.com:alphagov/content-publisher.git","clone_url":"https://github.com/alphagov/content-publisher.git","svn_url":"https://github.com/alphagov/content-publisher","homepage":"https://docs.publishing.service.gov.uk/apps/content-publisher.html","size":204,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"49eca084fdc664184204f1b05f325d8edb6115a5","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":140405637,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA0MDU2Mzc=","name":"content-publisher","full_name":"alphagov/content-publisher","owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/content-publisher","description":"WIP - Future publisher of content on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/content-publisher","forks_url":"https://api.github.com/repos/alphagov/content-publisher/forks","keys_url":"https://api.github.com/repos/alphagov/content-publisher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/content-publisher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/content-publisher/teams","hooks_url":"https://api.github.com/repos/alphagov/content-publisher/hooks","issue_events_url":"https://api.github.com/repos/alphagov/content-publisher/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/content-publisher/events","assignees_url":"https://api.github.com/repos/alphagov/content-publisher/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/content-publisher/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/content-publisher/tags","blobs_url":"https://api.github.com/repos/alphagov/content-publisher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/content-publisher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/content-publisher/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/content-publisher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/content-publisher/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/content-publisher/languages","stargazers_url":"https://api.github.com/repos/alphagov/content-publisher/stargazers","contributors_url":"https://api.github.com/repos/alphagov/content-publisher/contributors","subscribers_url":"https://api.github.com/repos/alphagov/content-publisher/subscribers","subscription_url":"https://api.github.com/repos/alphagov/content-publisher/subscription","commits_url":"https://api.github.com/repos/alphagov/content-publisher/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/content-publisher/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/content-publisher/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/content-publisher/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/content-publisher/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/content-publisher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/content-publisher/merges","archive_url":"https://api.github.com/repos/alphagov/content-publisher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/content-publisher/downloads","issues_url":"https://api.github.com/repos/alphagov/content-publisher/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/content-publisher/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/content-publisher/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/content-publisher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/content-publisher/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/content-publisher/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/content-publisher/deployments","created_at":"2018-07-10T09:00:26Z","updated_at":"2018-07-24T13:34:24Z","pushed_at":"2018-07-24T13:36:34Z","git_url":"git://github.com/alphagov/content-publisher.git","ssh_url":"git@github.com:alphagov/content-publisher.git","clone_url":"https://github.com/alphagov/content-publisher.git","svn_url":"https://github.com/alphagov/content-publisher","homepage":"https://docs.publishing.service.gov.uk/apps/content-publisher.html","size":204,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/content-publisher/pulls/37"},"html":{"href":"https://github.com/alphagov/content-publisher/pull/37"},"issue":{"href":"https://api.github.com/repos/alphagov/content-publisher/issues/37"},"comments":{"href":"https://api.github.com/repos/alphagov/content-publisher/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/content-publisher/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/content-publisher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/content-publisher/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/content-publisher/statuses/8e208ded21333057c264c526903c48b8113c4f44"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"benthorner"}}