{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/hound/issues/586","labels_url":"https://api.github.com/repos/thoughtbot/hound/issues/586/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/hound/issues/586/comments","events_url":"https://api.github.com/repos/thoughtbot/hound/issues/586/events","html_url":"https://github.com/thoughtbot/hound/pull/586","id":55566569,"number":586,"title":"Adds owners tables and \tassigns owner in repo creation / update","user":{"login":"srt32","id":2181356,"avatar_url":"https://avatars.githubusercontent.com/u/2181356?v=3","gravatar_id":"","url":"https://api.github.com/users/srt32","html_url":"https://github.com/srt32","followers_url":"https://api.github.com/users/srt32/followers","following_url":"https://api.github.com/users/srt32/following{/other_user}","gists_url":"https://api.github.com/users/srt32/gists{/gist_id}","starred_url":"https://api.github.com/users/srt32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srt32/subscriptions","organizations_url":"https://api.github.com/users/srt32/orgs","repos_url":"https://api.github.com/users/srt32/repos","events_url":"https://api.github.com/users/srt32/events{/privacy}","received_events_url":"https://api.github.com/users/srt32/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-27T02:12:36Z","updated_at":"2015-02-02T17:13:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thoughtbot/hound/pulls/586","html_url":"https://github.com/thoughtbot/hound/pull/586","diff_url":"https://github.com/thoughtbot/hound/pull/586.diff","patch_url":"https://github.com/thoughtbot/hound/pull/586.patch"},"body":"This PR updates the `RepoSynchronization` process and `Build`'s to assign the\r\n`repo` to its parent `owner` (which is either a user or an organization). Tying\r\nthe `repo` to the `owner` is a preliminary step to having `owner` level\r\nconfiguration.\r\n\r\nNew `repo`'s and updated `repo`'s (updated via the user clicking 'Refresh Repo\r\nList' or via a build) will have their `owner`s populated.  We'll need to\r\nbackfill the `repo`'s that are not new and are not refreshed. I propose we merge\r\nthis PR as is and then have follow up work that adds an idempotent rake task\r\n(which requires calls to GitHub) that will backfill `repo`'s missing\r\n`owner_id`'s. Once the data is backfilled, we can apply a `null: false`\r\nconstraint to `repos.owner_id`.\r\n\r\nPart of\r\nhttps://trello.com/c/V0jY5LWs/452-migrate-existing-config-files-into-database"},"comment":{"url":"https://api.github.com/repos/thoughtbot/hound/issues/comments/72495861","html_url":"https://github.com/thoughtbot/hound/pull/586#issuecomment-72495861","issue_url":"https://api.github.com/repos/thoughtbot/hound/issues/586","id":72495861,"user":{"login":"srt32","id":2181356,"avatar_url":"https://avatars.githubusercontent.com/u/2181356?v=3","gravatar_id":"","url":"https://api.github.com/users/srt32","html_url":"https://github.com/srt32","followers_url":"https://api.github.com/users/srt32/followers","following_url":"https://api.github.com/users/srt32/following{/other_user}","gists_url":"https://api.github.com/users/srt32/gists{/gist_id}","starred_url":"https://api.github.com/users/srt32/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srt32/subscriptions","organizations_url":"https://api.github.com/users/srt32/orgs","repos_url":"https://api.github.com/users/srt32/repos","events_url":"https://api.github.com/users/srt32/events{/privacy}","received_events_url":"https://api.github.com/users/srt32/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T17:13:22Z","updated_at":"2015-02-02T17:13:22Z","body":"@salbertson not exactly. This PR is step one for going down that road. This PR introduces owners (orgs or users) so that later we could associate style guides with those owenrs."}}