GitHub PullRequestEvent at 2014-07-10 12:03:52
Repository: graf
Actor: pravj
Payload: {"action":"opened","number":9,"pull_request":{"url":"https://api.github.com/repos/abhshkdz/graf/pulls/9","id":18215205,"html_url":"https://github.com/abhshkdz/graf/pull/9","diff_url":"https://github.com/abhshkdz/graf/pull/9.diff","patch_url":"https://github.com/abhshkdz/graf/pull/9.patch","issue_url":"https://api.github.com/repos/abhshkdz/graf/issues/9","number":9,"state":"open","title":"Feature: better git response handling","user":{"login":"pravj","id":3437250,"avatar_url":"https://avatars.githubusercontent.com/u/3437250?","gravatar_id":"0542054052bc2b70ab7680077bb7afce","url":"https://api.github.com/users/pravj","html_url":"https://github.com/pravj","followers_url":"https://api.github.com/users/pravj/followers","following_url":"https://api.github.com/users/pravj/following{/other_user}","gists_url":"https://api.github.com/users/pravj/gists{/gist_id}","starred_url":"https://api.github.com/users/pravj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravj/subscriptions","organizations_url":"https://api.github.com/users/pravj/orgs","repos_url":"https://api.github.com/users/pravj/repos","events_url":"https://api.github.com/users/pravj/events{/privacy}","received_events_url":"https://api.github.com/users/pravj/received_events","type":"User","site_admin":false},"body":"Hi :yoda: :)\r\n\r\nThis PR contains 2 commits : \r\n\r\n:one: : https://github.com/pravj/graf/commit/9d62e059eda0ad217c444d11a63d6e76c13283be\r\nthis commit was not in my list when I thought about forking 'graf' repo but when I started, I saw that :gem:'s main file [lib/graf/source.rb] was having bad and different ruby syntax/code-style from other files in project.\r\nso I changed the code to follow GitHub's ruby [code-style](https://github.com/styleguide/ruby).\r\n\r\nwhat I have changed, is :  \r\n* changed code to have soft-tabs(2 spaces).\r\n* lines are now fewer than 80 characters\r\n* using string interpolation instead of string concatenation\r\n* used empty lines between `methods` and to break up a method into logical paragraphs.\r\n\r\n:two: : https://github.com/pravj/graf/commit/2c826264bbf0b42ed20cf05b79bd4ad5f115d1cf\r\nthis commit have the main logic of the PR Branch : `better handling git's response`\r\n\r\nin the current graf version, it just ask git for logs and work on the result.\r\nthis thing leads to the situation, where it goes into halt state, when : \r\n* the directory is not a git repository\r\n* git repo don't have any commits to generate graf.\r\n\r\nin both situations, we see `(reading log message from standard input)` on `STDOUT`\r\n\r\nnow I have added a file `filter.rb` in `lib/graf/`, that checks for both conditions and work accordingly.\r\nSo it returns : \r\n* Not a git repository (or any of the parent directories) : if you are not using 'graf' in a Git repo.\r\n* This git repository don\\'t have any commits yet : if Git repo don't have any commits yet\r\n\r\nit calls for `Graf::Source.authors`, when everything is all clear.\r\n\r\nI hope, I have done it right :smile:. correct me, if I'm wrong anywhere.\r\nPlease review this.","created_at":"2014-07-10T12:03:51Z","updated_at":"2014-07-10T12:03:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/abhshkdz/graf/pulls/9/commits","review_comments_url":"https://api.github.com/repos/abhshkdz/graf/pulls/9/comments","review_comment_url":"https://api.github.com/repos/abhshkdz/graf/pulls/comments/{number}","comments_url":"https://api.github.com/repos/abhshkdz/graf/issues/9/comments","statuses_url":"https://api.github.com/repos/abhshkdz/graf/statuses/2c826264bbf0b42ed20cf05b79bd4ad5f115d1cf","head":{"label":"pravj:feature/better-git-response-handling","ref":"feature/better-git-response-handling","sha":"2c826264bbf0b42ed20cf05b79bd4ad5f115d1cf","user":{"login":"pravj","id":3437250,"avatar_url":"https://avatars.githubusercontent.com/u/3437250?","gravatar_id":"0542054052bc2b70ab7680077bb7afce","url":"https://api.github.com/users/pravj","html_url":"https://github.com/pravj","followers_url":"https://api.github.com/users/pravj/followers","following_url":"https://api.github.com/users/pravj/following{/other_user}","gists_url":"https://api.github.com/users/pravj/gists{/gist_id}","starred_url":"https://api.github.com/users/pravj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravj/subscriptions","organizations_url":"https://api.github.com/users/pravj/orgs","repos_url":"https://api.github.com/users/pravj/repos","events_url":"https://api.github.com/users/pravj/events{/privacy}","received_events_url":"https://api.github.com/users/pravj/received_events","type":"User","site_admin":false},"repo":{"id":21689798,"name":"graf","full_name":"pravj/graf","owner":{"login":"pravj","id":3437250,"avatar_url":"https://avatars.githubusercontent.com/u/3437250?","gravatar_id":"0542054052bc2b70ab7680077bb7afce","url":"https://api.github.com/users/pravj","html_url":"https://github.com/pravj","followers_url":"https://api.github.com/users/pravj/followers","following_url":"https://api.github.com/users/pravj/following{/other_user}","gists_url":"https://api.github.com/users/pravj/gists{/gist_id}","starred_url":"https://api.github.com/users/pravj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pravj/subscriptions","organizations_url":"https://api.github.com/users/pravj/orgs","repos_url":"https://api.github.com/users/pravj/repos","events_url":"https://api.github.com/users/pravj/events{/privacy}","received_events_url":"https://api.github.com/users/pravj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pravj/graf","description":"A simple git log analyzer gem.","fork":true,"url":"https://api.github.com/repos/pravj/graf","forks_url":"https://api.github.com/repos/pravj/graf/forks","keys_url":"https://api.github.com/repos/pravj/graf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pravj/graf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pravj/graf/teams","hooks_url":"https://api.github.com/repos/pravj/graf/hooks","issue_events_url":"https://api.github.com/repos/pravj/graf/issues/events{/number}","events_url":"https://api.github.com/repos/pravj/graf/events","assignees_url":"https://api.github.com/repos/pravj/graf/assignees{/user}","branches_url":"https://api.github.com/repos/pravj/graf/branches{/branch}","tags_url":"https://api.github.com/repos/pravj/graf/tags","blobs_url":"https://api.github.com/repos/pravj/graf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pravj/graf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pravj/graf/git/refs{/sha}","trees_url":"https://api.github.com/repos/pravj/graf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pravj/graf/statuses/{sha}","languages_url":"https://api.github.com/repos/pravj/graf/languages","stargazers_url":"https://api.github.com/repos/pravj/graf/stargazers","contributors_url":"https://api.github.com/repos/pravj/graf/contributors","subscribers_url":"https://api.github.com/repos/pravj/graf/subscribers","subscription_url":"https://api.github.com/repos/pravj/graf/subscription","commits_url":"https://api.github.com/repos/pravj/graf/commits{/sha}","git_commits_url":"https://api.github.com/repos/pravj/graf/git/commits{/sha}","comments_url":"https://api.github.com/repos/pravj/graf/comments{/number}","issue_comment_url":"https://api.github.com/repos/pravj/graf/issues/comments/{number}","contents_url":"https://api.github.com/repos/pravj/graf/contents/{+path}","compare_url":"https://api.github.com/repos/pravj/graf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pravj/graf/merges","archive_url":"https://api.github.com/repos/pravj/graf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pravj/graf/downloads","issues_url":"https://api.github.com/repos/pravj/graf/issues{/number}","pulls_url":"https://api.github.com/repos/pravj/graf/pulls{/number}","milestones_url":"https://api.github.com/repos/pravj/graf/milestones{/number}","notifications_url":"https://api.github.com/repos/pravj/graf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pravj/graf/labels{/name}","releases_url":"https://api.github.com/repos/pravj/graf/releases{/id}","created_at":"2014-07-10T10:05:34Z","updated_at":"2014-04-24T22:00:23Z","pushed_at":"2014-07-10T11:37:35Z","git_url":"git://github.com/pravj/graf.git","ssh_url":"git@github.com:pravj/graf.git","clone_url":"https://github.com/pravj/graf.git","svn_url":"https://github.com/pravj/graf","homepage":"","size":119,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"abhshkdz:master","ref":"master","sha":"54f8fb2a433249c1801da7bd508e8bb68a9701e0","user":{"login":"abhshkdz","id":1156489,"avatar_url":"https://avatars.githubusercontent.com/u/1156489?","gravatar_id":"a36d4f1831b3e2c95fa1e42fc45f82d5","url":"https://api.github.com/users/abhshkdz","html_url":"https://github.com/abhshkdz","followers_url":"https://api.github.com/users/abhshkdz/followers","following_url":"https://api.github.com/users/abhshkdz/following{/other_user}","gists_url":"https://api.github.com/users/abhshkdz/gists{/gist_id}","starred_url":"https://api.github.com/users/abhshkdz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhshkdz/subscriptions","organizations_url":"https://api.github.com/users/abhshkdz/orgs","repos_url":"https://api.github.com/users/abhshkdz/repos","events_url":"https://api.github.com/users/abhshkdz/events{/privacy}","received_events_url":"https://api.github.com/users/abhshkdz/received_events","type":"User","site_admin":false},"repo":{"id":11403683,"name":"graf","full_name":"abhshkdz/graf","owner":{"login":"abhshkdz","id":1156489,"avatar_url":"https://avatars.githubusercontent.com/u/1156489?","gravatar_id":"a36d4f1831b3e2c95fa1e42fc45f82d5","url":"https://api.github.com/users/abhshkdz","html_url":"https://github.com/abhshkdz","followers_url":"https://api.github.com/users/abhshkdz/followers","following_url":"https://api.github.com/users/abhshkdz/following{/other_user}","gists_url":"https://api.github.com/users/abhshkdz/gists{/gist_id}","starred_url":"https://api.github.com/users/abhshkdz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhshkdz/subscriptions","organizations_url":"https://api.github.com/users/abhshkdz/orgs","repos_url":"https://api.github.com/users/abhshkdz/repos","events_url":"https://api.github.com/users/abhshkdz/events{/privacy}","received_events_url":"https://api.github.com/users/abhshkdz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abhshkdz/graf","description":"A simple git log analyzer gem.","fork":false,"url":"https://api.github.com/repos/abhshkdz/graf","forks_url":"https://api.github.com/repos/abhshkdz/graf/forks","keys_url":"https://api.github.com/repos/abhshkdz/graf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abhshkdz/graf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abhshkdz/graf/teams","hooks_url":"https://api.github.com/repos/abhshkdz/graf/hooks","issue_events_url":"https://api.github.com/repos/abhshkdz/graf/issues/events{/number}","events_url":"https://api.github.com/repos/abhshkdz/graf/events","assignees_url":"https://api.github.com/repos/abhshkdz/graf/assignees{/user}","branches_url":"https://api.github.com/repos/abhshkdz/graf/branches{/branch}","tags_url":"https://api.github.com/repos/abhshkdz/graf/tags","blobs_url":"https://api.github.com/repos/abhshkdz/graf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abhshkdz/graf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abhshkdz/graf/git/refs{/sha}","trees_url":"https://api.github.com/repos/abhshkdz/graf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abhshkdz/graf/statuses/{sha}","languages_url":"https://api.github.com/repos/abhshkdz/graf/languages","stargazers_url":"https://api.github.com/repos/abhshkdz/graf/stargazers","contributors_url":"https://api.github.com/repos/abhshkdz/graf/contributors","subscribers_url":"https://api.github.com/repos/abhshkdz/graf/subscribers","subscription_url":"https://api.github.com/repos/abhshkdz/graf/subscription","commits_url":"https://api.github.com/repos/abhshkdz/graf/commits{/sha}","git_commits_url":"https://api.github.com/repos/abhshkdz/graf/git/commits{/sha}","comments_url":"https://api.github.com/repos/abhshkdz/graf/comments{/number}","issue_comment_url":"https://api.github.com/repos/abhshkdz/graf/issues/comments/{number}","contents_url":"https://api.github.com/repos/abhshkdz/graf/contents/{+path}","compare_url":"https://api.github.com/repos/abhshkdz/graf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abhshkdz/graf/merges","archive_url":"https://api.github.com/repos/abhshkdz/graf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abhshkdz/graf/downloads","issues_url":"https://api.github.com/repos/abhshkdz/graf/issues{/number}","pulls_url":"https://api.github.com/repos/abhshkdz/graf/pulls{/number}","milestones_url":"https://api.github.com/repos/abhshkdz/graf/milestones{/number}","notifications_url":"https://api.github.com/repos/abhshkdz/graf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abhshkdz/graf/labels{/name}","releases_url":"https://api.github.com/repos/abhshkdz/graf/releases{/id}","created_at":"2013-07-14T13:56:37Z","updated_at":"2014-04-24T22:00:23Z","pushed_at":"2013-11-30T14:19:28Z","git_url":"git://github.com/abhshkdz/graf.git","ssh_url":"git@github.com:abhshkdz/graf.git","clone_url":"https://github.com/abhshkdz/graf.git","svn_url":"https://github.com/abhshkdz/graf","homepage":"","size":145,"stargazers_count":94,"watchers_count":94,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":10,"mirror_url":null,"open_issues_count":1,"forks":10,"open_issues":1,"watchers":94,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/abhshkdz/graf/pulls/9"},"html":{"href":"https://github.com/abhshkdz/graf/pull/9"},"issue":{"href":"https://api.github.com/repos/abhshkdz/graf/issues/9"},"comments":{"href":"https://api.github.com/repos/abhshkdz/graf/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/abhshkdz/graf/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/abhshkdz/graf/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/abhshkdz/graf/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/abhshkdz/graf/statuses/2c826264bbf0b42ed20cf05b79bd4ad5f115d1cf"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":65,"deletions":31,"changed_files":4}}