{"action":"created","comment":{"url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/comments/86660390","pull_request_review_id":7310452,"id":86660390,"diff_hunk":"@@ -345,17 +346,40 @@ def command_myscore(data):\n \n     rows = util.fetch_all_json(result)\n \n+    # 해당 팀의 언어설정 가져오기\n+    result_team_lang = db_manager.query(\n+        \"SELECT * FROM TEAM \"\n+        \"WHERE \"\n+        \"team_id = %s;\",\n+        (teamId,)\n+    )\n+\n+    team_rows = util.fetch_all_json(result_team_lang)\n+    teamLang = team_rows[0]['team_lang']\n+\n+    result_myscore_announcements = db_manager.query(\n+        \"SELECT * FROM slackbot.MY_SCORE_ANNOUNCEMENT \"\n+        \"WHERE \"\n+        \"language = %s;\",\n+        (teamLang,)\n+    )\n+\n+    myscore_announcements = util.fetch_all_json(result_myscore_announcements)\n+    myscore_announcement = myscore_announcements[int(len(myscore_announcements) * random.random())]['announcement']","path":"Bot/celery_worker.py","position":31,"original_position":31,"commit_id":"d7f5a9487aaf7155fe6c858d33bba25caf66f343","original_commit_id":"d7f5a9487aaf7155fe6c858d33bba25caf66f343","user":{"login":"JSpiner","id":5474864,"avatar_url":"https://avatars.githubusercontent.com/u/5474864?v=3","gravatar_id":"","url":"https://api.github.com/users/JSpiner","html_url":"https://github.com/JSpiner","followers_url":"https://api.github.com/users/JSpiner/followers","following_url":"https://api.github.com/users/JSpiner/following{/other_user}","gists_url":"https://api.github.com/users/JSpiner/gists{/gist_id}","starred_url":"https://api.github.com/users/JSpiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSpiner/subscriptions","organizations_url":"https://api.github.com/users/JSpiner/orgs","repos_url":"https://api.github.com/users/JSpiner/repos","events_url":"https://api.github.com/users/JSpiner/events{/privacy}","received_events_url":"https://api.github.com/users/JSpiner/received_events","type":"User","site_admin":false},"body":"배열에서 한개를 랜덤으로 가져오는게 \r\nrandom.choice(배열) 기능이 있더라구요 \r\n추후 수정하면 좀 더 간편해질거같아요","created_at":"2016-11-05T08:13:25Z","updated_at":"2016-11-05T08:13:25Z","html_url":"https://github.com/JSpiner/Soma_SlackBot_taja/pull/175#discussion_r86660390","pull_request_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/175","_links":{"self":{"href":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/comments/86660390"},"html":{"href":"https://github.com/JSpiner/Soma_SlackBot_taja/pull/175#discussion_r86660390"},"pull_request":{"href":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/175"}}},"pull_request":{"url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/175","id":92444411,"html_url":"https://github.com/JSpiner/Soma_SlackBot_taja/pull/175","diff_url":"https://github.com/JSpiner/Soma_SlackBot_taja/pull/175.diff","patch_url":"https://github.com/JSpiner/Soma_SlackBot_taja/pull/175.patch","issue_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/issues/175","number":175,"state":"open","locked":false,"title":"myscore에다가 announcement(추가적인 문구) 추가","user":{"login":"TWpower","id":8542488,"avatar_url":"https://avatars.githubusercontent.com/u/8542488?v=3","gravatar_id":"","url":"https://api.github.com/users/TWpower","html_url":"https://github.com/TWpower","followers_url":"https://api.github.com/users/TWpower/followers","following_url":"https://api.github.com/users/TWpower/following{/other_user}","gists_url":"https://api.github.com/users/TWpower/gists{/gist_id}","starred_url":"https://api.github.com/users/TWpower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TWpower/subscriptions","organizations_url":"https://api.github.com/users/TWpower/orgs","repos_url":"https://api.github.com/users/TWpower/repos","events_url":"https://api.github.com/users/TWpower/events{/privacy}","received_events_url":"https://api.github.com/users/TWpower/received_events","type":"User","site_admin":false},"body":"아직 해당 점수에 대해서 정확하게 어떤 피드백을 주느지 확정하지 않아서\r\n\r\n랜덤으로 던질 멘트를 DB에서 가져와 언어 설정에 따라서 뿌려주는 코드를 작성했습니다.","created_at":"2016-11-05T06:34:02Z","updated_at":"2016-11-05T08:13:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35a6911541f9a09ff5bd196ea7e177582fde4020","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/175/commits","review_comments_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/175/comments","review_comment_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/issues/175/comments","statuses_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/statuses/d7f5a9487aaf7155fe6c858d33bba25caf66f343","head":{"label":"JSpiner:add_announcement_to_score","ref":"add_announcement_to_score","sha":"d7f5a9487aaf7155fe6c858d33bba25caf66f343","user":{"login":"JSpiner","id":5474864,"avatar_url":"https://avatars.githubusercontent.com/u/5474864?v=3","gravatar_id":"","url":"https://api.github.com/users/JSpiner","html_url":"https://github.com/JSpiner","followers_url":"https://api.github.com/users/JSpiner/followers","following_url":"https://api.github.com/users/JSpiner/following{/other_user}","gists_url":"https://api.github.com/users/JSpiner/gists{/gist_id}","starred_url":"https://api.github.com/users/JSpiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSpiner/subscriptions","organizations_url":"https://api.github.com/users/JSpiner/orgs","repos_url":"https://api.github.com/users/JSpiner/repos","events_url":"https://api.github.com/users/JSpiner/events{/privacy}","received_events_url":"https://api.github.com/users/JSpiner/received_events","type":"User","site_admin":false},"repo":{"id":68991066,"name":"Soma_SlackBot_taja","full_name":"JSpiner/Soma_SlackBot_taja","owner":{"login":"JSpiner","id":5474864,"avatar_url":"https://avatars.githubusercontent.com/u/5474864?v=3","gravatar_id":"","url":"https://api.github.com/users/JSpiner","html_url":"https://github.com/JSpiner","followers_url":"https://api.github.com/users/JSpiner/followers","following_url":"https://api.github.com/users/JSpiner/following{/other_user}","gists_url":"https://api.github.com/users/JSpiner/gists{/gist_id}","starred_url":"https://api.github.com/users/JSpiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSpiner/subscriptions","organizations_url":"https://api.github.com/users/JSpiner/orgs","repos_url":"https://api.github.com/users/JSpiner/repos","events_url":"https://api.github.com/users/JSpiner/events{/privacy}","received_events_url":"https://api.github.com/users/JSpiner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JSpiner/Soma_SlackBot_taja","description":"SoftwareMaestro 7th first Project","fork":false,"url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja","forks_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/forks","keys_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/teams","hooks_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/hooks","issue_events_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/issues/events{/number}","events_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/events","assignees_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/assignees{/user}","branches_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/branches{/branch}","tags_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/tags","blobs_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/git/refs{/sha}","trees_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/statuses/{sha}","languages_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/languages","stargazers_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/stargazers","contributors_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/contributors","subscribers_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/subscribers","subscription_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/subscription","commits_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/commits{/sha}","git_commits_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/git/commits{/sha}","comments_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/comments{/number}","issue_comment_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/issues/comments{/number}","contents_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/contents/{+path}","compare_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/merges","archive_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/downloads","issues_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/issues{/number}","pulls_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls{/number}","milestones_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/milestones{/number}","notifications_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/labels{/name}","releases_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/releases{/id}","deployments_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/deployments","created_at":"2016-09-23T05:13:07Z","updated_at":"2016-10-31T11:02:40Z","pushed_at":"2016-11-05T06:35:13Z","git_url":"git://github.com/JSpiner/Soma_SlackBot_taja.git","ssh_url":"git@github.com:JSpiner/Soma_SlackBot_taja.git","clone_url":"https://github.com/JSpiner/Soma_SlackBot_taja.git","svn_url":"https://github.com/JSpiner/Soma_SlackBot_taja","homepage":null,"size":7201,"stargazers_count":15,"watchers_count":15,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":15,"default_branch":"develop"}},"base":{"label":"JSpiner:develop","ref":"develop","sha":"6437beb4ed81e93802cd02acfb059170d31e20a9","user":{"login":"JSpiner","id":5474864,"avatar_url":"https://avatars.githubusercontent.com/u/5474864?v=3","gravatar_id":"","url":"https://api.github.com/users/JSpiner","html_url":"https://github.com/JSpiner","followers_url":"https://api.github.com/users/JSpiner/followers","following_url":"https://api.github.com/users/JSpiner/following{/other_user}","gists_url":"https://api.github.com/users/JSpiner/gists{/gist_id}","starred_url":"https://api.github.com/users/JSpiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSpiner/subscriptions","organizations_url":"https://api.github.com/users/JSpiner/orgs","repos_url":"https://api.github.com/users/JSpiner/repos","events_url":"https://api.github.com/users/JSpiner/events{/privacy}","received_events_url":"https://api.github.com/users/JSpiner/received_events","type":"User","site_admin":false},"repo":{"id":68991066,"name":"Soma_SlackBot_taja","full_name":"JSpiner/Soma_SlackBot_taja","owner":{"login":"JSpiner","id":5474864,"avatar_url":"https://avatars.githubusercontent.com/u/5474864?v=3","gravatar_id":"","url":"https://api.github.com/users/JSpiner","html_url":"https://github.com/JSpiner","followers_url":"https://api.github.com/users/JSpiner/followers","following_url":"https://api.github.com/users/JSpiner/following{/other_user}","gists_url":"https://api.github.com/users/JSpiner/gists{/gist_id}","starred_url":"https://api.github.com/users/JSpiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSpiner/subscriptions","organizations_url":"https://api.github.com/users/JSpiner/orgs","repos_url":"https://api.github.com/users/JSpiner/repos","events_url":"https://api.github.com/users/JSpiner/events{/privacy}","received_events_url":"https://api.github.com/users/JSpiner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JSpiner/Soma_SlackBot_taja","description":"SoftwareMaestro 7th first Project","fork":false,"url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja","forks_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/forks","keys_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/teams","hooks_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/hooks","issue_events_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/issues/events{/number}","events_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/events","assignees_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/assignees{/user}","branches_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/branches{/branch}","tags_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/tags","blobs_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/git/refs{/sha}","trees_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/statuses/{sha}","languages_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/languages","stargazers_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/stargazers","contributors_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/contributors","subscribers_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/subscribers","subscription_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/subscription","commits_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/commits{/sha}","git_commits_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/git/commits{/sha}","comments_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/comments{/number}","issue_comment_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/issues/comments{/number}","contents_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/contents/{+path}","compare_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/merges","archive_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/downloads","issues_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/issues{/number}","pulls_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls{/number}","milestones_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/milestones{/number}","notifications_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/labels{/name}","releases_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/releases{/id}","deployments_url":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/deployments","created_at":"2016-09-23T05:13:07Z","updated_at":"2016-10-31T11:02:40Z","pushed_at":"2016-11-05T06:35:13Z","git_url":"git://github.com/JSpiner/Soma_SlackBot_taja.git","ssh_url":"git@github.com:JSpiner/Soma_SlackBot_taja.git","clone_url":"https://github.com/JSpiner/Soma_SlackBot_taja.git","svn_url":"https://github.com/JSpiner/Soma_SlackBot_taja","homepage":null,"size":7201,"stargazers_count":15,"watchers_count":15,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":11,"forks":0,"open_issues":11,"watchers":15,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/175"},"html":{"href":"https://github.com/JSpiner/Soma_SlackBot_taja/pull/175"},"issue":{"href":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/issues/175"},"comments":{"href":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/JSpiner/Soma_SlackBot_taja/statuses/d7f5a9487aaf7155fe6c858d33bba25caf66f343"}}}}
{"actor":{"display_login":"JSpiner"}}