{"action":"created","comment":{"url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/comments/58697249","id":58697249,"diff_hunk":"@@ -81,15 +81,13 @@ def snapshot_jira_event(event)\n \n     def snapshot_deploy_event(event)\n       return unless event.version\n-      begin\n-        last_deploy = latest_production_deploy(event.app_name, event.locale, event.created_at)\n-        released_commits = released_commits(event.app_name, event.version, last_deploy&.version)\n-        released_commits.each do |commit|\n-          update_ticket_deploy_data(event, commit)\n-        end\n-      rescue GitRepositoryLoader::NotFound, GitRepository::CommitNotValid, GitRepository::CommitNotFound => e\n-        log_warning(e, event)\n+\n+      last_deploy = latest_production_deploy(event.app_name, event.locale, event.created_at)\n+      released_commits(event.app_name, event.version, last_deploy&.version).each do |commit|\n+        update_ticket_deploy_data(event, commit)\n       end\n+    rescue GitRepositoryLoader::NotFound, GitRepository::CommitNotValid, GitRepository::CommitNotFound => e\n+      Rails.logger.warn \"Could not snapshot DeployEvent #{event.id} for '#{event.app_name}'\\n#{e.message}\"","path":"app/models/repositories/released_ticket_repository.rb","position":18,"original_position":18,"commit_id":"7687eebf29de185083c38e93225c8a5c8a44c159","original_commit_id":"7687eebf29de185083c38e93225c8a5c8a44c159","user":{"login":"dideler","id":497458,"avatar_url":"https://avatars.githubusercontent.com/u/497458?v=3","gravatar_id":"","url":"https://api.github.com/users/dideler","html_url":"https://github.com/dideler","followers_url":"https://api.github.com/users/dideler/followers","following_url":"https://api.github.com/users/dideler/following{/other_user}","gists_url":"https://api.github.com/users/dideler/gists{/gist_id}","starred_url":"https://api.github.com/users/dideler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dideler/subscriptions","organizations_url":"https://api.github.com/users/dideler/orgs","repos_url":"https://api.github.com/users/dideler/repos","events_url":"https://api.github.com/users/dideler/events{/privacy}","received_events_url":"https://api.github.com/users/dideler/received_events","type":"User","site_admin":false},"body":"Not sure if we should also be notifying Honeybadger here?","created_at":"2016-04-06T12:43:02Z","updated_at":"2016-04-06T12:43:02Z","html_url":"https://github.com/FundingCircle/shipment_tracker/pull/164#discussion_r58697249","pull_request_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/164","_links":{"self":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/comments/58697249"},"html":{"href":"https://github.com/FundingCircle/shipment_tracker/pull/164#discussion_r58697249"},"pull_request":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/164"}}},"pull_request":{"url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/164","id":65456463,"html_url":"https://github.com/FundingCircle/shipment_tracker/pull/164","diff_url":"https://github.com/FundingCircle/shipment_tracker/pull/164.diff","patch_url":"https://github.com/FundingCircle/shipment_tracker/pull/164.patch","issue_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/164","number":164,"state":"open","locked":false,"title":"Handle exception when failing to expand a deploy version","user":{"login":"dideler","id":497458,"avatar_url":"https://avatars.githubusercontent.com/u/497458?v=3","gravatar_id":"","url":"https://api.github.com/users/dideler","html_url":"https://github.com/dideler","followers_url":"https://api.github.com/users/dideler/followers","following_url":"https://api.github.com/users/dideler/following{/other_user}","gists_url":"https://api.github.com/users/dideler/gists{/gist_id}","starred_url":"https://api.github.com/users/dideler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dideler/subscriptions","organizations_url":"https://api.github.com/users/dideler/orgs","repos_url":"https://api.github.com/users/dideler/repos","events_url":"https://api.github.com/users/dideler/events{/privacy}","received_events_url":"https://api.github.com/users/dideler/received_events","type":"User","site_admin":false},"body":"An uncaught exception is raised when we have DeployEvents for an app but the git repository is missing, because it was never onboarded or it was removed. This rescues the exception (so the updater doesn't blow up) and notifies Honeybadger until we have a better solution.\r\n\r\n@FundingCircle/black-bat please review -- this issue is currently present on staging and development (if you use staging data), and is bound to happen on production.","created_at":"2016-04-06T12:22:06Z","updated_at":"2016-04-06T12:43:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d5a8f04ac6e5469048b2256dbabde80c3abbe61","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/164/commits","review_comments_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/164/comments","review_comment_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/164/comments","statuses_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/statuses/7687eebf29de185083c38e93225c8a5c8a44c159","head":{"label":"FundingCircle:ENG-712-rescue-when-version-cannot-expand","ref":"ENG-712-rescue-when-version-cannot-expand","sha":"7687eebf29de185083c38e93225c8a5c8a44c159","user":{"login":"FundingCircle","id":834834,"avatar_url":"https://avatars.githubusercontent.com/u/834834?v=3","gravatar_id":"","url":"https://api.github.com/users/FundingCircle","html_url":"https://github.com/FundingCircle","followers_url":"https://api.github.com/users/FundingCircle/followers","following_url":"https://api.github.com/users/FundingCircle/following{/other_user}","gists_url":"https://api.github.com/users/FundingCircle/gists{/gist_id}","starred_url":"https://api.github.com/users/FundingCircle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FundingCircle/subscriptions","organizations_url":"https://api.github.com/users/FundingCircle/orgs","repos_url":"https://api.github.com/users/FundingCircle/repos","events_url":"https://api.github.com/users/FundingCircle/events{/privacy}","received_events_url":"https://api.github.com/users/FundingCircle/received_events","type":"Organization","site_admin":false},"repo":{"id":34510688,"name":"shipment_tracker","full_name":"FundingCircle/shipment_tracker","owner":{"login":"FundingCircle","id":834834,"avatar_url":"https://avatars.githubusercontent.com/u/834834?v=3","gravatar_id":"","url":"https://api.github.com/users/FundingCircle","html_url":"https://github.com/FundingCircle","followers_url":"https://api.github.com/users/FundingCircle/followers","following_url":"https://api.github.com/users/FundingCircle/following{/other_user}","gists_url":"https://api.github.com/users/FundingCircle/gists{/gist_id}","starred_url":"https://api.github.com/users/FundingCircle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FundingCircle/subscriptions","organizations_url":"https://api.github.com/users/FundingCircle/orgs","repos_url":"https://api.github.com/users/FundingCircle/repos","events_url":"https://api.github.com/users/FundingCircle/events{/privacy}","received_events_url":"https://api.github.com/users/FundingCircle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FundingCircle/shipment_tracker","description":"Tracks shipment of software versions for Financial Conduct Authority auditing purposes","fork":false,"url":"https://api.github.com/repos/FundingCircle/shipment_tracker","forks_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/forks","keys_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/teams","hooks_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/hooks","issue_events_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/events{/number}","events_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/events","assignees_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/assignees{/user}","branches_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/branches{/branch}","tags_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/tags","blobs_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/languages","stargazers_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/stargazers","contributors_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/contributors","subscribers_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/subscribers","subscription_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/subscription","commits_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/contents/{+path}","compare_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/merges","archive_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/downloads","issues_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues{/number}","pulls_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/labels{/name}","releases_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/releases{/id}","deployments_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/deployments","created_at":"2015-04-24T09:43:59Z","updated_at":"2016-02-23T19:50:36Z","pushed_at":"2016-04-06T12:42:11Z","git_url":"git://github.com/FundingCircle/shipment_tracker.git","ssh_url":"git@github.com:FundingCircle/shipment_tracker.git","clone_url":"https://github.com/FundingCircle/shipment_tracker.git","svn_url":"https://github.com/FundingCircle/shipment_tracker","homepage":"","size":1645,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":4,"default_branch":"master"}},"base":{"label":"FundingCircle:master","ref":"master","sha":"4d02762f3361febc75bd32cbe46dd012b9e7a631","user":{"login":"FundingCircle","id":834834,"avatar_url":"https://avatars.githubusercontent.com/u/834834?v=3","gravatar_id":"","url":"https://api.github.com/users/FundingCircle","html_url":"https://github.com/FundingCircle","followers_url":"https://api.github.com/users/FundingCircle/followers","following_url":"https://api.github.com/users/FundingCircle/following{/other_user}","gists_url":"https://api.github.com/users/FundingCircle/gists{/gist_id}","starred_url":"https://api.github.com/users/FundingCircle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FundingCircle/subscriptions","organizations_url":"https://api.github.com/users/FundingCircle/orgs","repos_url":"https://api.github.com/users/FundingCircle/repos","events_url":"https://api.github.com/users/FundingCircle/events{/privacy}","received_events_url":"https://api.github.com/users/FundingCircle/received_events","type":"Organization","site_admin":false},"repo":{"id":34510688,"name":"shipment_tracker","full_name":"FundingCircle/shipment_tracker","owner":{"login":"FundingCircle","id":834834,"avatar_url":"https://avatars.githubusercontent.com/u/834834?v=3","gravatar_id":"","url":"https://api.github.com/users/FundingCircle","html_url":"https://github.com/FundingCircle","followers_url":"https://api.github.com/users/FundingCircle/followers","following_url":"https://api.github.com/users/FundingCircle/following{/other_user}","gists_url":"https://api.github.com/users/FundingCircle/gists{/gist_id}","starred_url":"https://api.github.com/users/FundingCircle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FundingCircle/subscriptions","organizations_url":"https://api.github.com/users/FundingCircle/orgs","repos_url":"https://api.github.com/users/FundingCircle/repos","events_url":"https://api.github.com/users/FundingCircle/events{/privacy}","received_events_url":"https://api.github.com/users/FundingCircle/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FundingCircle/shipment_tracker","description":"Tracks shipment of software versions for Financial Conduct Authority auditing purposes","fork":false,"url":"https://api.github.com/repos/FundingCircle/shipment_tracker","forks_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/forks","keys_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/teams","hooks_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/hooks","issue_events_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/events{/number}","events_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/events","assignees_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/assignees{/user}","branches_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/branches{/branch}","tags_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/tags","blobs_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/refs{/sha}","trees_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/statuses/{sha}","languages_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/languages","stargazers_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/stargazers","contributors_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/contributors","subscribers_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/subscribers","subscription_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/subscription","commits_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/commits{/sha}","git_commits_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/git/commits{/sha}","comments_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/comments{/number}","issue_comment_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/comments{/number}","contents_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/contents/{+path}","compare_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/merges","archive_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/downloads","issues_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues{/number}","pulls_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls{/number}","milestones_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/milestones{/number}","notifications_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/labels{/name}","releases_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/releases{/id}","deployments_url":"https://api.github.com/repos/FundingCircle/shipment_tracker/deployments","created_at":"2015-04-24T09:43:59Z","updated_at":"2016-02-23T19:50:36Z","pushed_at":"2016-04-06T12:42:11Z","git_url":"git://github.com/FundingCircle/shipment_tracker.git","ssh_url":"git@github.com:FundingCircle/shipment_tracker.git","clone_url":"https://github.com/FundingCircle/shipment_tracker.git","svn_url":"https://github.com/FundingCircle/shipment_tracker","homepage":"","size":1645,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":7,"forks":2,"open_issues":7,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/164"},"html":{"href":"https://github.com/FundingCircle/shipment_tracker/pull/164"},"issue":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/164"},"comments":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/issues/164/comments"},"review_comments":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/164/comments"},"review_comment":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/pulls/164/commits"},"statuses":{"href":"https://api.github.com/repos/FundingCircle/shipment_tracker/statuses/7687eebf29de185083c38e93225c8a5c8a44c159"}}}}