{"action":"created","comment":{"url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments/60906547","id":60906547,"diff_hunk":"@@ -39,9 +40,12 @@ class Competition < ActiveRecord::Base\n \n   validate :competition_name_validations\n   def competition_name_validations\n-    if name.length > MAX_NAME_LENGTH && !self.showAtAll?\n+    if name.length > MAX_NAME_LENGTH_NOT_VISIBLE && !self.showAtAll?\n       errors.add(:name, \"Competition name can't be longer than 32 characters\")\n     end\n+    if name.length > MAX_NAME_LENGTH_VISIBLE && self.showAtAll?\n+      errors.add(:name, \"Competition name can't be longer than 50 characters\")\n+    end\n     if !ENDS_WITH_YEAR_RE.match(name)\n       errors.add(:name, \"The competition name must end in a year.\")","path":"WcaOnRails/app/models/competition.rb","position":22,"original_position":22,"commit_id":"c0bdb018bdaf13ee307bc669026965f2a49fd9cb","original_commit_id":"c0bdb018bdaf13ee307bc669026965f2a49fd9cb","user":{"login":"jonatanklosko","id":17034772,"avatar_url":"https://avatars.githubusercontent.com/u/17034772?v=3","gravatar_id":"","url":"https://api.github.com/users/jonatanklosko","html_url":"https://github.com/jonatanklosko","followers_url":"https://api.github.com/users/jonatanklosko/followers","following_url":"https://api.github.com/users/jonatanklosko/following{/other_user}","gists_url":"https://api.github.com/users/jonatanklosko/gists{/gist_id}","starred_url":"https://api.github.com/users/jonatanklosko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonatanklosko/subscriptions","organizations_url":"https://api.github.com/users/jonatanklosko/orgs","repos_url":"https://api.github.com/users/jonatanklosko/repos","events_url":"https://api.github.com/users/jonatanklosko/events{/privacy}","received_events_url":"https://api.github.com/users/jonatanklosko/received_events","type":"User","site_admin":false},"body":"I would remove 'The' to keep the errors similarity.","created_at":"2016-04-25T12:47:56Z","updated_at":"2016-04-25T12:47:56Z","html_url":"https://github.com/cubing/worldcubeassociation.org/pull/538#discussion_r60906547","pull_request_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/538","_links":{"self":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments/60906547"},"html":{"href":"https://github.com/cubing/worldcubeassociation.org/pull/538#discussion_r60906547"},"pull_request":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/538"}}},"pull_request":{"url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/538","id":67711964,"html_url":"https://github.com/cubing/worldcubeassociation.org/pull/538","diff_url":"https://github.com/cubing/worldcubeassociation.org/pull/538.diff","patch_url":"https://github.com/cubing/worldcubeassociation.org/pull/538.patch","issue_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/538","number":538,"state":"open","locked":false,"title":"Ensure competition names are not greater than 50 characters when visible","user":{"login":"pingskills","id":4403168,"avatar_url":"https://avatars.githubusercontent.com/u/4403168?v=3","gravatar_id":"","url":"https://api.github.com/users/pingskills","html_url":"https://github.com/pingskills","followers_url":"https://api.github.com/users/pingskills/followers","following_url":"https://api.github.com/users/pingskills/following{/other_user}","gists_url":"https://api.github.com/users/pingskills/gists{/gist_id}","starred_url":"https://api.github.com/users/pingskills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingskills/subscriptions","organizations_url":"https://api.github.com/users/pingskills/orgs","repos_url":"https://api.github.com/users/pingskills/repos","events_url":"https://api.github.com/users/pingskills/events{/privacy}","received_events_url":"https://api.github.com/users/pingskills/received_events","type":"User","site_admin":false},"body":" I realised that the change I made to ensure a competition name <= 32 characters when it's not visible removed the existing validation for when the competition is visible. So I added back the original validation and added a new test for it to ensure competition names are <= 50 characters when visible.","created_at":"2016-04-25T12:35:45Z","updated_at":"2016-04-25T12:47:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"286382813159c50fa70e483183e977d71f1d12df","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/538/commits","review_comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/538/comments","review_comment_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/538/comments","statuses_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/c0bdb018bdaf13ee307bc669026965f2a49fd9cb","head":{"label":"pingskills:iss443-take2","ref":"iss443-take2","sha":"c0bdb018bdaf13ee307bc669026965f2a49fd9cb","user":{"login":"pingskills","id":4403168,"avatar_url":"https://avatars.githubusercontent.com/u/4403168?v=3","gravatar_id":"","url":"https://api.github.com/users/pingskills","html_url":"https://github.com/pingskills","followers_url":"https://api.github.com/users/pingskills/followers","following_url":"https://api.github.com/users/pingskills/following{/other_user}","gists_url":"https://api.github.com/users/pingskills/gists{/gist_id}","starred_url":"https://api.github.com/users/pingskills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingskills/subscriptions","organizations_url":"https://api.github.com/users/pingskills/orgs","repos_url":"https://api.github.com/users/pingskills/repos","events_url":"https://api.github.com/users/pingskills/events{/privacy}","received_events_url":"https://api.github.com/users/pingskills/received_events","type":"User","site_admin":false},"repo":{"id":56292449,"name":"worldcubeassociation.org","full_name":"pingskills/worldcubeassociation.org","owner":{"login":"pingskills","id":4403168,"avatar_url":"https://avatars.githubusercontent.com/u/4403168?v=3","gravatar_id":"","url":"https://api.github.com/users/pingskills","html_url":"https://github.com/pingskills","followers_url":"https://api.github.com/users/pingskills/followers","following_url":"https://api.github.com/users/pingskills/following{/other_user}","gists_url":"https://api.github.com/users/pingskills/gists{/gist_id}","starred_url":"https://api.github.com/users/pingskills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingskills/subscriptions","organizations_url":"https://api.github.com/users/pingskills/orgs","repos_url":"https://api.github.com/users/pingskills/repos","events_url":"https://api.github.com/users/pingskills/events{/privacy}","received_events_url":"https://api.github.com/users/pingskills/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pingskills/worldcubeassociation.org","description":"[WCA Project] All of the code that runs on worldcubeassociation.org","fork":true,"url":"https://api.github.com/repos/pingskills/worldcubeassociation.org","forks_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/forks","keys_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/teams","hooks_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/hooks","issue_events_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/issues/events{/number}","events_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/events","assignees_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/assignees{/user}","branches_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/branches{/branch}","tags_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/tags","blobs_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/statuses/{sha}","languages_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/languages","stargazers_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/stargazers","contributors_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/contributors","subscribers_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/subscribers","subscription_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/subscription","commits_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/contents/{+path}","compare_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/merges","archive_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/downloads","issues_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/issues{/number}","pulls_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/pulls{/number}","milestones_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/milestones{/number}","notifications_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/labels{/name}","releases_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/releases{/id}","deployments_url":"https://api.github.com/repos/pingskills/worldcubeassociation.org/deployments","created_at":"2016-04-15T05:05:13Z","updated_at":"2016-04-15T05:05:21Z","pushed_at":"2016-04-25T12:18:38Z","git_url":"git://github.com/pingskills/worldcubeassociation.org.git","ssh_url":"git@github.com:pingskills/worldcubeassociation.org.git","clone_url":"https://github.com/pingskills/worldcubeassociation.org.git","svn_url":"https://github.com/pingskills/worldcubeassociation.org","homepage":"https://www.worldcubeassociation.org/","size":54448,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cubing:master","ref":"master","sha":"daa7214ac8d222388a19bb121a9c35d8482dec14","user":{"login":"cubing","id":1092267,"avatar_url":"https://avatars.githubusercontent.com/u/1092267?v=3","gravatar_id":"","url":"https://api.github.com/users/cubing","html_url":"https://github.com/cubing","followers_url":"https://api.github.com/users/cubing/followers","following_url":"https://api.github.com/users/cubing/following{/other_user}","gists_url":"https://api.github.com/users/cubing/gists{/gist_id}","starred_url":"https://api.github.com/users/cubing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubing/subscriptions","organizations_url":"https://api.github.com/users/cubing/orgs","repos_url":"https://api.github.com/users/cubing/repos","events_url":"https://api.github.com/users/cubing/events{/privacy}","received_events_url":"https://api.github.com/users/cubing/received_events","type":"Organization","site_admin":false},"repo":{"id":34161579,"name":"worldcubeassociation.org","full_name":"cubing/worldcubeassociation.org","owner":{"login":"cubing","id":1092267,"avatar_url":"https://avatars.githubusercontent.com/u/1092267?v=3","gravatar_id":"","url":"https://api.github.com/users/cubing","html_url":"https://github.com/cubing","followers_url":"https://api.github.com/users/cubing/followers","following_url":"https://api.github.com/users/cubing/following{/other_user}","gists_url":"https://api.github.com/users/cubing/gists{/gist_id}","starred_url":"https://api.github.com/users/cubing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubing/subscriptions","organizations_url":"https://api.github.com/users/cubing/orgs","repos_url":"https://api.github.com/users/cubing/repos","events_url":"https://api.github.com/users/cubing/events{/privacy}","received_events_url":"https://api.github.com/users/cubing/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cubing/worldcubeassociation.org","description":"[WCA Project] All of the code that runs on worldcubeassociation.org","fork":false,"url":"https://api.github.com/repos/cubing/worldcubeassociation.org","forks_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/forks","keys_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/teams","hooks_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/hooks","issue_events_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/events{/number}","events_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/events","assignees_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/assignees{/user}","branches_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/branches{/branch}","tags_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/tags","blobs_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/{sha}","languages_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/languages","stargazers_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/stargazers","contributors_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/contributors","subscribers_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/subscribers","subscription_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/subscription","commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/contents/{+path}","compare_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/merges","archive_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/downloads","issues_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues{/number}","pulls_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls{/number}","milestones_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/milestones{/number}","notifications_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/labels{/name}","releases_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/releases{/id}","deployments_url":"https://api.github.com/repos/cubing/worldcubeassociation.org/deployments","created_at":"2015-04-18T10:21:53Z","updated_at":"2016-04-24T19:04:51Z","pushed_at":"2016-04-25T12:35:46Z","git_url":"git://github.com/cubing/worldcubeassociation.org.git","ssh_url":"git@github.com:cubing/worldcubeassociation.org.git","clone_url":"https://github.com/cubing/worldcubeassociation.org.git","svn_url":"https://github.com/cubing/worldcubeassociation.org","homepage":"https://www.worldcubeassociation.org/","size":54588,"stargazers_count":12,"watchers_count":12,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":144,"forks":24,"open_issues":144,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/538"},"html":{"href":"https://github.com/cubing/worldcubeassociation.org/pull/538"},"issue":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/538"},"comments":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/issues/538/comments"},"review_comments":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/538/comments"},"review_comment":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/pulls/538/commits"},"statuses":{"href":"https://api.github.com/repos/cubing/worldcubeassociation.org/statuses/c0bdb018bdaf13ee307bc669026965f2a49fd9cb"}}}}