{"action":"closed","number":114,"pull_request":{"url":"https://api.github.com/repos/alphagov/govuk_need_api/pulls/114","id":97930120,"html_url":"https://github.com/alphagov/govuk_need_api/pull/114","diff_url":"https://github.com/alphagov/govuk_need_api/pull/114.diff","patch_url":"https://github.com/alphagov/govuk_need_api/pull/114.patch","issue_url":"https://api.github.com/repos/alphagov/govuk_need_api/issues/114","number":114,"state":"closed","locked":false,"title":"Publish needs to Publishing-API","user":{"login":"binaryberry","id":8225167,"avatar_url":"https://avatars.githubusercontent.com/u/8225167?v=3","gravatar_id":"","url":"https://api.github.com/users/binaryberry","html_url":"https://github.com/binaryberry","followers_url":"https://api.github.com/users/binaryberry/followers","following_url":"https://api.github.com/users/binaryberry/following{/other_user}","gists_url":"https://api.github.com/users/binaryberry/gists{/gist_id}","starred_url":"https://api.github.com/users/binaryberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binaryberry/subscriptions","organizations_url":"https://api.github.com/users/binaryberry/orgs","repos_url":"https://api.github.com/users/binaryberry/repos","events_url":"https://api.github.com/users/binaryberry/events{/privacy}","received_events_url":"https://api.github.com/users/binaryberry/received_events","type":"User","site_admin":false},"body":"This adds a rake task to the need-API allowing to publish needs to Publishing-API, including their previous versions. \r\n\r\nFor the rake task to work, the following PRs will need to be merged:\r\n- Publishing-API's import endpoint PR: https://github.com/alphagov/publishing-api/pull/622\r\n- govuk-content-schemas's enhanced need schema PR: https://github.com/alphagov/govuk-content-schemas/pull/461\r\n- gds-api-adapters's import endpoint PR: https://github.com/alphagov/gds-api-adapters/pull/630\r\n\r\nDecisions:\r\n- treat `organisations` and `duplicate_of` as links in the Publishing-API.  The latter are marked as related links, since they are linking to other needs.\r\n- do not send deprecated fields to the Publishing-API. A few records had fields that are no longer in use in Need-API nor Maslow as they've been replaced by another field, sounded sensible not to add that into the Publishing-API.\r\n- do not send the content-id as part of the payload, as the import endpoint expects it in the url of the request.\r\n\r\n[Trello](https://trello.com/c/jlXiAdmQ/7-add-needs-to-publishing-api)","created_at":"2016-12-14T11:01:34Z","updated_at":"2016-12-15T10:23:55Z","closed_at":"2016-12-15T10:23:55Z","merged_at":"2016-12-15T10:23:55Z","merge_commit_sha":"e905373fd662e4f72f64d1353f99c53eafee5ee2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/govuk_need_api/pulls/114/commits","review_comments_url":"https://api.github.com/repos/alphagov/govuk_need_api/pulls/114/comments","review_comment_url":"https://api.github.com/repos/alphagov/govuk_need_api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/govuk_need_api/issues/114/comments","statuses_url":"https://api.github.com/repos/alphagov/govuk_need_api/statuses/b24880682282fa95e56fcbd3412a3bd4d8143ce9","head":{"label":"alphagov:import-needs","ref":"import-needs","sha":"b24880682282fa95e56fcbd3412a3bd4d8143ce9","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","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":13038728,"name":"govuk_need_api","full_name":"alphagov/govuk_need_api","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","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/govuk_need_api","description":"An API to expose information about user needs behind GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/govuk_need_api","forks_url":"https://api.github.com/repos/alphagov/govuk_need_api/forks","keys_url":"https://api.github.com/repos/alphagov/govuk_need_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk_need_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk_need_api/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk_need_api/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk_need_api/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk_need_api/events","assignees_url":"https://api.github.com/repos/alphagov/govuk_need_api/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk_need_api/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk_need_api/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk_need_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk_need_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk_need_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk_need_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk_need_api/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk_need_api/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk_need_api/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk_need_api/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk_need_api/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk_need_api/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk_need_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk_need_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk_need_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk_need_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk_need_api/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk_need_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk_need_api/merges","archive_url":"https://api.github.com/repos/alphagov/govuk_need_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk_need_api/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk_need_api/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk_need_api/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk_need_api/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk_need_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk_need_api/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk_need_api/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govuk_need_api/deployments","created_at":"2013-09-23T14:59:41Z","updated_at":"2016-11-16T16:32:53Z","pushed_at":"2016-12-15T10:23:55Z","git_url":"git://github.com/alphagov/govuk_need_api.git","ssh_url":"git@github.com:alphagov/govuk_need_api.git","clone_url":"https://github.com/alphagov/govuk_need_api.git","svn_url":"https://github.com/alphagov/govuk_need_api","homepage":null,"size":466,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":6,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"5fc9c9ea92775069c619d285ab98aff40b8d5287","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","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":13038728,"name":"govuk_need_api","full_name":"alphagov/govuk_need_api","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","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/govuk_need_api","description":"An API to expose information about user needs behind GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/govuk_need_api","forks_url":"https://api.github.com/repos/alphagov/govuk_need_api/forks","keys_url":"https://api.github.com/repos/alphagov/govuk_need_api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/govuk_need_api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/govuk_need_api/teams","hooks_url":"https://api.github.com/repos/alphagov/govuk_need_api/hooks","issue_events_url":"https://api.github.com/repos/alphagov/govuk_need_api/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/govuk_need_api/events","assignees_url":"https://api.github.com/repos/alphagov/govuk_need_api/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/govuk_need_api/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/govuk_need_api/tags","blobs_url":"https://api.github.com/repos/alphagov/govuk_need_api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/govuk_need_api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/govuk_need_api/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/govuk_need_api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/govuk_need_api/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/govuk_need_api/languages","stargazers_url":"https://api.github.com/repos/alphagov/govuk_need_api/stargazers","contributors_url":"https://api.github.com/repos/alphagov/govuk_need_api/contributors","subscribers_url":"https://api.github.com/repos/alphagov/govuk_need_api/subscribers","subscription_url":"https://api.github.com/repos/alphagov/govuk_need_api/subscription","commits_url":"https://api.github.com/repos/alphagov/govuk_need_api/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/govuk_need_api/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/govuk_need_api/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/govuk_need_api/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/govuk_need_api/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/govuk_need_api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/govuk_need_api/merges","archive_url":"https://api.github.com/repos/alphagov/govuk_need_api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/govuk_need_api/downloads","issues_url":"https://api.github.com/repos/alphagov/govuk_need_api/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/govuk_need_api/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/govuk_need_api/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/govuk_need_api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/govuk_need_api/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/govuk_need_api/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/govuk_need_api/deployments","created_at":"2013-09-23T14:59:41Z","updated_at":"2016-11-16T16:32:53Z","pushed_at":"2016-12-15T10:23:55Z","git_url":"git://github.com/alphagov/govuk_need_api.git","ssh_url":"git@github.com:alphagov/govuk_need_api.git","clone_url":"https://github.com/alphagov/govuk_need_api.git","svn_url":"https://github.com/alphagov/govuk_need_api","homepage":null,"size":466,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/govuk_need_api/pulls/114"},"html":{"href":"https://github.com/alphagov/govuk_need_api/pull/114"},"issue":{"href":"https://api.github.com/repos/alphagov/govuk_need_api/issues/114"},"comments":{"href":"https://api.github.com/repos/alphagov/govuk_need_api/issues/114/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/govuk_need_api/pulls/114/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/govuk_need_api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/govuk_need_api/pulls/114/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/govuk_need_api/statuses/b24880682282fa95e56fcbd3412a3bd4d8143ce9"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"binaryberry","id":8225167,"avatar_url":"https://avatars.githubusercontent.com/u/8225167?v=3","gravatar_id":"","url":"https://api.github.com/users/binaryberry","html_url":"https://github.com/binaryberry","followers_url":"https://api.github.com/users/binaryberry/followers","following_url":"https://api.github.com/users/binaryberry/following{/other_user}","gists_url":"https://api.github.com/users/binaryberry/gists{/gist_id}","starred_url":"https://api.github.com/users/binaryberry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binaryberry/subscriptions","organizations_url":"https://api.github.com/users/binaryberry/orgs","repos_url":"https://api.github.com/users/binaryberry/repos","events_url":"https://api.github.com/users/binaryberry/events{/privacy}","received_events_url":"https://api.github.com/users/binaryberry/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":10,"additions":141,"deletions":1,"changed_files":4}}
{"actor":{"display_login":"binaryberry"}}