{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/122793552","pull_request_review_id":44936815,"id":122793552,"diff_hunk":"@@ -216,3 +217,23 @@ class InvalidBookmark(models.Model):\n                 id='fields.E001',\n             )\n         ])\n+\n+\n+@isolate_apps('contenttypes_tests')\n+class ModelCheckTests(SimpleTestCase):\n+    def test_model_name_too_long(self):\n+        class ModelWithNameOfOver100CharactersModelWithNameOfOver100CharactersModelWithNameOfOver100CharactersModel(models.Model):\n+            pass\n+\n+        errors = check_model_name_lengths()\n+        self.assertEqual(1, len(errors))\n+        self.assertEqual('contenttypes.E005', errors[0].id)\n+        self.assertEqual(checks.ERROR, errors[0].level)\n+        self.assertEqual('Model name is too long', errors[0].msg)","path":"tests/contenttypes_tests/test_checks.py","position":null,"original_position":23,"commit_id":"1ae2357245035499b532ea3e3b841633e0435257","original_commit_id":"0ea13874a2b41162ded3daf0e3ae6a7dee044254","user":{"login":"felixxm","id":2865885,"avatar_url":"https://avatars1.githubusercontent.com/u/2865885?v=3","gravatar_id":"","url":"https://api.github.com/users/felixxm","html_url":"https://github.com/felixxm","followers_url":"https://api.github.com/users/felixxm/followers","following_url":"https://api.github.com/users/felixxm/following{/other_user}","gists_url":"https://api.github.com/users/felixxm/gists{/gist_id}","starred_url":"https://api.github.com/users/felixxm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixxm/subscriptions","organizations_url":"https://api.github.com/users/felixxm/orgs","repos_url":"https://api.github.com/users/felixxm/repos","events_url":"https://api.github.com/users/felixxm/events{/privacy}","received_events_url":"https://api.github.com/users/felixxm/received_events","type":"User","site_admin":false},"body":"I think it would be better to make a single check e.g.\r\n```python\r\nself.assertEqual(check_model_name_lengths(), [\r\n    checks.Error(\r\n        'Model name is too long.',\r\n        hint='Model name should not be longer than 100 characters.',\r\n        obj=ModelWithNameOfOver100CharactersModelWithNameOfOver100CharactersModelWithNameOfOver100CharactersModel,\r\n        id='contenttypes.E005',\r\n    )\r\n])\r\n```","created_at":"2017-06-19T18:53:39Z","updated_at":"2017-06-19T18:54:47Z","html_url":"https://github.com/django/django/pull/8647#discussion_r122793552","pull_request_url":"https://api.github.com/repos/django/django/pulls/8647","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/122793552"},"html":{"href":"https://github.com/django/django/pull/8647#discussion_r122793552"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/8647"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/8647","id":125908653,"html_url":"https://github.com/django/django/pull/8647","diff_url":"https://github.com/django/django/pull/8647.diff","patch_url":"https://github.com/django/django/pull/8647.patch","issue_url":"https://api.github.com/repos/django/django/issues/8647","number":8647,"state":"open","locked":false,"title":"Fixed #28313 -- Added model name max length check of 100 characters in contrib.contentttypes.","user":{"login":"mick88","id":4239561,"avatar_url":"https://avatars3.githubusercontent.com/u/4239561?v=3","gravatar_id":"","url":"https://api.github.com/users/mick88","html_url":"https://github.com/mick88","followers_url":"https://api.github.com/users/mick88/followers","following_url":"https://api.github.com/users/mick88/following{/other_user}","gists_url":"https://api.github.com/users/mick88/gists{/gist_id}","starred_url":"https://api.github.com/users/mick88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mick88/subscriptions","organizations_url":"https://api.github.com/users/mick88/orgs","repos_url":"https://api.github.com/users/mick88/repos","events_url":"https://api.github.com/users/mick88/events{/privacy}","received_events_url":"https://api.github.com/users/mick88/received_events","type":"User","site_admin":false},"body":"https://code.djangoproject.com/ticket/28313","created_at":"2017-06-15T20:46:23Z","updated_at":"2017-06-19T18:54:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60cec7f209379daafeb349f72723ec496a65ecbb","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/8647/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/8647/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/8647/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/1ae2357245035499b532ea3e3b841633e0435257","head":{"label":"mick88:validate-model-name-lengths-28313","ref":"validate-model-name-lengths-28313","sha":"1ae2357245035499b532ea3e3b841633e0435257","user":{"login":"mick88","id":4239561,"avatar_url":"https://avatars3.githubusercontent.com/u/4239561?v=3","gravatar_id":"","url":"https://api.github.com/users/mick88","html_url":"https://github.com/mick88","followers_url":"https://api.github.com/users/mick88/followers","following_url":"https://api.github.com/users/mick88/following{/other_user}","gists_url":"https://api.github.com/users/mick88/gists{/gist_id}","starred_url":"https://api.github.com/users/mick88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mick88/subscriptions","organizations_url":"https://api.github.com/users/mick88/orgs","repos_url":"https://api.github.com/users/mick88/repos","events_url":"https://api.github.com/users/mick88/events{/privacy}","received_events_url":"https://api.github.com/users/mick88/received_events","type":"User","site_admin":false},"repo":{"id":94476588,"name":"django","full_name":"mick88/django","owner":{"login":"mick88","id":4239561,"avatar_url":"https://avatars3.githubusercontent.com/u/4239561?v=3","gravatar_id":"","url":"https://api.github.com/users/mick88","html_url":"https://github.com/mick88","followers_url":"https://api.github.com/users/mick88/followers","following_url":"https://api.github.com/users/mick88/following{/other_user}","gists_url":"https://api.github.com/users/mick88/gists{/gist_id}","starred_url":"https://api.github.com/users/mick88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mick88/subscriptions","organizations_url":"https://api.github.com/users/mick88/orgs","repos_url":"https://api.github.com/users/mick88/repos","events_url":"https://api.github.com/users/mick88/events{/privacy}","received_events_url":"https://api.github.com/users/mick88/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mick88/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/mick88/django","forks_url":"https://api.github.com/repos/mick88/django/forks","keys_url":"https://api.github.com/repos/mick88/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mick88/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mick88/django/teams","hooks_url":"https://api.github.com/repos/mick88/django/hooks","issue_events_url":"https://api.github.com/repos/mick88/django/issues/events{/number}","events_url":"https://api.github.com/repos/mick88/django/events","assignees_url":"https://api.github.com/repos/mick88/django/assignees{/user}","branches_url":"https://api.github.com/repos/mick88/django/branches{/branch}","tags_url":"https://api.github.com/repos/mick88/django/tags","blobs_url":"https://api.github.com/repos/mick88/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mick88/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mick88/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/mick88/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mick88/django/statuses/{sha}","languages_url":"https://api.github.com/repos/mick88/django/languages","stargazers_url":"https://api.github.com/repos/mick88/django/stargazers","contributors_url":"https://api.github.com/repos/mick88/django/contributors","subscribers_url":"https://api.github.com/repos/mick88/django/subscribers","subscription_url":"https://api.github.com/repos/mick88/django/subscription","commits_url":"https://api.github.com/repos/mick88/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/mick88/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/mick88/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/mick88/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/mick88/django/contents/{+path}","compare_url":"https://api.github.com/repos/mick88/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mick88/django/merges","archive_url":"https://api.github.com/repos/mick88/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mick88/django/downloads","issues_url":"https://api.github.com/repos/mick88/django/issues{/number}","pulls_url":"https://api.github.com/repos/mick88/django/pulls{/number}","milestones_url":"https://api.github.com/repos/mick88/django/milestones{/number}","notifications_url":"https://api.github.com/repos/mick88/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mick88/django/labels{/name}","releases_url":"https://api.github.com/repos/mick88/django/releases{/id}","deployments_url":"https://api.github.com/repos/mick88/django/deployments","created_at":"2017-06-15T20:33:31Z","updated_at":"2017-06-15T20:33:57Z","pushed_at":"2017-06-19T18:54:08Z","git_url":"git://github.com/mick88/django.git","ssh_url":"git@github.com:mick88/django.git","clone_url":"https://github.com/mick88/django.git","svn_url":"https://github.com/mick88/django","homepage":"https://www.djangoproject.com/","size":165054,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"django:master","ref":"master","sha":"0b9ccf9e607e31a056f9e0a41f3f79aefeff2e9d","user":{"login":"django","id":27804,"avatar_url":"https://avatars1.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars1.githubusercontent.com/u/27804?v=3","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","deployments_url":"https://api.github.com/repos/django/django/deployments","created_at":"2012-04-28T02:47:18Z","updated_at":"2017-06-19T17:00:24Z","pushed_at":"2017-06-19T18:54:25Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":165168,"stargazers_count":26341,"watchers_count":26341,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10891,"mirror_url":null,"open_issues_count":126,"forks":10891,"open_issues":126,"watchers":26341,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/8647"},"html":{"href":"https://github.com/django/django/pull/8647"},"issue":{"href":"https://api.github.com/repos/django/django/issues/8647"},"comments":{"href":"https://api.github.com/repos/django/django/issues/8647/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/8647/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/8647/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/1ae2357245035499b532ea3e3b841633e0435257"}}}}
{"actor":{"display_login":"felixxm"}}