{"action":"created","issue":{"url":"https://api.github.com/repos/baidu/Paddle/issues/450","repository_url":"https://api.github.com/repos/baidu/Paddle","labels_url":"https://api.github.com/repos/baidu/Paddle/issues/450/labels{/name}","comments_url":"https://api.github.com/repos/baidu/Paddle/issues/450/comments","events_url":"https://api.github.com/repos/baidu/Paddle/issues/450/events","html_url":"https://github.com/baidu/Paddle/pull/450","id":188922644,"number":450,"title":"Feature/pre commit hooks scripts","user":{"login":"reyoung","id":728699,"avatar_url":"https://avatars.githubusercontent.com/u/728699?v=3","gravatar_id":"","url":"https://api.github.com/users/reyoung","html_url":"https://github.com/reyoung","followers_url":"https://api.github.com/users/reyoung/followers","following_url":"https://api.github.com/users/reyoung/following{/other_user}","gists_url":"https://api.github.com/users/reyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/reyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reyoung/subscriptions","organizations_url":"https://api.github.com/users/reyoung/orgs","repos_url":"https://api.github.com/users/reyoung/repos","events_url":"https://api.github.com/users/reyoung/events{/privacy}","received_events_url":"https://api.github.com/users/reyoung/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"reyoung","id":728699,"avatar_url":"https://avatars.githubusercontent.com/u/728699?v=3","gravatar_id":"","url":"https://api.github.com/users/reyoung","html_url":"https://github.com/reyoung","followers_url":"https://api.github.com/users/reyoung/followers","following_url":"https://api.github.com/users/reyoung/following{/other_user}","gists_url":"https://api.github.com/users/reyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/reyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reyoung/subscriptions","organizations_url":"https://api.github.com/users/reyoung/orgs","repos_url":"https://api.github.com/users/reyoung/repos","events_url":"https://api.github.com/users/reyoung/events{/privacy}","received_events_url":"https://api.github.com/users/reyoung/received_events","type":"User","site_admin":false},"assignees":[{"login":"reyoung","id":728699,"avatar_url":"https://avatars.githubusercontent.com/u/728699?v=3","gravatar_id":"","url":"https://api.github.com/users/reyoung","html_url":"https://github.com/reyoung","followers_url":"https://api.github.com/users/reyoung/followers","following_url":"https://api.github.com/users/reyoung/following{/other_user}","gists_url":"https://api.github.com/users/reyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/reyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reyoung/subscriptions","organizations_url":"https://api.github.com/users/reyoung/orgs","repos_url":"https://api.github.com/users/reyoung/repos","events_url":"https://api.github.com/users/reyoung/events{/privacy}","received_events_url":"https://api.github.com/users/reyoung/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/baidu/Paddle/milestones/1","html_url":"https://github.com/baidu/Paddle/milestones/0.9.0","labels_url":"https://api.github.com/repos/baidu/Paddle/milestones/1/labels","id":2094009,"number":1,"title":"0.9.0","description":"","creator":{"login":"wangkuiyi","id":1548775,"avatar_url":"https://avatars.githubusercontent.com/u/1548775?v=3","gravatar_id":"","url":"https://api.github.com/users/wangkuiyi","html_url":"https://github.com/wangkuiyi","followers_url":"https://api.github.com/users/wangkuiyi/followers","following_url":"https://api.github.com/users/wangkuiyi/following{/other_user}","gists_url":"https://api.github.com/users/wangkuiyi/gists{/gist_id}","starred_url":"https://api.github.com/users/wangkuiyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangkuiyi/subscriptions","organizations_url":"https://api.github.com/users/wangkuiyi/orgs","repos_url":"https://api.github.com/users/wangkuiyi/repos","events_url":"https://api.github.com/users/wangkuiyi/events{/privacy}","received_events_url":"https://api.github.com/users/wangkuiyi/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":45,"state":"open","created_at":"2016-10-26T05:21:24Z","updated_at":"2016-11-13T12:39:24Z","due_on":"2016-11-09T00:00:00Z","closed_at":null},"comments":6,"created_at":"2016-11-12T17:13:52Z","updated_at":"2016-11-15T02:30:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/baidu/Paddle/pulls/450","html_url":"https://github.com/baidu/Paddle/pull/450","diff_url":"https://github.com/baidu/Paddle/pull/450.diff","patch_url":"https://github.com/baidu/Paddle/pull/450.patch"},"body":"Use a python package `pre-commit` to manage git `pre-commit` hooks when developing Paddle.\r\n\r\nGit pre-commit hook is set by each developer locally. It is hard to force all developer set same `pre-commit` hooks, but there are some basic things should be check before commit, such as `python style`, `file should use \\n as line end`,  etc.\r\n\r\nThis PR is added to solve this problem, by using a python package [pre-commit](http://pre-commit.com/). Each developer should do two things to enable this feature.\r\n\r\n* Install `pre-commit` package. `pip install pre-commit`\r\n* Enable `pre-commit` package to manage Paddle git pre-commit in local directory, by run `pre-commit install` in Paddle checkout directory.\r\n\r\nCurrently, some hooks are added, and all files are scan & fixed by this PR.\r\n\r\nBy the way, there is another thing I found about `yapf`, the python formatter used by Paddle. Different version of `yapf` could generate different result, with the same input python file. So, we must use the same `yapf` when developing Paddle. `pre-commit` also can help us to archive that.\r\n\r\n`pre-commit` is used only by Paddle developer, we should add some other tools (or just use `pre-commit` package, I'm not sure) to complete the CI tests about these checks.\r\n"},"comment":{"url":"https://api.github.com/repos/baidu/Paddle/issues/comments/260529513","html_url":"https://github.com/baidu/Paddle/pull/450#issuecomment-260529513","issue_url":"https://api.github.com/repos/baidu/Paddle/issues/450","id":260529513,"user":{"login":"reyoung","id":728699,"avatar_url":"https://avatars.githubusercontent.com/u/728699?v=3","gravatar_id":"","url":"https://api.github.com/users/reyoung","html_url":"https://github.com/reyoung","followers_url":"https://api.github.com/users/reyoung/followers","following_url":"https://api.github.com/users/reyoung/following{/other_user}","gists_url":"https://api.github.com/users/reyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/reyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reyoung/subscriptions","organizations_url":"https://api.github.com/users/reyoung/orgs","repos_url":"https://api.github.com/users/reyoung/repos","events_url":"https://api.github.com/users/reyoung/events{/privacy}","received_events_url":"https://api.github.com/users/reyoung/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T02:30:48Z","updated_at":"2016-11-15T02:30:48Z","body":"> pre-commit是检测python格式的，现在还检查md么？\r\n\r\n检查所有文件"}}
{"actor":{"display_login":"reyoung"}}