{"action":"opened","number":1643,"pull_request":{"url":"https://api.github.com/repos/rtfd/readthedocs.org/pulls/1643","id":44683317,"html_url":"https://github.com/rtfd/readthedocs.org/pull/1643","diff_url":"https://github.com/rtfd/readthedocs.org/pull/1643.diff","patch_url":"https://github.com/rtfd/readthedocs.org/pull/1643.patch","issue_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/1643","number":1643,"state":"open","locked":false,"title":"Hide \"Edit on Github\" link if page is a auto-created page","user":{"login":"gregmuellegger","id":88278,"avatar_url":"https://avatars.githubusercontent.com/u/88278?v=3","gravatar_id":"","url":"https://api.github.com/users/gregmuellegger","html_url":"https://github.com/gregmuellegger","followers_url":"https://api.github.com/users/gregmuellegger/followers","following_url":"https://api.github.com/users/gregmuellegger/following{/other_user}","gists_url":"https://api.github.com/users/gregmuellegger/gists{/gist_id}","starred_url":"https://api.github.com/users/gregmuellegger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregmuellegger/subscriptions","organizations_url":"https://api.github.com/users/gregmuellegger/orgs","repos_url":"https://api.github.com/users/gregmuellegger/repos","events_url":"https://api.github.com/users/gregmuellegger/events{/privacy}","received_events_url":"https://api.github.com/users/gregmuellegger/received_events","type":"User","site_admin":false},"body":"We can use the [hasdoc function](http://sphinx-doc.org/templating.html#hasdoc) to detect if the current page is a \"physical\", i.e. real page or if it's autocreated.\r\n\r\nI tested this on the Tornado project with the \"search.html\" page and the auto inlined source file pages, like http://www.tornadoweb.org/en/stable/_modules/tornado/stack_context.html\r\n\r\nRelated #1637 ","created_at":"2015-09-10T15:38:05Z","updated_at":"2015-09-10T15:38:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rtfd/readthedocs.org/pulls/1643/commits","review_comments_url":"https://api.github.com/repos/rtfd/readthedocs.org/pulls/1643/comments","review_comment_url":"https://api.github.com/repos/rtfd/readthedocs.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/1643/comments","statuses_url":"https://api.github.com/repos/rtfd/readthedocs.org/statuses/3c931c4faf5c59b37de67d52b3280e3a7ef2b619","head":{"label":"rtfd:hide-edit-github-link-for-invalid-pages","ref":"hide-edit-github-link-for-invalid-pages","sha":"3c931c4faf5c59b37de67d52b3280e3a7ef2b619","user":{"login":"rtfd","id":366329,"avatar_url":"https://avatars.githubusercontent.com/u/366329?v=3","gravatar_id":"","url":"https://api.github.com/users/rtfd","html_url":"https://github.com/rtfd","followers_url":"https://api.github.com/users/rtfd/followers","following_url":"https://api.github.com/users/rtfd/following{/other_user}","gists_url":"https://api.github.com/users/rtfd/gists{/gist_id}","starred_url":"https://api.github.com/users/rtfd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtfd/subscriptions","organizations_url":"https://api.github.com/users/rtfd/orgs","repos_url":"https://api.github.com/users/rtfd/repos","events_url":"https://api.github.com/users/rtfd/events{/privacy}","received_events_url":"https://api.github.com/users/rtfd/received_events","type":"Organization","site_admin":false},"repo":{"id":841835,"name":"readthedocs.org","full_name":"rtfd/readthedocs.org","owner":{"login":"rtfd","id":366329,"avatar_url":"https://avatars.githubusercontent.com/u/366329?v=3","gravatar_id":"","url":"https://api.github.com/users/rtfd","html_url":"https://github.com/rtfd","followers_url":"https://api.github.com/users/rtfd/followers","following_url":"https://api.github.com/users/rtfd/following{/other_user}","gists_url":"https://api.github.com/users/rtfd/gists{/gist_id}","starred_url":"https://api.github.com/users/rtfd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtfd/subscriptions","organizations_url":"https://api.github.com/users/rtfd/orgs","repos_url":"https://api.github.com/users/rtfd/repos","events_url":"https://api.github.com/users/rtfd/events{/privacy}","received_events_url":"https://api.github.com/users/rtfd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rtfd/readthedocs.org","description":"source code to readthedocs.org","fork":false,"url":"https://api.github.com/repos/rtfd/readthedocs.org","forks_url":"https://api.github.com/repos/rtfd/readthedocs.org/forks","keys_url":"https://api.github.com/repos/rtfd/readthedocs.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rtfd/readthedocs.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rtfd/readthedocs.org/teams","hooks_url":"https://api.github.com/repos/rtfd/readthedocs.org/hooks","issue_events_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/events{/number}","events_url":"https://api.github.com/repos/rtfd/readthedocs.org/events","assignees_url":"https://api.github.com/repos/rtfd/readthedocs.org/assignees{/user}","branches_url":"https://api.github.com/repos/rtfd/readthedocs.org/branches{/branch}","tags_url":"https://api.github.com/repos/rtfd/readthedocs.org/tags","blobs_url":"https://api.github.com/repos/rtfd/readthedocs.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rtfd/readthedocs.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rtfd/readthedocs.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/rtfd/readthedocs.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rtfd/readthedocs.org/statuses/{sha}","languages_url":"https://api.github.com/repos/rtfd/readthedocs.org/languages","stargazers_url":"https://api.github.com/repos/rtfd/readthedocs.org/stargazers","contributors_url":"https://api.github.com/repos/rtfd/readthedocs.org/contributors","subscribers_url":"https://api.github.com/repos/rtfd/readthedocs.org/subscribers","subscription_url":"https://api.github.com/repos/rtfd/readthedocs.org/subscription","commits_url":"https://api.github.com/repos/rtfd/readthedocs.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/rtfd/readthedocs.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/rtfd/readthedocs.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/rtfd/readthedocs.org/contents/{+path}","compare_url":"https://api.github.com/repos/rtfd/readthedocs.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rtfd/readthedocs.org/merges","archive_url":"https://api.github.com/repos/rtfd/readthedocs.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rtfd/readthedocs.org/downloads","issues_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues{/number}","pulls_url":"https://api.github.com/repos/rtfd/readthedocs.org/pulls{/number}","milestones_url":"https://api.github.com/repos/rtfd/readthedocs.org/milestones{/number}","notifications_url":"https://api.github.com/repos/rtfd/readthedocs.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rtfd/readthedocs.org/labels{/name}","releases_url":"https://api.github.com/repos/rtfd/readthedocs.org/releases{/id}","created_at":"2010-08-16T19:18:06Z","updated_at":"2015-09-10T12:03:15Z","pushed_at":"2015-09-10T15:35:53Z","git_url":"git://github.com/rtfd/readthedocs.org.git","ssh_url":"git@github.com:rtfd/readthedocs.org.git","clone_url":"https://github.com/rtfd/readthedocs.org.git","svn_url":"https://github.com/rtfd/readthedocs.org","homepage":"http://rtfd.org/","size":43765,"stargazers_count":2060,"watchers_count":2060,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":920,"mirror_url":null,"open_issues_count":144,"forks":920,"open_issues":144,"watchers":2060,"default_branch":"master"}},"base":{"label":"rtfd:master","ref":"master","sha":"adf227ae3810b0820d0ff548651dcd223f4f2388","user":{"login":"rtfd","id":366329,"avatar_url":"https://avatars.githubusercontent.com/u/366329?v=3","gravatar_id":"","url":"https://api.github.com/users/rtfd","html_url":"https://github.com/rtfd","followers_url":"https://api.github.com/users/rtfd/followers","following_url":"https://api.github.com/users/rtfd/following{/other_user}","gists_url":"https://api.github.com/users/rtfd/gists{/gist_id}","starred_url":"https://api.github.com/users/rtfd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtfd/subscriptions","organizations_url":"https://api.github.com/users/rtfd/orgs","repos_url":"https://api.github.com/users/rtfd/repos","events_url":"https://api.github.com/users/rtfd/events{/privacy}","received_events_url":"https://api.github.com/users/rtfd/received_events","type":"Organization","site_admin":false},"repo":{"id":841835,"name":"readthedocs.org","full_name":"rtfd/readthedocs.org","owner":{"login":"rtfd","id":366329,"avatar_url":"https://avatars.githubusercontent.com/u/366329?v=3","gravatar_id":"","url":"https://api.github.com/users/rtfd","html_url":"https://github.com/rtfd","followers_url":"https://api.github.com/users/rtfd/followers","following_url":"https://api.github.com/users/rtfd/following{/other_user}","gists_url":"https://api.github.com/users/rtfd/gists{/gist_id}","starred_url":"https://api.github.com/users/rtfd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtfd/subscriptions","organizations_url":"https://api.github.com/users/rtfd/orgs","repos_url":"https://api.github.com/users/rtfd/repos","events_url":"https://api.github.com/users/rtfd/events{/privacy}","received_events_url":"https://api.github.com/users/rtfd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rtfd/readthedocs.org","description":"source code to readthedocs.org","fork":false,"url":"https://api.github.com/repos/rtfd/readthedocs.org","forks_url":"https://api.github.com/repos/rtfd/readthedocs.org/forks","keys_url":"https://api.github.com/repos/rtfd/readthedocs.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rtfd/readthedocs.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rtfd/readthedocs.org/teams","hooks_url":"https://api.github.com/repos/rtfd/readthedocs.org/hooks","issue_events_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/events{/number}","events_url":"https://api.github.com/repos/rtfd/readthedocs.org/events","assignees_url":"https://api.github.com/repos/rtfd/readthedocs.org/assignees{/user}","branches_url":"https://api.github.com/repos/rtfd/readthedocs.org/branches{/branch}","tags_url":"https://api.github.com/repos/rtfd/readthedocs.org/tags","blobs_url":"https://api.github.com/repos/rtfd/readthedocs.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rtfd/readthedocs.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rtfd/readthedocs.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/rtfd/readthedocs.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rtfd/readthedocs.org/statuses/{sha}","languages_url":"https://api.github.com/repos/rtfd/readthedocs.org/languages","stargazers_url":"https://api.github.com/repos/rtfd/readthedocs.org/stargazers","contributors_url":"https://api.github.com/repos/rtfd/readthedocs.org/contributors","subscribers_url":"https://api.github.com/repos/rtfd/readthedocs.org/subscribers","subscription_url":"https://api.github.com/repos/rtfd/readthedocs.org/subscription","commits_url":"https://api.github.com/repos/rtfd/readthedocs.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/rtfd/readthedocs.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/rtfd/readthedocs.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/rtfd/readthedocs.org/contents/{+path}","compare_url":"https://api.github.com/repos/rtfd/readthedocs.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rtfd/readthedocs.org/merges","archive_url":"https://api.github.com/repos/rtfd/readthedocs.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rtfd/readthedocs.org/downloads","issues_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues{/number}","pulls_url":"https://api.github.com/repos/rtfd/readthedocs.org/pulls{/number}","milestones_url":"https://api.github.com/repos/rtfd/readthedocs.org/milestones{/number}","notifications_url":"https://api.github.com/repos/rtfd/readthedocs.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rtfd/readthedocs.org/labels{/name}","releases_url":"https://api.github.com/repos/rtfd/readthedocs.org/releases{/id}","created_at":"2010-08-16T19:18:06Z","updated_at":"2015-09-10T12:03:15Z","pushed_at":"2015-09-10T15:35:53Z","git_url":"git://github.com/rtfd/readthedocs.org.git","ssh_url":"git@github.com:rtfd/readthedocs.org.git","clone_url":"https://github.com/rtfd/readthedocs.org.git","svn_url":"https://github.com/rtfd/readthedocs.org","homepage":"http://rtfd.org/","size":43765,"stargazers_count":2060,"watchers_count":2060,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":920,"mirror_url":null,"open_issues_count":144,"forks":920,"open_issues":144,"watchers":2060,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rtfd/readthedocs.org/pulls/1643"},"html":{"href":"https://github.com/rtfd/readthedocs.org/pull/1643"},"issue":{"href":"https://api.github.com/repos/rtfd/readthedocs.org/issues/1643"},"comments":{"href":"https://api.github.com/repos/rtfd/readthedocs.org/issues/1643/comments"},"review_comments":{"href":"https://api.github.com/repos/rtfd/readthedocs.org/pulls/1643/comments"},"review_comment":{"href":"https://api.github.com/repos/rtfd/readthedocs.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rtfd/readthedocs.org/pulls/1643/commits"},"statuses":{"href":"https://api.github.com/repos/rtfd/readthedocs.org/statuses/3c931c4faf5c59b37de67d52b3280e3a7ef2b619"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}