GitHub PullRequestReviewCommentEvent at 2014-09-25 10:23:19
Repository: slides-moztn
Actor: rednaks
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/moztn/slides-moztn/pulls/comments/18024436","id":18024436,"diff_hunk":"@@ -47,17 +47,22 @@ def deleteSlide():\n \n @app.route('/updateslide', methods=['GET', 'POST'])\n def updateSlide():\n-  slide_id = request.form['id']\n-  s = Slide.query.get(slide_id)\n-  s.title = request.form['title']\n-  s.description = request.form['description']\n-  s.url = request.form['url']\n-  s.category = request.form['categorie']\n-  db_session.add(s)\n-  db_session.commit()\n-  status = True\n   categories = getCategories()\n-  return render_template('admin.html', categories = categories, status = status, action='updated')\n+  #check if updated URL is correct\n+  message = isValidURL(request.form['url'])\n+  if(message==None):","path":"slides.py","position":17,"original_position":17,"commit_id":"4aa6d4be396d60802af9e1b5c052791f87c7ed9c","original_commit_id":"4aa6d4be396d60802af9e1b5c052791f87c7ed9c","user":{"login":"rednaks","id":1383161,"avatar_url":"https://avatars.githubusercontent.com/u/1383161?v=2","gravatar_id":"","url":"https://api.github.com/users/rednaks","html_url":"https://github.com/rednaks","followers_url":"https://api.github.com/users/rednaks/followers","following_url":"https://api.github.com/users/rednaks/following{/other_user}","gists_url":"https://api.github.com/users/rednaks/gists{/gist_id}","starred_url":"https://api.github.com/users/rednaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rednaks/subscriptions","organizations_url":"https://api.github.com/users/rednaks/orgs","repos_url":"https://api.github.com/users/rednaks/repos","events_url":"https://api.github.com/users/rednaks/events{/privacy}","received_events_url":"https://api.github.com/users/rednaks/received_events","type":"User","site_admin":false},"body":"I think it's better if we test if `message != None` and use the same approach as in `addSlide()` the diff will be more clear and understandable.","created_at":"2014-09-25T10:23:19Z","updated_at":"2014-09-25T10:23:19Z","html_url":"https://github.com/moztn/slides-moztn/pull/45#discussion_r18024436","pull_request_url":"https://api.github.com/repos/moztn/slides-moztn/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/moztn/slides-moztn/pulls/comments/18024436"},"html":{"href":"https://github.com/moztn/slides-moztn/pull/45#discussion_r18024436"},"pull_request":{"href":"https://api.github.com/repos/moztn/slides-moztn/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/moztn/slides-moztn/pulls/45","id":21746820,"html_url":"https://github.com/moztn/slides-moztn/pull/45","diff_url":"https://github.com/moztn/slides-moztn/pull/45.diff","patch_url":"https://github.com/moztn/slides-moztn/pull/45.patch","issue_url":"https://api.github.com/repos/moztn/slides-moztn/issues/45","number":45,"state":"open","locked":false,"title":"Fixing 30: check URL when updating a slides item","user":{"login":"melekJe","id":1949244,"avatar_url":"https://avatars.githubusercontent.com/u/1949244?v=2","gravatar_id":"","url":"https://api.github.com/users/melekJe","html_url":"https://github.com/melekJe","followers_url":"https://api.github.com/users/melekJe/followers","following_url":"https://api.github.com/users/melekJe/following{/other_user}","gists_url":"https://api.github.com/users/melekJe/gists{/gist_id}","starred_url":"https://api.github.com/users/melekJe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melekJe/subscriptions","organizations_url":"https://api.github.com/users/melekJe/orgs","repos_url":"https://api.github.com/users/melekJe/repos","events_url":"https://api.github.com/users/melekJe/events{/privacy}","received_events_url":"https://api.github.com/users/melekJe/received_events","type":"User","site_admin":false},"body":"so improves here:\r\n- starting from a frech history\r\n- adding a test to check if the URL is correct or not (considered it as a blocker for the function)\r\n- return message will be correct after merging the #28 fix for the view admin.html","created_at":"2014-09-24T21:35:30Z","updated_at":"2014-09-25T10:23:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a180cd5a57887a7f31184c94849369bd5e722a7a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/moztn/slides-moztn/pulls/45/commits","review_comments_url":"https://api.github.com/repos/moztn/slides-moztn/pulls/45/comments","review_comment_url":"https://api.github.com/repos/moztn/slides-moztn/pulls/comments/{number}","comments_url":"https://api.github.com/repos/moztn/slides-moztn/issues/45/comments","statuses_url":"https://api.github.com/repos/moztn/slides-moztn/statuses/4aa6d4be396d60802af9e1b5c052791f87c7ed9c","head":{"label":"melekJe:issue_30","ref":"issue_30","sha":"4aa6d4be396d60802af9e1b5c052791f87c7ed9c","user":{"login":"melekJe","id":1949244,"avatar_url":"https://avatars.githubusercontent.com/u/1949244?v=2","gravatar_id":"","url":"https://api.github.com/users/melekJe","html_url":"https://github.com/melekJe","followers_url":"https://api.github.com/users/melekJe/followers","following_url":"https://api.github.com/users/melekJe/following{/other_user}","gists_url":"https://api.github.com/users/melekJe/gists{/gist_id}","starred_url":"https://api.github.com/users/melekJe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melekJe/subscriptions","organizations_url":"https://api.github.com/users/melekJe/orgs","repos_url":"https://api.github.com/users/melekJe/repos","events_url":"https://api.github.com/users/melekJe/events{/privacy}","received_events_url":"https://api.github.com/users/melekJe/received_events","type":"User","site_admin":false},"repo":{"id":23545247,"name":"slides-moztn","full_name":"melekJe/slides-moztn","owner":{"login":"melekJe","id":1949244,"avatar_url":"https://avatars.githubusercontent.com/u/1949244?v=2","gravatar_id":"","url":"https://api.github.com/users/melekJe","html_url":"https://github.com/melekJe","followers_url":"https://api.github.com/users/melekJe/followers","following_url":"https://api.github.com/users/melekJe/following{/other_user}","gists_url":"https://api.github.com/users/melekJe/gists{/gist_id}","starred_url":"https://api.github.com/users/melekJe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melekJe/subscriptions","organizations_url":"https://api.github.com/users/melekJe/orgs","repos_url":"https://api.github.com/users/melekJe/repos","events_url":"https://api.github.com/users/melekJe/events{/privacy}","received_events_url":"https://api.github.com/users/melekJe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/melekJe/slides-moztn","description":"Mozilla Tunisia slides","fork":true,"url":"https://api.github.com/repos/melekJe/slides-moztn","forks_url":"https://api.github.com/repos/melekJe/slides-moztn/forks","keys_url":"https://api.github.com/repos/melekJe/slides-moztn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/melekJe/slides-moztn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/melekJe/slides-moztn/teams","hooks_url":"https://api.github.com/repos/melekJe/slides-moztn/hooks","issue_events_url":"https://api.github.com/repos/melekJe/slides-moztn/issues/events{/number}","events_url":"https://api.github.com/repos/melekJe/slides-moztn/events","assignees_url":"https://api.github.com/repos/melekJe/slides-moztn/assignees{/user}","branches_url":"https://api.github.com/repos/melekJe/slides-moztn/branches{/branch}","tags_url":"https://api.github.com/repos/melekJe/slides-moztn/tags","blobs_url":"https://api.github.com/repos/melekJe/slides-moztn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/melekJe/slides-moztn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/melekJe/slides-moztn/git/refs{/sha}","trees_url":"https://api.github.com/repos/melekJe/slides-moztn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/melekJe/slides-moztn/statuses/{sha}","languages_url":"https://api.github.com/repos/melekJe/slides-moztn/languages","stargazers_url":"https://api.github.com/repos/melekJe/slides-moztn/stargazers","contributors_url":"https://api.github.com/repos/melekJe/slides-moztn/contributors","subscribers_url":"https://api.github.com/repos/melekJe/slides-moztn/subscribers","subscription_url":"https://api.github.com/repos/melekJe/slides-moztn/subscription","commits_url":"https://api.github.com/repos/melekJe/slides-moztn/commits{/sha}","git_commits_url":"https://api.github.com/repos/melekJe/slides-moztn/git/commits{/sha}","comments_url":"https://api.github.com/repos/melekJe/slides-moztn/comments{/number}","issue_comment_url":"https://api.github.com/repos/melekJe/slides-moztn/issues/comments/{number}","contents_url":"https://api.github.com/repos/melekJe/slides-moztn/contents/{+path}","compare_url":"https://api.github.com/repos/melekJe/slides-moztn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/melekJe/slides-moztn/merges","archive_url":"https://api.github.com/repos/melekJe/slides-moztn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/melekJe/slides-moztn/downloads","issues_url":"https://api.github.com/repos/melekJe/slides-moztn/issues{/number}","pulls_url":"https://api.github.com/repos/melekJe/slides-moztn/pulls{/number}","milestones_url":"https://api.github.com/repos/melekJe/slides-moztn/milestones{/number}","notifications_url":"https://api.github.com/repos/melekJe/slides-moztn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/melekJe/slides-moztn/labels{/name}","releases_url":"https://api.github.com/repos/melekJe/slides-moztn/releases{/id}","created_at":"2014-09-01T14:30:32Z","updated_at":"2014-09-18T19:43:17Z","pushed_at":"2014-09-24T21:10:36Z","git_url":"git://github.com/melekJe/slides-moztn.git","ssh_url":"git@github.com:melekJe/slides-moztn.git","clone_url":"https://github.com/melekJe/slides-moztn.git","svn_url":"https://github.com/melekJe/slides-moztn","homepage":"http://slides.mozilla-tunisia.org","size":54418,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"moztn:master","ref":"master","sha":"f9685b03e8fb6ea4eb0d120607d5e41e7d7d0881","user":{"login":"moztn","id":1858984,"avatar_url":"https://avatars.githubusercontent.com/u/1858984?v=2","gravatar_id":"","url":"https://api.github.com/users/moztn","html_url":"https://github.com/moztn","followers_url":"https://api.github.com/users/moztn/followers","following_url":"https://api.github.com/users/moztn/following{/other_user}","gists_url":"https://api.github.com/users/moztn/gists{/gist_id}","starred_url":"https://api.github.com/users/moztn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moztn/subscriptions","organizations_url":"https://api.github.com/users/moztn/orgs","repos_url":"https://api.github.com/users/moztn/repos","events_url":"https://api.github.com/users/moztn/events{/privacy}","received_events_url":"https://api.github.com/users/moztn/received_events","type":"Organization","site_admin":false},"repo":{"id":10198896,"name":"slides-moztn","full_name":"moztn/slides-moztn","owner":{"login":"moztn","id":1858984,"avatar_url":"https://avatars.githubusercontent.com/u/1858984?v=2","gravatar_id":"","url":"https://api.github.com/users/moztn","html_url":"https://github.com/moztn","followers_url":"https://api.github.com/users/moztn/followers","following_url":"https://api.github.com/users/moztn/following{/other_user}","gists_url":"https://api.github.com/users/moztn/gists{/gist_id}","starred_url":"https://api.github.com/users/moztn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moztn/subscriptions","organizations_url":"https://api.github.com/users/moztn/orgs","repos_url":"https://api.github.com/users/moztn/repos","events_url":"https://api.github.com/users/moztn/events{/privacy}","received_events_url":"https://api.github.com/users/moztn/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moztn/slides-moztn","description":"Mozilla Tunisia slides","fork":false,"url":"https://api.github.com/repos/moztn/slides-moztn","forks_url":"https://api.github.com/repos/moztn/slides-moztn/forks","keys_url":"https://api.github.com/repos/moztn/slides-moztn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moztn/slides-moztn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moztn/slides-moztn/teams","hooks_url":"https://api.github.com/repos/moztn/slides-moztn/hooks","issue_events_url":"https://api.github.com/repos/moztn/slides-moztn/issues/events{/number}","events_url":"https://api.github.com/repos/moztn/slides-moztn/events","assignees_url":"https://api.github.com/repos/moztn/slides-moztn/assignees{/user}","branches_url":"https://api.github.com/repos/moztn/slides-moztn/branches{/branch}","tags_url":"https://api.github.com/repos/moztn/slides-moztn/tags","blobs_url":"https://api.github.com/repos/moztn/slides-moztn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moztn/slides-moztn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moztn/slides-moztn/git/refs{/sha}","trees_url":"https://api.github.com/repos/moztn/slides-moztn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moztn/slides-moztn/statuses/{sha}","languages_url":"https://api.github.com/repos/moztn/slides-moztn/languages","stargazers_url":"https://api.github.com/repos/moztn/slides-moztn/stargazers","contributors_url":"https://api.github.com/repos/moztn/slides-moztn/contributors","subscribers_url":"https://api.github.com/repos/moztn/slides-moztn/subscribers","subscription_url":"https://api.github.com/repos/moztn/slides-moztn/subscription","commits_url":"https://api.github.com/repos/moztn/slides-moztn/commits{/sha}","git_commits_url":"https://api.github.com/repos/moztn/slides-moztn/git/commits{/sha}","comments_url":"https://api.github.com/repos/moztn/slides-moztn/comments{/number}","issue_comment_url":"https://api.github.com/repos/moztn/slides-moztn/issues/comments/{number}","contents_url":"https://api.github.com/repos/moztn/slides-moztn/contents/{+path}","compare_url":"https://api.github.com/repos/moztn/slides-moztn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moztn/slides-moztn/merges","archive_url":"https://api.github.com/repos/moztn/slides-moztn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moztn/slides-moztn/downloads","issues_url":"https://api.github.com/repos/moztn/slides-moztn/issues{/number}","pulls_url":"https://api.github.com/repos/moztn/slides-moztn/pulls{/number}","milestones_url":"https://api.github.com/repos/moztn/slides-moztn/milestones{/number}","notifications_url":"https://api.github.com/repos/moztn/slides-moztn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moztn/slides-moztn/labels{/name}","releases_url":"https://api.github.com/repos/moztn/slides-moztn/releases{/id}","created_at":"2013-05-21T15:23:11Z","updated_at":"2014-09-15T07:29:32Z","pushed_at":"2014-09-25T10:15:22Z","git_url":"git://github.com/moztn/slides-moztn.git","ssh_url":"git@github.com:moztn/slides-moztn.git","clone_url":"https://github.com/moztn/slides-moztn.git","svn_url":"https://github.com/moztn/slides-moztn","homepage":"http://slides.mozilla-tunisia.org","size":54806,"stargazers_count":3,"watchers_count":3,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":12,"forks":8,"open_issues":12,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moztn/slides-moztn/pulls/45"},"html":{"href":"https://github.com/moztn/slides-moztn/pull/45"},"issue":{"href":"https://api.github.com/repos/moztn/slides-moztn/issues/45"},"comments":{"href":"https://api.github.com/repos/moztn/slides-moztn/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/moztn/slides-moztn/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/moztn/slides-moztn/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/moztn/slides-moztn/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/moztn/slides-moztn/statuses/4aa6d4be396d60802af9e1b5c052791f87c7ed9c"}}}}