{"action":"closed","issue":{"url":"https://api.github.com/repos/dwyl/dwylbot/issues/41","repository_url":"https://api.github.com/repos/dwyl/dwylbot","labels_url":"https://api.github.com/repos/dwyl/dwylbot/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/dwyl/dwylbot/issues/41/comments","events_url":"https://api.github.com/repos/dwyl/dwylbot/issues/41/events","html_url":"https://github.com/dwyl/dwylbot/issues/41","id":227613699,"number":41,"title":"database postgres initial structure","user":{"login":"SimonLab","id":6057298,"avatar_url":"https://avatars1.githubusercontent.com/u/6057298?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonLab","html_url":"https://github.com/SimonLab","followers_url":"https://api.github.com/users/SimonLab/followers","following_url":"https://api.github.com/users/SimonLab/following{/other_user}","gists_url":"https://api.github.com/users/SimonLab/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonLab/subscriptions","organizations_url":"https://api.github.com/users/SimonLab/orgs","repos_url":"https://api.github.com/users/SimonLab/repos","events_url":"https://api.github.com/users/SimonLab/events{/privacy}","received_events_url":"https://api.github.com/users/SimonLab/received_events","type":"User","site_admin":false},"labels":[{"id":546294052,"url":"https://api.github.com/repos/dwyl/dwylbot/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":546296561,"url":"https://api.github.com/repos/dwyl/dwylbot/labels/priority-2","name":"priority-2","color":"1976D2","default":false},{"id":546296560,"url":"https://api.github.com/repos/dwyl/dwylbot/labels/T4h","name":"T4h","color":"F7C6C7","default":false}],"state":"closed","locked":false,"assignee":{"login":"SimonLab","id":6057298,"avatar_url":"https://avatars1.githubusercontent.com/u/6057298?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonLab","html_url":"https://github.com/SimonLab","followers_url":"https://api.github.com/users/SimonLab/followers","following_url":"https://api.github.com/users/SimonLab/following{/other_user}","gists_url":"https://api.github.com/users/SimonLab/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonLab/subscriptions","organizations_url":"https://api.github.com/users/SimonLab/orgs","repos_url":"https://api.github.com/users/SimonLab/repos","events_url":"https://api.github.com/users/SimonLab/events{/privacy}","received_events_url":"https://api.github.com/users/SimonLab/received_events","type":"User","site_admin":false},"assignees":[{"login":"SimonLab","id":6057298,"avatar_url":"https://avatars1.githubusercontent.com/u/6057298?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonLab","html_url":"https://github.com/SimonLab","followers_url":"https://api.github.com/users/SimonLab/followers","following_url":"https://api.github.com/users/SimonLab/following{/other_user}","gists_url":"https://api.github.com/users/SimonLab/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonLab/subscriptions","organizations_url":"https://api.github.com/users/SimonLab/orgs","repos_url":"https://api.github.com/users/SimonLab/repos","events_url":"https://api.github.com/users/SimonLab/events{/privacy}","received_events_url":"https://api.github.com/users/SimonLab/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dwyl/dwylbot/milestones/2","html_url":"https://github.com/dwyl/dwylbot/milestone/2","labels_url":"https://api.github.com/repos/dwyl/dwylbot/milestones/2/labels","id":2509589,"number":2,"title":"Sprint 1","description":"","creator":{"login":"markwilliamfirth","id":5732209,"avatar_url":"https://avatars3.githubusercontent.com/u/5732209?v=3","gravatar_id":"","url":"https://api.github.com/users/markwilliamfirth","html_url":"https://github.com/markwilliamfirth","followers_url":"https://api.github.com/users/markwilliamfirth/followers","following_url":"https://api.github.com/users/markwilliamfirth/following{/other_user}","gists_url":"https://api.github.com/users/markwilliamfirth/gists{/gist_id}","starred_url":"https://api.github.com/users/markwilliamfirth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markwilliamfirth/subscriptions","organizations_url":"https://api.github.com/users/markwilliamfirth/orgs","repos_url":"https://api.github.com/users/markwilliamfirth/repos","events_url":"https://api.github.com/users/markwilliamfirth/events{/privacy}","received_events_url":"https://api.github.com/users/markwilliamfirth/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":11,"state":"open","created_at":"2017-05-09T09:31:29Z","updated_at":"2017-06-19T11:32:09Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2017-05-10T09:08:48Z","updated_at":"2017-06-19T11:32:09Z","closed_at":"2017-06-19T11:32:09Z","body":"To be able to complete #38 (display the dwylbot status, acitve/inactive for the public repositories) we need first to create the structure of the database with migration in phoenix. we will need:\r\n- [ ] A User table with the main information updated each time a user loggin: the info will come from Github so if the user update her Github account we need to update the information on our database also. The user Github token use for sending API request will only be store in encrypted session on the browser so we don't collect all tokens in our database which limit the risk if our database is compromised.\r\n- [ ] A  Repositories table which store the main information about the repos. We need to decide what relation type the repositories table has with the user table, many-to-many or unique link. For organisation mutiple users can be admin of a repos and a multiple repos can be linked to one user so I think many-to-many should be the structure we would use\r\n\r\nOnce the tables have been created we can start parsing the response from the Github API and inserting the values into the tables\r\n"}}
{"actor":{"display_login":"SimonLab"}}