{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/comments/197377213","pull_request_review_id":131109936,"id":197377213,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzM3NzIxMw==","diff_hunk":"@@ -0,0 +1,29 @@\n+package com.gu.zuora.retention.filterCandidates\n+\n+import java.io.ByteArrayInputStream\n+\n+import com.amazonaws.services.s3.model.{ObjectMetadata, PutObjectRequest, PutObjectResult}\n+import com.gu.zuora.reports.S3ReportUpload.logger\n+\n+import scala.util.Try\n+\n+object UploadToS3 {\n+\n+  def apply(\n+    s3Write: PutObjectRequest => Try[PutObjectResult],\n+    bucket: String\n+  )(filteredCandidates: Iterator[String], key: String) = {\n+    val uploadLocation = s\"s3://$bucket/$key\"","path":"handlers/zuora-retention/src/main/scala/com/gu/zuora/retention/filterCandidates/UploadToS3.scala","position":16,"original_position":16,"commit_id":"c2cbe50a1c8a03a2c7c47515b792d7b99b9d3e5c","original_commit_id":"eee8e6aeb79fe04a7e73a4de636fe9ee60ab3819","user":{"login":"johnduffell","id":7304387,"node_id":"MDQ6VXNlcjczMDQzODc=","avatar_url":"https://avatars1.githubusercontent.com/u/7304387?v=4","gravatar_id":"","url":"https://api.github.com/users/johnduffell","html_url":"https://github.com/johnduffell","followers_url":"https://api.github.com/users/johnduffell/followers","following_url":"https://api.github.com/users/johnduffell/following{/other_user}","gists_url":"https://api.github.com/users/johnduffell/gists{/gist_id}","starred_url":"https://api.github.com/users/johnduffell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnduffell/subscriptions","organizations_url":"https://api.github.com/users/johnduffell/orgs","repos_url":"https://api.github.com/users/johnduffell/repos","events_url":"https://api.github.com/users/johnduffell/events{/privacy}","received_events_url":"https://api.github.com/users/johnduffell/received_events","type":"User","site_admin":false},"body":"fair enough, if that is the case then serialising and deserialising to a single string would be an unnecessary risk","created_at":"2018-06-22T08:35:21Z","updated_at":"2018-06-22T08:35:21Z","html_url":"https://github.com/guardian/zuora-auto-cancel/pull/116#discussion_r197377213","pull_request_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/116","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/comments/197377213"},"html":{"href":"https://github.com/guardian/zuora-auto-cancel/pull/116#discussion_r197377213"},"pull_request":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/116"}},"in_reply_to_id":196949660},"pull_request":{"url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/116","id":196150983,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2MTUwOTgz","html_url":"https://github.com/guardian/zuora-auto-cancel/pull/116","diff_url":"https://github.com/guardian/zuora-auto-cancel/pull/116.diff","patch_url":"https://github.com/guardian/zuora-auto-cancel/pull/116.patch","issue_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/116","number":116,"state":"open","locked":false,"title":"Zuora retention ","user":{"login":"pvighi","id":15324270,"node_id":"MDQ6VXNlcjE1MzI0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/15324270?v=4","gravatar_id":"","url":"https://api.github.com/users/pvighi","html_url":"https://github.com/pvighi","followers_url":"https://api.github.com/users/pvighi/followers","following_url":"https://api.github.com/users/pvighi/following{/other_user}","gists_url":"https://api.github.com/users/pvighi/gists{/gist_id}","starred_url":"https://api.github.com/users/pvighi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvighi/subscriptions","organizations_url":"https://api.github.com/users/pvighi/orgs","repos_url":"https://api.github.com/users/pvighi/repos","events_url":"https://api.github.com/users/pvighi/events{/privacy}","received_events_url":"https://api.github.com/users/pvighi/received_events","type":"User","site_admin":false},"body":"Zuora retention state machine. This should execute a couple of AquaQueries and combine the results to get a list of accounts to mark with ProcessingAdvice= 'DoNotProcess'.\r\n\r\n![statemachine](https://user-images.githubusercontent.com/15324270/41733670-75ad6c6c-757c-11e8-9eda-ed130b3af50d.png)\r\n\r\n\r\n","created_at":"2018-06-20T14:01:58Z","updated_at":"2018-06-22T08:35:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7596f350e5b1fa3fdeccf2308c51af9c3c1e1f68","assignee":{"login":"paulbrown1982","id":1515970,"node_id":"MDQ6VXNlcjE1MTU5NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1515970?v=4","gravatar_id":"","url":"https://api.github.com/users/paulbrown1982","html_url":"https://github.com/paulbrown1982","followers_url":"https://api.github.com/users/paulbrown1982/followers","following_url":"https://api.github.com/users/paulbrown1982/following{/other_user}","gists_url":"https://api.github.com/users/paulbrown1982/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbrown1982/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbrown1982/subscriptions","organizations_url":"https://api.github.com/users/paulbrown1982/orgs","repos_url":"https://api.github.com/users/paulbrown1982/repos","events_url":"https://api.github.com/users/paulbrown1982/events{/privacy}","received_events_url":"https://api.github.com/users/paulbrown1982/received_events","type":"User","site_admin":false},"assignees":[{"login":"paulbrown1982","id":1515970,"node_id":"MDQ6VXNlcjE1MTU5NzA=","avatar_url":"https://avatars3.githubusercontent.com/u/1515970?v=4","gravatar_id":"","url":"https://api.github.com/users/paulbrown1982","html_url":"https://github.com/paulbrown1982","followers_url":"https://api.github.com/users/paulbrown1982/followers","following_url":"https://api.github.com/users/paulbrown1982/following{/other_user}","gists_url":"https://api.github.com/users/paulbrown1982/gists{/gist_id}","starred_url":"https://api.github.com/users/paulbrown1982/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulbrown1982/subscriptions","organizations_url":"https://api.github.com/users/paulbrown1982/orgs","repos_url":"https://api.github.com/users/paulbrown1982/repos","events_url":"https://api.github.com/users/paulbrown1982/events{/privacy}","received_events_url":"https://api.github.com/users/paulbrown1982/received_events","type":"User","site_admin":false},{"login":"johnduffell","id":7304387,"node_id":"MDQ6VXNlcjczMDQzODc=","avatar_url":"https://avatars1.githubusercontent.com/u/7304387?v=4","gravatar_id":"","url":"https://api.github.com/users/johnduffell","html_url":"https://github.com/johnduffell","followers_url":"https://api.github.com/users/johnduffell/followers","following_url":"https://api.github.com/users/johnduffell/following{/other_user}","gists_url":"https://api.github.com/users/johnduffell/gists{/gist_id}","starred_url":"https://api.github.com/users/johnduffell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnduffell/subscriptions","organizations_url":"https://api.github.com/users/johnduffell/orgs","repos_url":"https://api.github.com/users/johnduffell/repos","events_url":"https://api.github.com/users/johnduffell/events{/privacy}","received_events_url":"https://api.github.com/users/johnduffell/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/116/commits","review_comments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/116/comments","review_comment_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/116/comments","statuses_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/statuses/c2cbe50a1c8a03a2c7c47515b792d7b99b9d3e5c","head":{"label":"guardian:pv-reportsLib3","ref":"pv-reportsLib3","sha":"c2cbe50a1c8a03a2c7c47515b792d7b99b9d3e5c","user":{"login":"guardian","id":164318,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDMxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":80627505,"node_id":"MDEwOlJlcG9zaXRvcnk4MDYyNzUwNQ==","name":"zuora-auto-cancel","full_name":"guardian/zuora-auto-cancel","owner":{"login":"guardian","id":164318,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDMxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/zuora-auto-cancel","description":"Lambdas covering supporter operations, mostly in life operations","fork":false,"url":"https://api.github.com/repos/guardian/zuora-auto-cancel","forks_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/forks","keys_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/teams","hooks_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/hooks","issue_events_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/events","assignees_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/tags","blobs_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/languages","stargazers_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/stargazers","contributors_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/contributors","subscribers_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/subscribers","subscription_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/subscription","commits_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/merges","archive_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/downloads","issues_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/labels{/name}","releases_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/deployments","created_at":"2017-02-01T14:25:47Z","updated_at":"2018-06-18T09:52:09Z","pushed_at":"2018-06-21T16:48:18Z","git_url":"git://github.com/guardian/zuora-auto-cancel.git","ssh_url":"git@github.com:guardian/zuora-auto-cancel.git","clone_url":"https://github.com/guardian/zuora-auto-cancel.git","svn_url":"https://github.com/guardian/zuora-auto-cancel","homepage":"","size":1282,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"1a2fe09340d685a48ffcb1883149bf9c8547d256","user":{"login":"guardian","id":164318,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDMxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":80627505,"node_id":"MDEwOlJlcG9zaXRvcnk4MDYyNzUwNQ==","name":"zuora-auto-cancel","full_name":"guardian/zuora-auto-cancel","owner":{"login":"guardian","id":164318,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NDMxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/164318?v=4","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/zuora-auto-cancel","description":"Lambdas covering supporter operations, mostly in life operations","fork":false,"url":"https://api.github.com/repos/guardian/zuora-auto-cancel","forks_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/forks","keys_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/teams","hooks_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/hooks","issue_events_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/events","assignees_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/tags","blobs_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/languages","stargazers_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/stargazers","contributors_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/contributors","subscribers_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/subscribers","subscription_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/subscription","commits_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/merges","archive_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/downloads","issues_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/labels{/name}","releases_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/zuora-auto-cancel/deployments","created_at":"2017-02-01T14:25:47Z","updated_at":"2018-06-18T09:52:09Z","pushed_at":"2018-06-21T16:48:18Z","git_url":"git://github.com/guardian/zuora-auto-cancel.git","ssh_url":"git@github.com:guardian/zuora-auto-cancel.git","clone_url":"https://github.com/guardian/zuora-auto-cancel.git","svn_url":"https://github.com/guardian/zuora-auto-cancel","homepage":"","size":1282,"stargazers_count":3,"watchers_count":3,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/116"},"html":{"href":"https://github.com/guardian/zuora-auto-cancel/pull/116"},"issue":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/116"},"comments":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/issues/116/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/116/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/pulls/116/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/zuora-auto-cancel/statuses/c2cbe50a1c8a03a2c7c47515b792d7b99b9d3e5c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"johnduffell"}}