{"action":"opened","number":14,"pull_request":{"url":"https://api.github.com/repos/google/javapoet/pulls/14","id":64106244,"html_url":"https://github.com/google/javapoet/pull/14","diff_url":"https://github.com/google/javapoet/pull/14.diff","patch_url":"https://github.com/google/javapoet/pull/14.patch","issue_url":"https://api.github.com/repos/google/javapoet/issues/14","number":14,"state":"open","locked":false,"title":"Adding addPackage method","user":{"login":"genyherrera","id":1524865,"avatar_url":"https://avatars.githubusercontent.com/u/1524865?v=3","gravatar_id":"","url":"https://api.github.com/users/genyherrera","html_url":"https://github.com/genyherrera","followers_url":"https://api.github.com/users/genyherrera/followers","following_url":"https://api.github.com/users/genyherrera/following{/other_user}","gists_url":"https://api.github.com/users/genyherrera/gists{/gist_id}","starred_url":"https://api.github.com/users/genyherrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genyherrera/subscriptions","organizations_url":"https://api.github.com/users/genyherrera/orgs","repos_url":"https://api.github.com/users/genyherrera/repos","events_url":"https://api.github.com/users/genyherrera/events{/privacy}","received_events_url":"https://api.github.com/users/genyherrera/received_events","type":"User","site_admin":false},"body":"1. Creating class with package declaration:\r\n\r\n- Previous version: \r\n`JavaFile javaFile = JavaFile.builder(\"com.example.helloworld\", helloWorld).build();`\r\n\r\n- With addPackage method:\r\n`JavaFile javaFile = JavaFile.builder(helloWorld).addPackage(\"com.example.helloworld\").build();`\r\n\r\n2. Creating class without package declaration:\r\n\r\n- Previous version: \r\n`JavaFile javaFile = JavaFile.builder(\"\", helloWorld).build();`\r\n\r\n- With addPackage method:\r\n`JavaFile javaFile = JavaFile.builder(helloWorld).build();`\r\n\r\nMake the code more readable.","created_at":"2016-03-24T22:06:21Z","updated_at":"2016-03-24T22:06:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/google/javapoet/pulls/14/commits","review_comments_url":"https://api.github.com/repos/google/javapoet/pulls/14/comments","review_comment_url":"https://api.github.com/repos/google/javapoet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/javapoet/issues/14/comments","statuses_url":"https://api.github.com/repos/google/javapoet/statuses/fe116c8ed315ca7c3e61f5ce4e3b2edd1e579cd2","head":{"label":"genyherrera:master","ref":"master","sha":"fe116c8ed315ca7c3e61f5ce4e3b2edd1e579cd2","user":{"login":"genyherrera","id":1524865,"avatar_url":"https://avatars.githubusercontent.com/u/1524865?v=3","gravatar_id":"","url":"https://api.github.com/users/genyherrera","html_url":"https://github.com/genyherrera","followers_url":"https://api.github.com/users/genyherrera/followers","following_url":"https://api.github.com/users/genyherrera/following{/other_user}","gists_url":"https://api.github.com/users/genyherrera/gists{/gist_id}","starred_url":"https://api.github.com/users/genyherrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genyherrera/subscriptions","organizations_url":"https://api.github.com/users/genyherrera/orgs","repos_url":"https://api.github.com/users/genyherrera/repos","events_url":"https://api.github.com/users/genyherrera/events{/privacy}","received_events_url":"https://api.github.com/users/genyherrera/received_events","type":"User","site_admin":false},"repo":{"id":54673367,"name":"javapoet","full_name":"genyherrera/javapoet","owner":{"login":"genyherrera","id":1524865,"avatar_url":"https://avatars.githubusercontent.com/u/1524865?v=3","gravatar_id":"","url":"https://api.github.com/users/genyherrera","html_url":"https://github.com/genyherrera","followers_url":"https://api.github.com/users/genyherrera/followers","following_url":"https://api.github.com/users/genyherrera/following{/other_user}","gists_url":"https://api.github.com/users/genyherrera/gists{/gist_id}","starred_url":"https://api.github.com/users/genyherrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genyherrera/subscriptions","organizations_url":"https://api.github.com/users/genyherrera/orgs","repos_url":"https://api.github.com/users/genyherrera/repos","events_url":"https://api.github.com/users/genyherrera/events{/privacy}","received_events_url":"https://api.github.com/users/genyherrera/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/genyherrera/javapoet","description":"A library which aids in generating Java source files.","fork":true,"url":"https://api.github.com/repos/genyherrera/javapoet","forks_url":"https://api.github.com/repos/genyherrera/javapoet/forks","keys_url":"https://api.github.com/repos/genyherrera/javapoet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/genyherrera/javapoet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/genyherrera/javapoet/teams","hooks_url":"https://api.github.com/repos/genyherrera/javapoet/hooks","issue_events_url":"https://api.github.com/repos/genyherrera/javapoet/issues/events{/number}","events_url":"https://api.github.com/repos/genyherrera/javapoet/events","assignees_url":"https://api.github.com/repos/genyherrera/javapoet/assignees{/user}","branches_url":"https://api.github.com/repos/genyherrera/javapoet/branches{/branch}","tags_url":"https://api.github.com/repos/genyherrera/javapoet/tags","blobs_url":"https://api.github.com/repos/genyherrera/javapoet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/genyherrera/javapoet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/genyherrera/javapoet/git/refs{/sha}","trees_url":"https://api.github.com/repos/genyherrera/javapoet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/genyherrera/javapoet/statuses/{sha}","languages_url":"https://api.github.com/repos/genyherrera/javapoet/languages","stargazers_url":"https://api.github.com/repos/genyherrera/javapoet/stargazers","contributors_url":"https://api.github.com/repos/genyherrera/javapoet/contributors","subscribers_url":"https://api.github.com/repos/genyherrera/javapoet/subscribers","subscription_url":"https://api.github.com/repos/genyherrera/javapoet/subscription","commits_url":"https://api.github.com/repos/genyherrera/javapoet/commits{/sha}","git_commits_url":"https://api.github.com/repos/genyherrera/javapoet/git/commits{/sha}","comments_url":"https://api.github.com/repos/genyherrera/javapoet/comments{/number}","issue_comment_url":"https://api.github.com/repos/genyherrera/javapoet/issues/comments{/number}","contents_url":"https://api.github.com/repos/genyherrera/javapoet/contents/{+path}","compare_url":"https://api.github.com/repos/genyherrera/javapoet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/genyherrera/javapoet/merges","archive_url":"https://api.github.com/repos/genyherrera/javapoet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/genyherrera/javapoet/downloads","issues_url":"https://api.github.com/repos/genyherrera/javapoet/issues{/number}","pulls_url":"https://api.github.com/repos/genyherrera/javapoet/pulls{/number}","milestones_url":"https://api.github.com/repos/genyherrera/javapoet/milestones{/number}","notifications_url":"https://api.github.com/repos/genyherrera/javapoet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/genyherrera/javapoet/labels{/name}","releases_url":"https://api.github.com/repos/genyherrera/javapoet/releases{/id}","deployments_url":"https://api.github.com/repos/genyherrera/javapoet/deployments","created_at":"2016-03-24T20:51:10Z","updated_at":"2016-03-24T20:51:11Z","pushed_at":"2016-03-24T22:03:38Z","git_url":"git://github.com/genyherrera/javapoet.git","ssh_url":"git@github.com:genyherrera/javapoet.git","clone_url":"https://github.com/genyherrera/javapoet.git","svn_url":"https://github.com/genyherrera/javapoet","homepage":"","size":826,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"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":"google:master","ref":"master","sha":"9e4972a97239014daab22a913cfcbfc02d294604","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":27149396,"name":"javapoet","full_name":"google/javapoet","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/javapoet","description":"A library which aids in generating Java source files.","fork":true,"url":"https://api.github.com/repos/google/javapoet","forks_url":"https://api.github.com/repos/google/javapoet/forks","keys_url":"https://api.github.com/repos/google/javapoet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/javapoet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/javapoet/teams","hooks_url":"https://api.github.com/repos/google/javapoet/hooks","issue_events_url":"https://api.github.com/repos/google/javapoet/issues/events{/number}","events_url":"https://api.github.com/repos/google/javapoet/events","assignees_url":"https://api.github.com/repos/google/javapoet/assignees{/user}","branches_url":"https://api.github.com/repos/google/javapoet/branches{/branch}","tags_url":"https://api.github.com/repos/google/javapoet/tags","blobs_url":"https://api.github.com/repos/google/javapoet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/javapoet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/javapoet/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/javapoet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/javapoet/statuses/{sha}","languages_url":"https://api.github.com/repos/google/javapoet/languages","stargazers_url":"https://api.github.com/repos/google/javapoet/stargazers","contributors_url":"https://api.github.com/repos/google/javapoet/contributors","subscribers_url":"https://api.github.com/repos/google/javapoet/subscribers","subscription_url":"https://api.github.com/repos/google/javapoet/subscription","commits_url":"https://api.github.com/repos/google/javapoet/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/javapoet/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/javapoet/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/javapoet/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/javapoet/contents/{+path}","compare_url":"https://api.github.com/repos/google/javapoet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/javapoet/merges","archive_url":"https://api.github.com/repos/google/javapoet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/javapoet/downloads","issues_url":"https://api.github.com/repos/google/javapoet/issues{/number}","pulls_url":"https://api.github.com/repos/google/javapoet/pulls{/number}","milestones_url":"https://api.github.com/repos/google/javapoet/milestones{/number}","notifications_url":"https://api.github.com/repos/google/javapoet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/javapoet/labels{/name}","releases_url":"https://api.github.com/repos/google/javapoet/releases{/id}","deployments_url":"https://api.github.com/repos/google/javapoet/deployments","created_at":"2014-11-25T22:35:49Z","updated_at":"2016-03-15T05:41:21Z","pushed_at":"2016-03-24T21:06:21Z","git_url":"git://github.com/google/javapoet.git","ssh_url":"git@github.com:google/javapoet.git","clone_url":"https://github.com/google/javapoet.git","svn_url":"https://github.com/google/javapoet","homepage":"","size":1032,"stargazers_count":48,"watchers_count":48,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":1,"forks":10,"open_issues":1,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/javapoet/pulls/14"},"html":{"href":"https://github.com/google/javapoet/pull/14"},"issue":{"href":"https://api.github.com/repos/google/javapoet/issues/14"},"comments":{"href":"https://api.github.com/repos/google/javapoet/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/google/javapoet/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/google/javapoet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/javapoet/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/google/javapoet/statuses/fe116c8ed315ca7c3e61f5ce4e3b2edd1e579cd2"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":62,"deletions":1,"changed_files":2}}