{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/packaging/pulls/comments/46326131","id":46326131,"diff_hunk":"@@ -1,11 +1,32 @@\n+require 'cgi'\n # This rake task creates tickets in jira for a puppet-agent release.\n # Tasks here differ from single-component releases in that they apply\n # to multiple components - each project which is being updated for\n # the new puppet-agent version.\n \n+def build_query(vars, jql)\n+  \"#{vars[:site]}/issues/?jql=#{CGI.escape(jql)}\"\n+end\n+\n+def build_queries(vars, label)\n+  queries = {}\n+\n+  queries[:all]          = build_query(vars, \"#{label} in ('puppet-agent #{vars[:puppet_agent_release]}', 'PUP #{vars[:puppet_release]}', 'FACT #{vars[:facter_release]}', 'HI #{vars[:hiera_release]}', 'MCO #{vars[:mcollective_release]}', 'pxp-agent #{vars[:pcp_release]}')\")\n+  queries[:puppet_agent] = build_query(vars, \"#{label} = 'puppet-agent #{vars[:puppet_agent_release]}'\")\n+  queries[:puppet]       = build_query(vars, \"#{label} = 'PUP #{vars[:puppet_release]}'\")\n+  queries[:facter]       = build_query(vars, \"#{label} = 'FACT #{vars[:facter_release]}'\")\n+  queries[:hiera]        = build_query(vars, \"#{label} = 'HI #{vars[:hiera_release]}'\")\n+  queries[:mcollective]  = build_query(vars, \"#{label} = 'MCO #{vars[:mcollective_release]}'\")\n+  queries[:pcp]          = build_query(vars, \"#{label} = 'pxp-agent #{vars[:pcp_release]}'\")\n+\n+  queries\n+end\n+\n def get_agent_release_ticket_vars\n   vars = {}\n \n+  vars[:site]            = Pkg::Util.get_var(\"JIRA_INSTANCE\") || \"https://tickets.puppetlabs.com\"","path":"tasks/puppet-agent-release-tickets.rake","position":null,"original_position":28,"commit_id":"5fc6690981b96d2ba739cfea0c95a78c4038fdeb","original_commit_id":"a2d67a9548de46a227084b8ce2fea5c7af2d00bc","user":{"login":"joshcooper","id":737664,"avatar_url":"https://avatars.githubusercontent.com/u/737664?v=3","gravatar_id":"","url":"https://api.github.com/users/joshcooper","html_url":"https://github.com/joshcooper","followers_url":"https://api.github.com/users/joshcooper/followers","following_url":"https://api.github.com/users/joshcooper/following{/other_user}","gists_url":"https://api.github.com/users/joshcooper/gists{/gist_id}","starred_url":"https://api.github.com/users/joshcooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshcooper/subscriptions","organizations_url":"https://api.github.com/users/joshcooper/orgs","repos_url":"https://api.github.com/users/joshcooper/repos","events_url":"https://api.github.com/users/joshcooper/events{/privacy}","received_events_url":"https://api.github.com/users/joshcooper/received_events","type":"User","site_admin":false},"body":"Updated in https://github.com/joshcooper/packaging/commit/de8427ccbf4e59498437872d395db78180713fd2","created_at":"2015-12-01T19:31:07Z","updated_at":"2015-12-01T19:31:07Z","html_url":"https://github.com/puppetlabs/packaging/pull/474#discussion_r46326131","pull_request_url":"https://api.github.com/repos/puppetlabs/packaging/pulls/474","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/packaging/pulls/comments/46326131"},"html":{"href":"https://github.com/puppetlabs/packaging/pull/474#discussion_r46326131"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/packaging/pulls/474"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/packaging/pulls/474","id":51733083,"html_url":"https://github.com/puppetlabs/packaging/pull/474","diff_url":"https://github.com/puppetlabs/packaging/pull/474.diff","patch_url":"https://github.com/puppetlabs/packaging/pull/474.patch","issue_url":"https://api.github.com/repos/puppetlabs/packaging/issues/474","number":474,"state":"open","locked":false,"title":"(RE-6007) Update puppet agent release task","user":{"login":"joshcooper","id":737664,"avatar_url":"https://avatars.githubusercontent.com/u/737664?v=3","gravatar_id":"","url":"https://api.github.com/users/joshcooper","html_url":"https://github.com/joshcooper","followers_url":"https://api.github.com/users/joshcooper/followers","following_url":"https://api.github.com/users/joshcooper/following{/other_user}","gists_url":"https://api.github.com/users/joshcooper/gists{/gist_id}","starred_url":"https://api.github.com/users/joshcooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshcooper/subscriptions","organizations_url":"https://api.github.com/users/joshcooper/orgs","repos_url":"https://api.github.com/users/joshcooper/repos","events_url":"https://api.github.com/users/joshcooper/events{/privacy}","received_events_url":"https://api.github.com/users/joshcooper/received_events","type":"User","site_admin":false},"body":"The result can be viewed at https://jira1-test.ops.puppetlabs.net/browse/PA-121\r\n\r\nPreviously some of the tickets contains both PM and DEV tasks. This\r\ncommit breaks those out so they can be assigned separately. In addition\r\nmakes the following changes:\r\n\r\n* Notify everyone at the start of the release\r\n\r\n* If we skip a z release, make sure any tickets with that fixVersion\r\n  are reassigned accordingly and the version is closed in Jira\r\n\r\n* Add cpp-pcp-client to the list of components to reconcile commits\r\n\r\n* Clarify that git versions use the tag (4.1.0), whereas Jira\r\n  fixVersions use the project name and version (PUP 4.1.0)\r\n\r\n* Escape `{GPG key}` so it renders correctly\r\n\r\n* Kick off manual pipeline after tagging puppet-agent\r\n\r\n* bundle install & exec when executing gem smoke test\r\n\r\n* Disable PE autopromotion when shipping\r\n\r\n* Also notify dev@puppetlabs.com with an announcement\r\n\r\n* Merge stable to master after the release, resolving conflicts as\r\n  described in the README\r\n\r\n* Assign go/no-go, reconcile commits, and closing resolved tickets to PM\r\n\r\n* Generate JQL-based `fixed in` and `introduced in` queries for each component","created_at":"2015-11-24T23:31:49Z","updated_at":"2015-12-01T19:31:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39e86b1f23aea06a83ea43126c9ed4c1f89012b4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/packaging/pulls/474/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/packaging/pulls/474/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/packaging/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/packaging/issues/474/comments","statuses_url":"https://api.github.com/repos/puppetlabs/packaging/statuses/5fc6690981b96d2ba739cfea0c95a78c4038fdeb","head":{"label":"joshcooper:ticket/master/RE-6007-update-puppet-agent-task","ref":"ticket/master/RE-6007-update-puppet-agent-task","sha":"5fc6690981b96d2ba739cfea0c95a78c4038fdeb","user":{"login":"joshcooper","id":737664,"avatar_url":"https://avatars.githubusercontent.com/u/737664?v=3","gravatar_id":"","url":"https://api.github.com/users/joshcooper","html_url":"https://github.com/joshcooper","followers_url":"https://api.github.com/users/joshcooper/followers","following_url":"https://api.github.com/users/joshcooper/following{/other_user}","gists_url":"https://api.github.com/users/joshcooper/gists{/gist_id}","starred_url":"https://api.github.com/users/joshcooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshcooper/subscriptions","organizations_url":"https://api.github.com/users/joshcooper/orgs","repos_url":"https://api.github.com/users/joshcooper/repos","events_url":"https://api.github.com/users/joshcooper/events{/privacy}","received_events_url":"https://api.github.com/users/joshcooper/received_events","type":"User","site_admin":false},"repo":{"id":15181582,"name":"packaging","full_name":"joshcooper/packaging","owner":{"login":"joshcooper","id":737664,"avatar_url":"https://avatars.githubusercontent.com/u/737664?v=3","gravatar_id":"","url":"https://api.github.com/users/joshcooper","html_url":"https://github.com/joshcooper","followers_url":"https://api.github.com/users/joshcooper/followers","following_url":"https://api.github.com/users/joshcooper/following{/other_user}","gists_url":"https://api.github.com/users/joshcooper/gists{/gist_id}","starred_url":"https://api.github.com/users/joshcooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshcooper/subscriptions","organizations_url":"https://api.github.com/users/joshcooper/orgs","repos_url":"https://api.github.com/users/joshcooper/repos","events_url":"https://api.github.com/users/joshcooper/events{/privacy}","received_events_url":"https://api.github.com/users/joshcooper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joshcooper/packaging","description":"","fork":true,"url":"https://api.github.com/repos/joshcooper/packaging","forks_url":"https://api.github.com/repos/joshcooper/packaging/forks","keys_url":"https://api.github.com/repos/joshcooper/packaging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joshcooper/packaging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joshcooper/packaging/teams","hooks_url":"https://api.github.com/repos/joshcooper/packaging/hooks","issue_events_url":"https://api.github.com/repos/joshcooper/packaging/issues/events{/number}","events_url":"https://api.github.com/repos/joshcooper/packaging/events","assignees_url":"https://api.github.com/repos/joshcooper/packaging/assignees{/user}","branches_url":"https://api.github.com/repos/joshcooper/packaging/branches{/branch}","tags_url":"https://api.github.com/repos/joshcooper/packaging/tags","blobs_url":"https://api.github.com/repos/joshcooper/packaging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joshcooper/packaging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joshcooper/packaging/git/refs{/sha}","trees_url":"https://api.github.com/repos/joshcooper/packaging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joshcooper/packaging/statuses/{sha}","languages_url":"https://api.github.com/repos/joshcooper/packaging/languages","stargazers_url":"https://api.github.com/repos/joshcooper/packaging/stargazers","contributors_url":"https://api.github.com/repos/joshcooper/packaging/contributors","subscribers_url":"https://api.github.com/repos/joshcooper/packaging/subscribers","subscription_url":"https://api.github.com/repos/joshcooper/packaging/subscription","commits_url":"https://api.github.com/repos/joshcooper/packaging/commits{/sha}","git_commits_url":"https://api.github.com/repos/joshcooper/packaging/git/commits{/sha}","comments_url":"https://api.github.com/repos/joshcooper/packaging/comments{/number}","issue_comment_url":"https://api.github.com/repos/joshcooper/packaging/issues/comments{/number}","contents_url":"https://api.github.com/repos/joshcooper/packaging/contents/{+path}","compare_url":"https://api.github.com/repos/joshcooper/packaging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joshcooper/packaging/merges","archive_url":"https://api.github.com/repos/joshcooper/packaging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joshcooper/packaging/downloads","issues_url":"https://api.github.com/repos/joshcooper/packaging/issues{/number}","pulls_url":"https://api.github.com/repos/joshcooper/packaging/pulls{/number}","milestones_url":"https://api.github.com/repos/joshcooper/packaging/milestones{/number}","notifications_url":"https://api.github.com/repos/joshcooper/packaging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joshcooper/packaging/labels{/name}","releases_url":"https://api.github.com/repos/joshcooper/packaging/releases{/id}","created_at":"2013-12-14T07:04:52Z","updated_at":"2014-06-20T00:58:37Z","pushed_at":"2015-12-01T19:29:28Z","git_url":"git://github.com/joshcooper/packaging.git","ssh_url":"git@github.com:joshcooper/packaging.git","clone_url":"https://github.com/joshcooper/packaging.git","svn_url":"https://github.com/joshcooper/packaging","homepage":null,"size":1701,"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":"a68b33f913411c7ebd14f6a4d1f6fcd5a4a93d92","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":5209001,"name":"packaging","full_name":"puppetlabs/packaging","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/packaging","description":"","fork":false,"url":"https://api.github.com/repos/puppetlabs/packaging","forks_url":"https://api.github.com/repos/puppetlabs/packaging/forks","keys_url":"https://api.github.com/repos/puppetlabs/packaging/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/packaging/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/packaging/teams","hooks_url":"https://api.github.com/repos/puppetlabs/packaging/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/packaging/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/packaging/events","assignees_url":"https://api.github.com/repos/puppetlabs/packaging/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/packaging/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/packaging/tags","blobs_url":"https://api.github.com/repos/puppetlabs/packaging/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/packaging/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/packaging/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/packaging/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/packaging/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/packaging/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/packaging/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/packaging/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/packaging/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/packaging/subscription","commits_url":"https://api.github.com/repos/puppetlabs/packaging/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/packaging/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/packaging/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/packaging/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/packaging/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/packaging/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/packaging/merges","archive_url":"https://api.github.com/repos/puppetlabs/packaging/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/packaging/downloads","issues_url":"https://api.github.com/repos/puppetlabs/packaging/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/packaging/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/packaging/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/packaging/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/packaging/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/packaging/releases{/id}","created_at":"2012-07-27T20:18:19Z","updated_at":"2015-05-18T22:33:47Z","pushed_at":"2015-12-01T19:29:29Z","git_url":"git://github.com/puppetlabs/packaging.git","ssh_url":"git@github.com:puppetlabs/packaging.git","clone_url":"https://github.com/puppetlabs/packaging.git","svn_url":"https://github.com/puppetlabs/packaging","homepage":null,"size":1902,"stargazers_count":27,"watchers_count":27,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":50,"mirror_url":null,"open_issues_count":2,"forks":50,"open_issues":2,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/packaging/pulls/474"},"html":{"href":"https://github.com/puppetlabs/packaging/pull/474"},"issue":{"href":"https://api.github.com/repos/puppetlabs/packaging/issues/474"},"comments":{"href":"https://api.github.com/repos/puppetlabs/packaging/issues/474/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/packaging/pulls/474/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/packaging/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/packaging/pulls/474/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/packaging/statuses/5fc6690981b96d2ba739cfea0c95a78c4038fdeb"}}}}