{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pontoon/issues/370","repository_url":"https://api.github.com/repos/mozilla/pontoon","labels_url":"https://api.github.com/repos/mozilla/pontoon/issues/370/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pontoon/issues/370/comments","events_url":"https://api.github.com/repos/mozilla/pontoon/issues/370/events","html_url":"https://github.com/mozilla/pontoon/pull/370","id":143817106,"number":370,"title":"Fix bug 1201431. Remove the obsolete resources.","user":{"login":"jotes","id":8784972,"avatar_url":"https://avatars.githubusercontent.com/u/8784972?v=3","gravatar_id":"","url":"https://api.github.com/users/jotes","html_url":"https://github.com/jotes","followers_url":"https://api.github.com/users/jotes/followers","following_url":"https://api.github.com/users/jotes/following{/other_user}","gists_url":"https://api.github.com/users/jotes/gists{/gist_id}","starred_url":"https://api.github.com/users/jotes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jotes/subscriptions","organizations_url":"https://api.github.com/users/jotes/orgs","repos_url":"https://api.github.com/users/jotes/repos","events_url":"https://api.github.com/users/jotes/events{/privacy}","received_events_url":"https://api.github.com/users/jotes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-27T15:01:24Z","updated_at":"2016-03-28T13:04:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/pontoon/pulls/370","html_url":"https://github.com/mozilla/pontoon/pull/370","diff_url":"https://github.com/mozilla/pontoon/pull/370.diff","patch_url":"https://github.com/mozilla/pontoon/pull/370.patch"},"body":"Hi @mathjazz, could you review?"},"comment":{"url":"https://api.github.com/repos/mozilla/pontoon/issues/comments/202383362","html_url":"https://github.com/mozilla/pontoon/pull/370#issuecomment-202383362","issue_url":"https://api.github.com/repos/mozilla/pontoon/issues/370","id":202383362,"user":{"login":"mathjazz","id":626716,"avatar_url":"https://avatars.githubusercontent.com/u/626716?v=3","gravatar_id":"","url":"https://api.github.com/users/mathjazz","html_url":"https://github.com/mathjazz","followers_url":"https://api.github.com/users/mathjazz/followers","following_url":"https://api.github.com/users/mathjazz/following{/other_user}","gists_url":"https://api.github.com/users/mathjazz/gists{/gist_id}","starred_url":"https://api.github.com/users/mathjazz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathjazz/subscriptions","organizations_url":"https://api.github.com/users/mathjazz/orgs","repos_url":"https://api.github.com/users/mathjazz/repos","events_url":"https://api.github.com/users/mathjazz/events{/privacy}","received_events_url":"https://api.github.com/users/mathjazz/received_events","type":"User","site_admin":false},"created_at":"2016-03-28T13:04:27Z","updated_at":"2016-03-28T13:04:27Z","body":"Great job, @jotes! I've only added a few comments for more or less cosmetic improvements. I tested it and it works fine!\r\n\r\nThe only thing that needs to be added is stats update. During sync we update stats in `update_translated_resources`, but we skip this step for removed Resources of course.\r\n\r\nYou could probably do that in `sync_project_repo`, where aggregated stats will have to be update for each `Project` and then for each `Locale` and `ProjectLocale`. We could make use of the `aggregate_stats` methods available in all these models."}}