{"action":"created","comment":{"url":"https://api.github.com/repos/seaneagan/den/pulls/comments/23260470","id":23260470,"diff_hunk":"@@ -87,6 +108,19 @@ class Pubspec {\n       this._contents,\n       this._yamlMap);\n \n+  static Pubspec init() {\n+    var packageRoot = p.current;\n+    var pubspecPath = p.join(packageRoot, _PUBSPEC);\n+    var contents = \"name: ${p.basename(packageRoot)}\";\n+    var yaml = loadYamlNode(contents, sourceUrl: pubspecPath);\n+    var _pubspec = new Pubspec(pubspecPath, contents, yaml);\n+\n+    _pubspec.version = new Version.parse('0.1.0');\n+\n+    if(checkHasGitSync()) _pubspec.author = \"${gitConfigUserNameSync()} <${gitConfigUserEmailSync()}>\";","path":"lib/src/pub.dart","position":56,"original_position":56,"commit_id":"213df97b100a445225a260da5830835940985e93","original_commit_id":"213df97b100a445225a260da5830835940985e93","user":{"login":"seaneagan","id":444270,"avatar_url":"https://avatars.githubusercontent.com/u/444270?v=3","gravatar_id":"","url":"https://api.github.com/users/seaneagan","html_url":"https://github.com/seaneagan","followers_url":"https://api.github.com/users/seaneagan/followers","following_url":"https://api.github.com/users/seaneagan/following{/other_user}","gists_url":"https://api.github.com/users/seaneagan/gists{/gist_id}","starred_url":"https://api.github.com/users/seaneagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seaneagan/subscriptions","organizations_url":"https://api.github.com/users/seaneagan/orgs","repos_url":"https://api.github.com/users/seaneagan/repos","events_url":"https://api.github.com/users/seaneagan/events{/privacy}","received_events_url":"https://api.github.com/users/seaneagan/received_events","type":"User","site_admin":false},"body":"Need some error handling here.  If git fails, or if the git config for either field was not set, it should not set the author.","created_at":"2015-01-20T22:06:03Z","updated_at":"2015-01-20T22:06:03Z","html_url":"https://github.com/seaneagan/den/pull/13#discussion_r23260470","pull_request_url":"https://api.github.com/repos/seaneagan/den/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/seaneagan/den/pulls/comments/23260470"},"html":{"href":"https://github.com/seaneagan/den/pull/13#discussion_r23260470"},"pull_request":{"href":"https://api.github.com/repos/seaneagan/den/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/seaneagan/den/pulls/13","id":27566997,"html_url":"https://github.com/seaneagan/den/pull/13","diff_url":"https://github.com/seaneagan/den/pull/13.diff","patch_url":"https://github.com/seaneagan/den/pull/13.patch","issue_url":"https://api.github.com/repos/seaneagan/den/issues/13","number":13,"state":"open","locked":false,"title":"Implement #2","user":{"login":"damondouglas","id":762456,"avatar_url":"https://avatars.githubusercontent.com/u/762456?v=3","gravatar_id":"","url":"https://api.github.com/users/damondouglas","html_url":"https://github.com/damondouglas","followers_url":"https://api.github.com/users/damondouglas/followers","following_url":"https://api.github.com/users/damondouglas/following{/other_user}","gists_url":"https://api.github.com/users/damondouglas/gists{/gist_id}","starred_url":"https://api.github.com/users/damondouglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damondouglas/subscriptions","organizations_url":"https://api.github.com/users/damondouglas/orgs","repos_url":"https://api.github.com/users/damondouglas/repos","events_url":"https://api.github.com/users/damondouglas/events{/privacy}","received_events_url":"https://api.github.com/users/damondouglas/received_events","type":"User","site_admin":false},"body":"@seaneagan thank you so much for this opportunity.  Even if my PR is not accepted, I appreciate what I've learned from your code and this experience.","created_at":"2015-01-18T05:01:57Z","updated_at":"2015-01-20T22:06:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18ff8af7d6c514f28e26d3933bbb717def180adb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/seaneagan/den/pulls/13/commits","review_comments_url":"https://api.github.com/repos/seaneagan/den/pulls/13/comments","review_comment_url":"https://api.github.com/repos/seaneagan/den/pulls/comments/{number}","comments_url":"https://api.github.com/repos/seaneagan/den/issues/13/comments","statuses_url":"https://api.github.com/repos/seaneagan/den/statuses/213df97b100a445225a260da5830835940985e93","head":{"label":"damondouglas:master","ref":"master","sha":"213df97b100a445225a260da5830835940985e93","user":{"login":"damondouglas","id":762456,"avatar_url":"https://avatars.githubusercontent.com/u/762456?v=3","gravatar_id":"","url":"https://api.github.com/users/damondouglas","html_url":"https://github.com/damondouglas","followers_url":"https://api.github.com/users/damondouglas/followers","following_url":"https://api.github.com/users/damondouglas/following{/other_user}","gists_url":"https://api.github.com/users/damondouglas/gists{/gist_id}","starred_url":"https://api.github.com/users/damondouglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damondouglas/subscriptions","organizations_url":"https://api.github.com/users/damondouglas/orgs","repos_url":"https://api.github.com/users/damondouglas/repos","events_url":"https://api.github.com/users/damondouglas/events{/privacy}","received_events_url":"https://api.github.com/users/damondouglas/received_events","type":"User","site_admin":false},"repo":{"id":29378884,"name":"den","full_name":"damondouglas/den","owner":{"login":"damondouglas","id":762456,"avatar_url":"https://avatars.githubusercontent.com/u/762456?v=3","gravatar_id":"","url":"https://api.github.com/users/damondouglas","html_url":"https://github.com/damondouglas","followers_url":"https://api.github.com/users/damondouglas/followers","following_url":"https://api.github.com/users/damondouglas/following{/other_user}","gists_url":"https://api.github.com/users/damondouglas/gists{/gist_id}","starred_url":"https://api.github.com/users/damondouglas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damondouglas/subscriptions","organizations_url":"https://api.github.com/users/damondouglas/orgs","repos_url":"https://api.github.com/users/damondouglas/repos","events_url":"https://api.github.com/users/damondouglas/events{/privacy}","received_events_url":"https://api.github.com/users/damondouglas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/damondouglas/den","description":"A pubspec authoring tool.","fork":true,"url":"https://api.github.com/repos/damondouglas/den","forks_url":"https://api.github.com/repos/damondouglas/den/forks","keys_url":"https://api.github.com/repos/damondouglas/den/keys{/key_id}","collaborators_url":"https://api.github.com/repos/damondouglas/den/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/damondouglas/den/teams","hooks_url":"https://api.github.com/repos/damondouglas/den/hooks","issue_events_url":"https://api.github.com/repos/damondouglas/den/issues/events{/number}","events_url":"https://api.github.com/repos/damondouglas/den/events","assignees_url":"https://api.github.com/repos/damondouglas/den/assignees{/user}","branches_url":"https://api.github.com/repos/damondouglas/den/branches{/branch}","tags_url":"https://api.github.com/repos/damondouglas/den/tags","blobs_url":"https://api.github.com/repos/damondouglas/den/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/damondouglas/den/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/damondouglas/den/git/refs{/sha}","trees_url":"https://api.github.com/repos/damondouglas/den/git/trees{/sha}","statuses_url":"https://api.github.com/repos/damondouglas/den/statuses/{sha}","languages_url":"https://api.github.com/repos/damondouglas/den/languages","stargazers_url":"https://api.github.com/repos/damondouglas/den/stargazers","contributors_url":"https://api.github.com/repos/damondouglas/den/contributors","subscribers_url":"https://api.github.com/repos/damondouglas/den/subscribers","subscription_url":"https://api.github.com/repos/damondouglas/den/subscription","commits_url":"https://api.github.com/repos/damondouglas/den/commits{/sha}","git_commits_url":"https://api.github.com/repos/damondouglas/den/git/commits{/sha}","comments_url":"https://api.github.com/repos/damondouglas/den/comments{/number}","issue_comment_url":"https://api.github.com/repos/damondouglas/den/issues/comments/{number}","contents_url":"https://api.github.com/repos/damondouglas/den/contents/{+path}","compare_url":"https://api.github.com/repos/damondouglas/den/compare/{base}...{head}","merges_url":"https://api.github.com/repos/damondouglas/den/merges","archive_url":"https://api.github.com/repos/damondouglas/den/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/damondouglas/den/downloads","issues_url":"https://api.github.com/repos/damondouglas/den/issues{/number}","pulls_url":"https://api.github.com/repos/damondouglas/den/pulls{/number}","milestones_url":"https://api.github.com/repos/damondouglas/den/milestones{/number}","notifications_url":"https://api.github.com/repos/damondouglas/den/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/damondouglas/den/labels{/name}","releases_url":"https://api.github.com/repos/damondouglas/den/releases{/id}","created_at":"2015-01-17T03:46:54Z","updated_at":"2015-01-19T23:32:15Z","pushed_at":"2015-01-19T23:32:15Z","git_url":"git://github.com/damondouglas/den.git","ssh_url":"git@github.com:damondouglas/den.git","clone_url":"https://github.com/damondouglas/den.git","svn_url":"https://github.com/damondouglas/den","homepage":"","size":170,"stargazers_count":0,"watchers_count":0,"language":"Dart","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"seaneagan:master","ref":"master","sha":"acb8c60dbc2428e324eecedd01672d5cc1918f89","user":{"login":"seaneagan","id":444270,"avatar_url":"https://avatars.githubusercontent.com/u/444270?v=3","gravatar_id":"","url":"https://api.github.com/users/seaneagan","html_url":"https://github.com/seaneagan","followers_url":"https://api.github.com/users/seaneagan/followers","following_url":"https://api.github.com/users/seaneagan/following{/other_user}","gists_url":"https://api.github.com/users/seaneagan/gists{/gist_id}","starred_url":"https://api.github.com/users/seaneagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seaneagan/subscriptions","organizations_url":"https://api.github.com/users/seaneagan/orgs","repos_url":"https://api.github.com/users/seaneagan/repos","events_url":"https://api.github.com/users/seaneagan/events{/privacy}","received_events_url":"https://api.github.com/users/seaneagan/received_events","type":"User","site_admin":false},"repo":{"id":24459989,"name":"den","full_name":"seaneagan/den","owner":{"login":"seaneagan","id":444270,"avatar_url":"https://avatars.githubusercontent.com/u/444270?v=3","gravatar_id":"","url":"https://api.github.com/users/seaneagan","html_url":"https://github.com/seaneagan","followers_url":"https://api.github.com/users/seaneagan/followers","following_url":"https://api.github.com/users/seaneagan/following{/other_user}","gists_url":"https://api.github.com/users/seaneagan/gists{/gist_id}","starred_url":"https://api.github.com/users/seaneagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seaneagan/subscriptions","organizations_url":"https://api.github.com/users/seaneagan/orgs","repos_url":"https://api.github.com/users/seaneagan/repos","events_url":"https://api.github.com/users/seaneagan/events{/privacy}","received_events_url":"https://api.github.com/users/seaneagan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/seaneagan/den","description":"A pubspec authoring tool.","fork":false,"url":"https://api.github.com/repos/seaneagan/den","forks_url":"https://api.github.com/repos/seaneagan/den/forks","keys_url":"https://api.github.com/repos/seaneagan/den/keys{/key_id}","collaborators_url":"https://api.github.com/repos/seaneagan/den/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/seaneagan/den/teams","hooks_url":"https://api.github.com/repos/seaneagan/den/hooks","issue_events_url":"https://api.github.com/repos/seaneagan/den/issues/events{/number}","events_url":"https://api.github.com/repos/seaneagan/den/events","assignees_url":"https://api.github.com/repos/seaneagan/den/assignees{/user}","branches_url":"https://api.github.com/repos/seaneagan/den/branches{/branch}","tags_url":"https://api.github.com/repos/seaneagan/den/tags","blobs_url":"https://api.github.com/repos/seaneagan/den/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/seaneagan/den/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/seaneagan/den/git/refs{/sha}","trees_url":"https://api.github.com/repos/seaneagan/den/git/trees{/sha}","statuses_url":"https://api.github.com/repos/seaneagan/den/statuses/{sha}","languages_url":"https://api.github.com/repos/seaneagan/den/languages","stargazers_url":"https://api.github.com/repos/seaneagan/den/stargazers","contributors_url":"https://api.github.com/repos/seaneagan/den/contributors","subscribers_url":"https://api.github.com/repos/seaneagan/den/subscribers","subscription_url":"https://api.github.com/repos/seaneagan/den/subscription","commits_url":"https://api.github.com/repos/seaneagan/den/commits{/sha}","git_commits_url":"https://api.github.com/repos/seaneagan/den/git/commits{/sha}","comments_url":"https://api.github.com/repos/seaneagan/den/comments{/number}","issue_comment_url":"https://api.github.com/repos/seaneagan/den/issues/comments/{number}","contents_url":"https://api.github.com/repos/seaneagan/den/contents/{+path}","compare_url":"https://api.github.com/repos/seaneagan/den/compare/{base}...{head}","merges_url":"https://api.github.com/repos/seaneagan/den/merges","archive_url":"https://api.github.com/repos/seaneagan/den/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/seaneagan/den/downloads","issues_url":"https://api.github.com/repos/seaneagan/den/issues{/number}","pulls_url":"https://api.github.com/repos/seaneagan/den/pulls{/number}","milestones_url":"https://api.github.com/repos/seaneagan/den/milestones{/number}","notifications_url":"https://api.github.com/repos/seaneagan/den/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/seaneagan/den/labels{/name}","releases_url":"https://api.github.com/repos/seaneagan/den/releases{/id}","created_at":"2014-09-25T13:53:11Z","updated_at":"2015-01-20T01:14:06Z","pushed_at":"2015-01-15T22:11:55Z","git_url":"git://github.com/seaneagan/den.git","ssh_url":"git@github.com:seaneagan/den.git","clone_url":"https://github.com/seaneagan/den.git","svn_url":"https://github.com/seaneagan/den","homepage":"","size":486,"stargazers_count":13,"watchers_count":13,"language":"Dart","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":6,"forks":2,"open_issues":6,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/seaneagan/den/pulls/13"},"html":{"href":"https://github.com/seaneagan/den/pull/13"},"issue":{"href":"https://api.github.com/repos/seaneagan/den/issues/13"},"comments":{"href":"https://api.github.com/repos/seaneagan/den/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/seaneagan/den/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/seaneagan/den/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/seaneagan/den/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/seaneagan/den/statuses/213df97b100a445225a260da5830835940985e93"}}}}