{"action":"closed","number":2293,"pull_request":{"url":"https://api.github.com/repos/go-gitea/gitea/pulls/2293","id":135279327,"html_url":"https://github.com/go-gitea/gitea/pull/2293","diff_url":"https://github.com/go-gitea/gitea/pull/2293.diff","patch_url":"https://github.com/go-gitea/gitea/pull/2293.patch","issue_url":"https://api.github.com/repos/go-gitea/gitea/issues/2293","number":2293,"state":"closed","locked":false,"title":"Fix SHA1 hash linking (#2143)","user":{"login":"lunny","id":81045,"avatar_url":"https://avatars2.githubusercontent.com/u/81045?v=4","gravatar_id":"","url":"https://api.github.com/users/lunny","html_url":"https://github.com/lunny","followers_url":"https://api.github.com/users/lunny/followers","following_url":"https://api.github.com/users/lunny/following{/other_user}","gists_url":"https://api.github.com/users/lunny/gists{/gist_id}","starred_url":"https://api.github.com/users/lunny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunny/subscriptions","organizations_url":"https://api.github.com/users/lunny/orgs","repos_url":"https://api.github.com/users/lunny/repos","events_url":"https://api.github.com/users/lunny/events{/privacy}","received_events_url":"https://api.github.com/users/lunny/received_events","type":"User","site_admin":false},"body":"Back port from #2143.\r\n\r\nThis changes the regex to look for a hash from 7 to 40 characters,\r\nto match the use of abbreviated hash lookups in both git and github.\r\nThe restriction of not being a pure number is also removed because\r\n1234567 is now considered a valid abbreviated hash, as is deadbeef.\r\n\r\nA note has been added to the top of the code to state that the\r\nliteral regex match is fine, but no extra validation is currently\r\nperformed so some false positives are expected.\r\n\r\nA future change could ensure that the hash exists in the repository\r\nbefore rendering it as a link, although this might incur a slight\r\nperformance penalty.\r\n\r\nReverts part of commit 4a46613 and fixes #2053.","created_at":"2017-08-11T07:23:09Z","updated_at":"2017-08-12T01:32:57Z","closed_at":"2017-08-12T01:32:57Z","merged_at":"2017-08-12T01:32:57Z","merge_commit_sha":"17092977012a121192da73bc9f1c4e934dedeba5","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/go-gitea/gitea/milestones/13","html_url":"https://github.com/go-gitea/gitea/milestone/13","labels_url":"https://api.github.com/repos/go-gitea/gitea/milestones/13/labels","id":2695532,"number":13,"title":"1.1.4","description":"","creator":{"login":"lunny","id":81045,"avatar_url":"https://avatars2.githubusercontent.com/u/81045?v=4","gravatar_id":"","url":"https://api.github.com/users/lunny","html_url":"https://github.com/lunny","followers_url":"https://api.github.com/users/lunny/followers","following_url":"https://api.github.com/users/lunny/following{/other_user}","gists_url":"https://api.github.com/users/lunny/gists{/gist_id}","starred_url":"https://api.github.com/users/lunny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunny/subscriptions","organizations_url":"https://api.github.com/users/lunny/orgs","repos_url":"https://api.github.com/users/lunny/repos","events_url":"https://api.github.com/users/lunny/events{/privacy}","received_events_url":"https://api.github.com/users/lunny/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":2,"state":"open","created_at":"2017-08-11T01:27:18Z","updated_at":"2017-08-12T01:32:57Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/go-gitea/gitea/pulls/2293/commits","review_comments_url":"https://api.github.com/repos/go-gitea/gitea/pulls/2293/comments","review_comment_url":"https://api.github.com/repos/go-gitea/gitea/pulls/comments{/number}","comments_url":"https://api.github.com/repos/go-gitea/gitea/issues/2293/comments","statuses_url":"https://api.github.com/repos/go-gitea/gitea/statuses/c8a5adbccfb13512ee4f209d6c8a0930bb8bf0a4","head":{"label":"lunny:lunny/backport_2143","ref":"lunny/backport_2143","sha":"c8a5adbccfb13512ee4f209d6c8a0930bb8bf0a4","user":{"login":"lunny","id":81045,"avatar_url":"https://avatars2.githubusercontent.com/u/81045?v=4","gravatar_id":"","url":"https://api.github.com/users/lunny","html_url":"https://github.com/lunny","followers_url":"https://api.github.com/users/lunny/followers","following_url":"https://api.github.com/users/lunny/following{/other_user}","gists_url":"https://api.github.com/users/lunny/gists{/gist_id}","starred_url":"https://api.github.com/users/lunny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunny/subscriptions","organizations_url":"https://api.github.com/users/lunny/orgs","repos_url":"https://api.github.com/users/lunny/repos","events_url":"https://api.github.com/users/lunny/events{/privacy}","received_events_url":"https://api.github.com/users/lunny/received_events","type":"User","site_admin":false},"repo":{"id":72803355,"name":"gitea","full_name":"lunny/gitea","owner":{"login":"lunny","id":81045,"avatar_url":"https://avatars2.githubusercontent.com/u/81045?v=4","gravatar_id":"","url":"https://api.github.com/users/lunny","html_url":"https://github.com/lunny","followers_url":"https://api.github.com/users/lunny/followers","following_url":"https://api.github.com/users/lunny/following{/other_user}","gists_url":"https://api.github.com/users/lunny/gists{/gist_id}","starred_url":"https://api.github.com/users/lunny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunny/subscriptions","organizations_url":"https://api.github.com/users/lunny/orgs","repos_url":"https://api.github.com/users/lunny/repos","events_url":"https://api.github.com/users/lunny/events{/privacy}","received_events_url":"https://api.github.com/users/lunny/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lunny/gitea","description":"Git with a cup of tea","fork":true,"url":"https://api.github.com/repos/lunny/gitea","forks_url":"https://api.github.com/repos/lunny/gitea/forks","keys_url":"https://api.github.com/repos/lunny/gitea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lunny/gitea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lunny/gitea/teams","hooks_url":"https://api.github.com/repos/lunny/gitea/hooks","issue_events_url":"https://api.github.com/repos/lunny/gitea/issues/events{/number}","events_url":"https://api.github.com/repos/lunny/gitea/events","assignees_url":"https://api.github.com/repos/lunny/gitea/assignees{/user}","branches_url":"https://api.github.com/repos/lunny/gitea/branches{/branch}","tags_url":"https://api.github.com/repos/lunny/gitea/tags","blobs_url":"https://api.github.com/repos/lunny/gitea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lunny/gitea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lunny/gitea/git/refs{/sha}","trees_url":"https://api.github.com/repos/lunny/gitea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lunny/gitea/statuses/{sha}","languages_url":"https://api.github.com/repos/lunny/gitea/languages","stargazers_url":"https://api.github.com/repos/lunny/gitea/stargazers","contributors_url":"https://api.github.com/repos/lunny/gitea/contributors","subscribers_url":"https://api.github.com/repos/lunny/gitea/subscribers","subscription_url":"https://api.github.com/repos/lunny/gitea/subscription","commits_url":"https://api.github.com/repos/lunny/gitea/commits{/sha}","git_commits_url":"https://api.github.com/repos/lunny/gitea/git/commits{/sha}","comments_url":"https://api.github.com/repos/lunny/gitea/comments{/number}","issue_comment_url":"https://api.github.com/repos/lunny/gitea/issues/comments{/number}","contents_url":"https://api.github.com/repos/lunny/gitea/contents/{+path}","compare_url":"https://api.github.com/repos/lunny/gitea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lunny/gitea/merges","archive_url":"https://api.github.com/repos/lunny/gitea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lunny/gitea/downloads","issues_url":"https://api.github.com/repos/lunny/gitea/issues{/number}","pulls_url":"https://api.github.com/repos/lunny/gitea/pulls{/number}","milestones_url":"https://api.github.com/repos/lunny/gitea/milestones{/number}","notifications_url":"https://api.github.com/repos/lunny/gitea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lunny/gitea/labels{/name}","releases_url":"https://api.github.com/repos/lunny/gitea/releases{/id}","deployments_url":"https://api.github.com/repos/lunny/gitea/deployments","created_at":"2016-11-04T01:40:08Z","updated_at":"2016-11-21T03:31:00Z","pushed_at":"2017-08-12T01:29:11Z","git_url":"git://github.com/lunny/gitea.git","ssh_url":"git@github.com:lunny/gitea.git","clone_url":"https://github.com/lunny/gitea.git","svn_url":"https://github.com/lunny/gitea","homepage":"http://gitea.io","size":103035,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"go-gitea:release/v1.1","ref":"release/v1.1","sha":"5fe8fee93391d20405e3f5d0577b39f67278f68a","user":{"login":"go-gitea","id":12724356,"avatar_url":"https://avatars1.githubusercontent.com/u/12724356?v=4","gravatar_id":"","url":"https://api.github.com/users/go-gitea","html_url":"https://github.com/go-gitea","followers_url":"https://api.github.com/users/go-gitea/followers","following_url":"https://api.github.com/users/go-gitea/following{/other_user}","gists_url":"https://api.github.com/users/go-gitea/gists{/gist_id}","starred_url":"https://api.github.com/users/go-gitea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-gitea/subscriptions","organizations_url":"https://api.github.com/users/go-gitea/orgs","repos_url":"https://api.github.com/users/go-gitea/repos","events_url":"https://api.github.com/users/go-gitea/events{/privacy}","received_events_url":"https://api.github.com/users/go-gitea/received_events","type":"Organization","site_admin":false},"repo":{"id":72495579,"name":"gitea","full_name":"go-gitea/gitea","owner":{"login":"go-gitea","id":12724356,"avatar_url":"https://avatars1.githubusercontent.com/u/12724356?v=4","gravatar_id":"","url":"https://api.github.com/users/go-gitea","html_url":"https://github.com/go-gitea","followers_url":"https://api.github.com/users/go-gitea/followers","following_url":"https://api.github.com/users/go-gitea/following{/other_user}","gists_url":"https://api.github.com/users/go-gitea/gists{/gist_id}","starred_url":"https://api.github.com/users/go-gitea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-gitea/subscriptions","organizations_url":"https://api.github.com/users/go-gitea/orgs","repos_url":"https://api.github.com/users/go-gitea/repos","events_url":"https://api.github.com/users/go-gitea/events{/privacy}","received_events_url":"https://api.github.com/users/go-gitea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/go-gitea/gitea","description":"Gitea: Git with a cup of tea","fork":false,"url":"https://api.github.com/repos/go-gitea/gitea","forks_url":"https://api.github.com/repos/go-gitea/gitea/forks","keys_url":"https://api.github.com/repos/go-gitea/gitea/keys{/key_id}","collaborators_url":"https://api.github.com/repos/go-gitea/gitea/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/go-gitea/gitea/teams","hooks_url":"https://api.github.com/repos/go-gitea/gitea/hooks","issue_events_url":"https://api.github.com/repos/go-gitea/gitea/issues/events{/number}","events_url":"https://api.github.com/repos/go-gitea/gitea/events","assignees_url":"https://api.github.com/repos/go-gitea/gitea/assignees{/user}","branches_url":"https://api.github.com/repos/go-gitea/gitea/branches{/branch}","tags_url":"https://api.github.com/repos/go-gitea/gitea/tags","blobs_url":"https://api.github.com/repos/go-gitea/gitea/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/go-gitea/gitea/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/go-gitea/gitea/git/refs{/sha}","trees_url":"https://api.github.com/repos/go-gitea/gitea/git/trees{/sha}","statuses_url":"https://api.github.com/repos/go-gitea/gitea/statuses/{sha}","languages_url":"https://api.github.com/repos/go-gitea/gitea/languages","stargazers_url":"https://api.github.com/repos/go-gitea/gitea/stargazers","contributors_url":"https://api.github.com/repos/go-gitea/gitea/contributors","subscribers_url":"https://api.github.com/repos/go-gitea/gitea/subscribers","subscription_url":"https://api.github.com/repos/go-gitea/gitea/subscription","commits_url":"https://api.github.com/repos/go-gitea/gitea/commits{/sha}","git_commits_url":"https://api.github.com/repos/go-gitea/gitea/git/commits{/sha}","comments_url":"https://api.github.com/repos/go-gitea/gitea/comments{/number}","issue_comment_url":"https://api.github.com/repos/go-gitea/gitea/issues/comments{/number}","contents_url":"https://api.github.com/repos/go-gitea/gitea/contents/{+path}","compare_url":"https://api.github.com/repos/go-gitea/gitea/compare/{base}...{head}","merges_url":"https://api.github.com/repos/go-gitea/gitea/merges","archive_url":"https://api.github.com/repos/go-gitea/gitea/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/go-gitea/gitea/downloads","issues_url":"https://api.github.com/repos/go-gitea/gitea/issues{/number}","pulls_url":"https://api.github.com/repos/go-gitea/gitea/pulls{/number}","milestones_url":"https://api.github.com/repos/go-gitea/gitea/milestones{/number}","notifications_url":"https://api.github.com/repos/go-gitea/gitea/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/go-gitea/gitea/labels{/name}","releases_url":"https://api.github.com/repos/go-gitea/gitea/releases{/id}","deployments_url":"https://api.github.com/repos/go-gitea/gitea/deployments","created_at":"2016-11-01T02:13:26Z","updated_at":"2017-08-11T23:29:24Z","pushed_at":"2017-08-12T01:32:57Z","git_url":"git://github.com/go-gitea/gitea.git","ssh_url":"git@github.com:go-gitea/gitea.git","clone_url":"https://github.com/go-gitea/gitea.git","svn_url":"https://github.com/go-gitea/gitea","homepage":"http://gitea.io","size":102862,"stargazers_count":3361,"watchers_count":3361,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":354,"mirror_url":null,"open_issues_count":470,"forks":354,"open_issues":470,"watchers":3361,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/go-gitea/gitea/pulls/2293"},"html":{"href":"https://github.com/go-gitea/gitea/pull/2293"},"issue":{"href":"https://api.github.com/repos/go-gitea/gitea/issues/2293"},"comments":{"href":"https://api.github.com/repos/go-gitea/gitea/issues/2293/comments"},"review_comments":{"href":"https://api.github.com/repos/go-gitea/gitea/pulls/2293/comments"},"review_comment":{"href":"https://api.github.com/repos/go-gitea/gitea/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/go-gitea/gitea/pulls/2293/commits"},"statuses":{"href":"https://api.github.com/repos/go-gitea/gitea/statuses/c8a5adbccfb13512ee4f209d6c8a0930bb8bf0a4"}},"merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"lunny","id":81045,"avatar_url":"https://avatars2.githubusercontent.com/u/81045?v=4","gravatar_id":"","url":"https://api.github.com/users/lunny","html_url":"https://github.com/lunny","followers_url":"https://api.github.com/users/lunny/followers","following_url":"https://api.github.com/users/lunny/following{/other_user}","gists_url":"https://api.github.com/users/lunny/gists{/gist_id}","starred_url":"https://api.github.com/users/lunny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lunny/subscriptions","organizations_url":"https://api.github.com/users/lunny/orgs","repos_url":"https://api.github.com/users/lunny/repos","events_url":"https://api.github.com/users/lunny/events{/privacy}","received_events_url":"https://api.github.com/users/lunny/received_events","type":"User","site_admin":false},"comments":6,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":18,"deletions":9,"changed_files":2}}
{"actor":{"display_login":"lunny"}}