{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/comments/58095321","id":58095321,"diff_hunk":"@@ -60,7 +60,36 @@ eod\n         cmd += \"git checkout #{ENV['DSC_REF']} &&\" if ENV['DSC_REF']\n         cmd += \"git submodule update --init --recursive\"\n \n-        sh cmd\n+        sh cmd unless File.exists?(dsc_resources_path_tmp)\n+\n+        puts \"Creating sha file\"\n+        File.open(\"#{default_dsc_module_path}/dsc_resource_release_tags.md\", 'w+') do |file|\n+          file.write(\"## SHA tags for each DSC Resource repo\\n\")\n+          file.write(\"\\n\")\n+          file.write(\"DSC Resource | SHA | Release Tag\\n\")\n+          file.write(\"------------ | --- | -----\\n\")\n+          \n+          Dir[\"#{dsc_resources_path_tmp}/xDSCResources/*\"].each do |path|\n+            if File.directory?(path)\n+              puts \"Finding latest tag for #{path}\"\n+              FileUtils.cd(path) do\n+                begin\n+                  repo = Git.open(path, :log => Logger.new(STDOUT))","path":"build/dsc.rake","position":19,"original_position":19,"commit_id":"d2cbe7c30e96eb50756430efa4ddbd9c677bc809","original_commit_id":"d2cbe7c30e96eb50756430efa4ddbd9c677bc809","user":{"login":"jpogran","id":272569,"avatar_url":"https://avatars.githubusercontent.com/u/272569?v=3","gravatar_id":"","url":"https://api.github.com/users/jpogran","html_url":"https://github.com/jpogran","followers_url":"https://api.github.com/users/jpogran/followers","following_url":"https://api.github.com/users/jpogran/following{/other_user}","gists_url":"https://api.github.com/users/jpogran/gists{/gist_id}","starred_url":"https://api.github.com/users/jpogran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpogran/subscriptions","organizations_url":"https://api.github.com/users/jpogran/orgs","repos_url":"https://api.github.com/users/jpogran/repos","events_url":"https://api.github.com/users/jpogran/events{/privacy}","received_events_url":"https://api.github.com/users/jpogran/received_events","type":"User","site_admin":false},"body":"I did originally, but met resistance when i couldn't figure out how to return the output from the git command using `sh`","created_at":"2016-03-31T17:38:19Z","updated_at":"2016-03-31T17:38:19Z","html_url":"https://github.com/puppetlabs/puppetlabs-dsc/pull/191#discussion_r58095321","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/191","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/comments/58095321"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-dsc/pull/191#discussion_r58095321"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/191"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/191","id":64656182,"html_url":"https://github.com/puppetlabs/puppetlabs-dsc/pull/191","diff_url":"https://github.com/puppetlabs/puppetlabs-dsc/pull/191.diff","patch_url":"https://github.com/puppetlabs/puppetlabs-dsc/pull/191.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/issues/191","number":191,"state":"open","locked":false,"title":"(WIP)(MODULES-3221) Use PSGallery Tags for DSCResources","user":{"login":"jpogran","id":272569,"avatar_url":"https://avatars.githubusercontent.com/u/272569?v=3","gravatar_id":"","url":"https://api.github.com/users/jpogran","html_url":"https://github.com/jpogran","followers_url":"https://api.github.com/users/jpogran/followers","following_url":"https://api.github.com/users/jpogran/following{/other_user}","gists_url":"https://api.github.com/users/jpogran/gists{/gist_id}","starred_url":"https://api.github.com/users/jpogran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpogran/subscriptions","organizations_url":"https://api.github.com/users/jpogran/orgs","repos_url":"https://api.github.com/users/jpogran/repos","events_url":"https://api.github.com/users/jpogran/events{/privacy}","received_events_url":"https://api.github.com/users/jpogran/received_events","type":"User","site_admin":false},"body":"The PowerShell DSCResources repo uses submodules for each DSCResource\r\nthat is released to the PSGallery. Each submodule points to the actual\r\nDSCResource git repo, but the release strategy for that repo is the\r\nlatest tag. In order to ensure we are using the 'released' PSGallery\r\nversion we modify the build rake task to use the latest git tag.\r\n\r\nThis PR currently fails to checkout the tag for xWordPress correctly, to fix this we need to add a submodule update first.","created_at":"2016-03-30T16:23:19Z","updated_at":"2016-03-31T17:38:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"027bcd7a5998f31c64a8e9ae3269460f183c43a8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/191/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/191/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/issues/191/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/statuses/d2cbe7c30e96eb50756430efa4ddbd9c677bc809","head":{"label":"jpogran:ticket/master/MODULES-3221-use-tags-from-psgallery","ref":"ticket/master/MODULES-3221-use-tags-from-psgallery","sha":"d2cbe7c30e96eb50756430efa4ddbd9c677bc809","user":{"login":"jpogran","id":272569,"avatar_url":"https://avatars.githubusercontent.com/u/272569?v=3","gravatar_id":"","url":"https://api.github.com/users/jpogran","html_url":"https://github.com/jpogran","followers_url":"https://api.github.com/users/jpogran/followers","following_url":"https://api.github.com/users/jpogran/following{/other_user}","gists_url":"https://api.github.com/users/jpogran/gists{/gist_id}","starred_url":"https://api.github.com/users/jpogran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpogran/subscriptions","organizations_url":"https://api.github.com/users/jpogran/orgs","repos_url":"https://api.github.com/users/jpogran/repos","events_url":"https://api.github.com/users/jpogran/events{/privacy}","received_events_url":"https://api.github.com/users/jpogran/received_events","type":"User","site_admin":false},"repo":{"id":37696508,"name":"puppetlabs-dsc","full_name":"jpogran/puppetlabs-dsc","owner":{"login":"jpogran","id":272569,"avatar_url":"https://avatars.githubusercontent.com/u/272569?v=3","gravatar_id":"","url":"https://api.github.com/users/jpogran","html_url":"https://github.com/jpogran","followers_url":"https://api.github.com/users/jpogran/followers","following_url":"https://api.github.com/users/jpogran/following{/other_user}","gists_url":"https://api.github.com/users/jpogran/gists{/gist_id}","starred_url":"https://api.github.com/users/jpogran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpogran/subscriptions","organizations_url":"https://api.github.com/users/jpogran/orgs","repos_url":"https://api.github.com/users/jpogran/repos","events_url":"https://api.github.com/users/jpogran/events{/privacy}","received_events_url":"https://api.github.com/users/jpogran/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jpogran/puppetlabs-dsc","description":"Puppet module for PowerShell Desired State Configuration (DSC) integration","fork":true,"url":"https://api.github.com/repos/jpogran/puppetlabs-dsc","forks_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/forks","keys_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/teams","hooks_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/hooks","issue_events_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/issues/events{/number}","events_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/events","assignees_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/assignees{/user}","branches_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/branches{/branch}","tags_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/tags","blobs_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/git/refs{/sha}","trees_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/statuses/{sha}","languages_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/languages","stargazers_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/stargazers","contributors_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/contributors","subscribers_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/subscribers","subscription_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/subscription","commits_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/commits{/sha}","git_commits_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/git/commits{/sha}","comments_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/comments{/number}","issue_comment_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/issues/comments{/number}","contents_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/contents/{+path}","compare_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/merges","archive_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/downloads","issues_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/issues{/number}","pulls_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/pulls{/number}","milestones_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/milestones{/number}","notifications_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/labels{/name}","releases_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/releases{/id}","deployments_url":"https://api.github.com/repos/jpogran/puppetlabs-dsc/deployments","created_at":"2015-06-19T02:10:54Z","updated_at":"2015-09-24T03:54:11Z","pushed_at":"2016-03-31T16:53:23Z","git_url":"git://github.com/jpogran/puppetlabs-dsc.git","ssh_url":"git@github.com:jpogran/puppetlabs-dsc.git","clone_url":"https://github.com/jpogran/puppetlabs-dsc.git","svn_url":"https://github.com/jpogran/puppetlabs-dsc","homepage":"","size":11897,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"puppetlabs:master","ref":"master","sha":"e92c9e36fce6e1f61f13836ebc7784a6aa3de618","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":21090303,"name":"puppetlabs-dsc","full_name":"puppetlabs/puppetlabs-dsc","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppetlabs-dsc","description":"Puppet module for PowerShell Desired State Configuration (DSC) integration","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc","forks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/deployments","created_at":"2014-06-22T09:42:33Z","updated_at":"2016-03-21T19:26:40Z","pushed_at":"2016-03-31T16:53:24Z","git_url":"git://github.com/puppetlabs/puppetlabs-dsc.git","ssh_url":"git@github.com:puppetlabs/puppetlabs-dsc.git","clone_url":"https://github.com/puppetlabs/puppetlabs-dsc.git","svn_url":"https://github.com/puppetlabs/puppetlabs-dsc","homepage":"","size":12349,"stargazers_count":28,"watchers_count":28,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":6,"forks":19,"open_issues":6,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/191"},"html":{"href":"https://github.com/puppetlabs/puppetlabs-dsc/pull/191"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/issues/191"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/issues/191/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/191/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/pulls/191/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetlabs-dsc/statuses/d2cbe7c30e96eb50756430efa4ddbd9c677bc809"}}}}