payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Leonis0813/subra/pulls/comments/321297425","pull_request_review_id":284303099,"id":321297425,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyMTI5NzQyNQ==","diff_hunk":"@@ -1,26 +1,31 @@\n-define :pyenv_package, package: nil, virtualenv: nil, version: nil do\n+define :pyenv_package, package: nil, virtualenv: nil, version: nil, option: nil do\n   package = params[:package] || params[:name]\n   virtualenv = params[:virtualenv]\n   version = params[:version]\n+  option = params[:option]\n \n   activate_command = [\n     'eval \"$(pyenv init -)\"',\n     'eval \"$(pyenv virtualenv-init -)\"',\n     \"pyenv activate #{virtualenv}\",\n   ].join(' && ')\n \n-  execute [activate_command, \"pip install #{package}\"].join(' && ') do\n+  execute [activate_command, \"pip install #{option} #{package}\"].join(' && ') do\n     environment 'PYENV_ROOT' => node[:pyenv][:root],\n                 'PATH' => [\n                   \"#{node[:pyenv][:root]}/versions/#{version}/bin\",\n                   \"#{node[:pyenv][:root]}/bin\",\n                   '/usr/bin',\n                   '/bin',\n                 ].join(':')\n-    not_if [\n-      [activate_command, 'pip list'].join(' && '),\n-      'cut -d \" \" -f 1',\n-      \"grep -i #{package.split('==').first}\",\n-    ].join(' | ')\n+\n+    unless option and option.include?('--upgrade')","path":"site-cookbooks/pyenv/definitions/pyenv_package.rb","position":29,"original_position":29,"commit_id":"69f413a2f172f8c1c0c71213abe33421de94f2ac","original_commit_id":"69f413a2f172f8c1c0c71213abe33421de94f2ac","user":{"login":"Leonis0813","id":10487152,"node_id":"MDQ6VXNlcjEwNDg3MTUy","avatar_url":"https://avatars3.githubusercontent.com/u/10487152?v=4","gravatar_id":"","url":"https://api.github.com/users/Leonis0813","html_url":"https://github.com/Leonis0813","followers_url":"https://api.github.com/users/Leonis0813/followers","following_url":"https://api.github.com/users/Leonis0813/following{/other_user}","gists_url":"https://api.github.com/users/Leonis0813/gists{/gist_id}","starred_url":"https://api.github.com/users/Leonis0813/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leonis0813/subscriptions","organizations_url":"https://api.github.com/users/Leonis0813/orgs","repos_url":"https://api.github.com/users/Leonis0813/repos","events_url":"https://api.github.com/users/Leonis0813/events{/privacy}","received_events_url":"https://api.github.com/users/Leonis0813/received_events","type":"User","site_admin":false},"body":"Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.","created_at":"2019-09-05T14:27:51Z","updated_at":"2019-09-05T14:27:52Z","html_url":"https://github.com/Leonis0813/subra/pull/221#discussion_r321297425","pull_request_url":"https://api.github.com/repos/Leonis0813/subra/pulls/221","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Leonis0813/subra/pulls/comments/321297425"},"html":{"href":"https://github.com/Leonis0813/subra/pull/221#discussion_r321297425"},"pull_request":{"href":"https://api.github.com/repos/Leonis0813/subra/pulls/221"}}},"pull_request":{"url":"https://api.github.com/repos/Leonis0813/subra/pulls/221","id":312998025,"node_id":"MDExOlB1bGxSZXF1ZXN0MzEyOTk4MDI1","html_url":"https://github.com/Leonis0813/subra/pull/221","diff_url":"https://github.com/Leonis0813/subra/pull/221.diff","patch_url":"https://github.com/Leonis0813/subra/pull/221.patch","issue_url":"https://api.github.com/repos/Leonis0813/subra/issues/221","number":221,"state":"open","locked":false,"title":"Centos7","user":{"login":"Leonis0813","id":10487152,"node_id":"MDQ6VXNlcjEwNDg3MTUy","avatar_url":"https://avatars3.githubusercontent.com/u/10487152?v=4","gravatar_id":"","url":"https://api.github.com/users/Leonis0813","html_url":"https://github.com/Leonis0813","followers_url":"https://api.github.com/users/Leonis0813/followers","following_url":"https://api.github.com/users/Leonis0813/following{/other_user}","gists_url":"https://api.github.com/users/Leonis0813/gists{/gist_id}","starred_url":"https://api.github.com/users/Leonis0813/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leonis0813/subscriptions","organizations_url":"https://api.github.com/users/Leonis0813/orgs","repos_url":"https://api.github.com/users/Leonis0813/repos","events_url":"https://api.github.com/users/Leonis0813/events{/privacy}","received_events_url":"https://api.github.com/users/Leonis0813/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-09-01T03:28:32Z","updated_at":"2019-09-05T14:27:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3f6f6023a0d7d36821770839a0ce9ede584fa67","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Leonis0813/subra/pulls/221/commits","review_comments_url":"https://api.github.com/repos/Leonis0813/subra/pulls/221/comments","review_comment_url":"https://api.github.com/repos/Leonis0813/subra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Leonis0813/subra/issues/221/comments","statuses_url":"https://api.github.com/repos/Leonis0813/subra/statuses/69f413a2f172f8c1c0c71213abe33421de94f2ac","head":{"label":"Leonis0813:centos7","ref":"centos7","sha":"69f413a2f172f8c1c0c71213abe33421de94f2ac","user":{"login":"Leonis0813","id":10487152,"node_id":"MDQ6VXNlcjEwNDg3MTUy","avatar_url":"https://avatars3.githubusercontent.com/u/10487152?v=4","gravatar_id":"","url":"https://api.github.com/users/Leonis0813","html_url":"https://github.com/Leonis0813","followers_url":"https://api.github.com/users/Leonis0813/followers","following_url":"https://api.github.com/users/Leonis0813/following{/other_user}","gists_url":"https://api.github.com/users/Leonis0813/gists{/gist_id}","starred_url":"https://api.github.com/users/Leonis0813/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leonis0813/subscriptions","organizations_url":"https://api.github.com/users/Leonis0813/orgs","repos_url":"https://api.github.com/users/Leonis0813/repos","events_url":"https://api.github.com/users/Leonis0813/events{/privacy}","received_events_url":"https://api.github.com/users/Leonis0813/received_events","type":"User","site_admin":false},"repo":{"id":64017850,"node_id":"MDEwOlJlcG9zaXRvcnk2NDAxNzg1MA==","name":"subra","full_name":"Leonis0813/subra","private":false,"owner":{"login":"Leonis0813","id":10487152,"node_id":"MDQ6VXNlcjEwNDg3MTUy","avatar_url":"https://avatars3.githubusercontent.com/u/10487152?v=4","gravatar_id":"","url":"https://api.github.com/users/Leonis0813","html_url":"https://github.com/Leonis0813","followers_url":"https://api.github.com/users/Leonis0813/followers","following_url":"https://api.github.com/users/Leonis0813/following{/other_user}","gists_url":"https://api.github.com/users/Leonis0813/gists{/gist_id}","starred_url":"https://api.github.com/users/Leonis0813/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leonis0813/subscriptions","organizations_url":"https://api.github.com/users/Leonis0813/orgs","repos_url":"https://api.github.com/users/Leonis0813/repos","events_url":"https://api.github.com/users/Leonis0813/events{/privacy}","received_events_url":"https://api.github.com/users/Leonis0813/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Leonis0813/subra","description":"jenkins job scripts","fork":false,"url":"https://api.github.com/repos/Leonis0813/subra","forks_url":"https://api.github.com/repos/Leonis0813/subra/forks","keys_url":"https://api.github.com/repos/Leonis0813/subra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Leonis0813/subra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Leonis0813/subra/teams","hooks_url":"https://api.github.com/repos/Leonis0813/subra/hooks","issue_events_url":"https://api.github.com/repos/Leonis0813/subra/issues/events{/number}","events_url":"https://api.github.com/repos/Leonis0813/subra/events","assignees_url":"https://api.github.com/repos/Leonis0813/subra/assignees{/user}","branches_url":"https://api.github.com/repos/Leonis0813/subra/branches{/branch}","tags_url":"https://api.github.com/repos/Leonis0813/subra/tags","blobs_url":"https://api.github.com/repos/Leonis0813/subra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Leonis0813/subra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Leonis0813/subra/git/refs{/sha}","trees_url":"https://api.github.com/repos/Leonis0813/subra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Leonis0813/subra/statuses/{sha}","languages_url":"https://api.github.com/repos/Leonis0813/subra/languages","stargazers_url":"https://api.github.com/repos/Leonis0813/subra/stargazers","contributors_url":"https://api.github.com/repos/Leonis0813/subra/contributors","subscribers_url":"https://api.github.com/repos/Leonis0813/subra/subscribers","subscription_url":"https://api.github.com/repos/Leonis0813/subra/subscription","commits_url":"https://api.github.com/repos/Leonis0813/subra/commits{/sha}","git_commits_url":"https://api.github.com/repos/Leonis0813/subra/git/commits{/sha}","comments_url":"https://api.github.com/repos/Leonis0813/subra/comments{/number}","issue_comment_url":"https://api.github.com/repos/Leonis0813/subra/issues/comments{/number}","contents_url":"https://api.github.com/repos/Leonis0813/subra/contents/{+path}","compare_url":"https://api.github.com/repos/Leonis0813/subra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Leonis0813/subra/merges","archive_url":"https://api.github.com/repos/Leonis0813/subra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Leonis0813/subra/downloads","issues_url":"https://api.github.com/repos/Leonis0813/subra/issues{/number}","pulls_url":"https://api.github.com/repos/Leonis0813/subra/pulls{/number}","milestones_url":"https://api.github.com/repos/Leonis0813/subra/milestones{/number}","notifications_url":"https://api.github.com/repos/Leonis0813/subra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Leonis0813/subra/labels{/name}","releases_url":"https://api.github.com/repos/Leonis0813/subra/releases{/id}","deployments_url":"https://api.github.com/repos/Leonis0813/subra/deployments","created_at":"2016-07-23T13:40:37Z","updated_at":"2019-08-28T11:50:52Z","pushed_at":"2019-09-05T14:27:09Z","git_url":"git://github.com/Leonis0813/subra.git","ssh_url":"git@github.com:Leonis0813/subra.git","clone_url":"https://github.com/Leonis0813/subra.git","svn_url":"https://github.com/Leonis0813/subra","homepage":null,"size":448,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Leonis0813:master","ref":"master","sha":"f2d8f535dd6f087bcd692e713ded157eac3465d7","user":{"login":"Leonis0813","id":10487152,"node_id":"MDQ6VXNlcjEwNDg3MTUy","avatar_url":"https://avatars3.githubusercontent.com/u/10487152?v=4","gravatar_id":"","url":"https://api.github.com/users/Leonis0813","html_url":"https://github.com/Leonis0813","followers_url":"https://api.github.com/users/Leonis0813/followers","following_url":"https://api.github.com/users/Leonis0813/following{/other_user}","gists_url":"https://api.github.com/users/Leonis0813/gists{/gist_id}","starred_url":"https://api.github.com/users/Leonis0813/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leonis0813/subscriptions","organizations_url":"https://api.github.com/users/Leonis0813/orgs","repos_url":"https://api.github.com/users/Leonis0813/repos","events_url":"https://api.github.com/users/Leonis0813/events{/privacy}","received_events_url":"https://api.github.com/users/Leonis0813/received_events","type":"User","site_admin":false},"repo":{"id":64017850,"node_id":"MDEwOlJlcG9zaXRvcnk2NDAxNzg1MA==","name":"subra","full_name":"Leonis0813/subra","private":false,"owner":{"login":"Leonis0813","id":10487152,"node_id":"MDQ6VXNlcjEwNDg3MTUy","avatar_url":"https://avatars3.githubusercontent.com/u/10487152?v=4","gravatar_id":"","url":"https://api.github.com/users/Leonis0813","html_url":"https://github.com/Leonis0813","followers_url":"https://api.github.com/users/Leonis0813/followers","following_url":"https://api.github.com/users/Leonis0813/following{/other_user}","gists_url":"https://api.github.com/users/Leonis0813/gists{/gist_id}","starred_url":"https://api.github.com/users/Leonis0813/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Leonis0813/subscriptions","organizations_url":"https://api.github.com/users/Leonis0813/orgs","repos_url":"https://api.github.com/users/Leonis0813/repos","events_url":"https://api.github.com/users/Leonis0813/events{/privacy}","received_events_url":"https://api.github.com/users/Leonis0813/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Leonis0813/subra","description":"jenkins job scripts","fork":false,"url":"https://api.github.com/repos/Leonis0813/subra","forks_url":"https://api.github.com/repos/Leonis0813/subra/forks","keys_url":"https://api.github.com/repos/Leonis0813/subra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Leonis0813/subra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Leonis0813/subra/teams","hooks_url":"https://api.github.com/repos/Leonis0813/subra/hooks","issue_events_url":"https://api.github.com/repos/Leonis0813/subra/issues/events{/number}","events_url":"https://api.github.com/repos/Leonis0813/subra/events","assignees_url":"https://api.github.com/repos/Leonis0813/subra/assignees{/user}","branches_url":"https://api.github.com/repos/Leonis0813/subra/branches{/branch}","tags_url":"https://api.github.com/repos/Leonis0813/subra/tags","blobs_url":"https://api.github.com/repos/Leonis0813/subra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Leonis0813/subra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Leonis0813/subra/git/refs{/sha}","trees_url":"https://api.github.com/repos/Leonis0813/subra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Leonis0813/subra/statuses/{sha}","languages_url":"https://api.github.com/repos/Leonis0813/subra/languages","stargazers_url":"https://api.github.com/repos/Leonis0813/subra/stargazers","contributors_url":"https://api.github.com/repos/Leonis0813/subra/contributors","subscribers_url":"https://api.github.com/repos/Leonis0813/subra/subscribers","subscription_url":"https://api.github.com/repos/Leonis0813/subra/subscription","commits_url":"https://api.github.com/repos/Leonis0813/subra/commits{/sha}","git_commits_url":"https://api.github.com/repos/Leonis0813/subra/git/commits{/sha}","comments_url":"https://api.github.com/repos/Leonis0813/subra/comments{/number}","issue_comment_url":"https://api.github.com/repos/Leonis0813/subra/issues/comments{/number}","contents_url":"https://api.github.com/repos/Leonis0813/subra/contents/{+path}","compare_url":"https://api.github.com/repos/Leonis0813/subra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Leonis0813/subra/merges","archive_url":"https://api.github.com/repos/Leonis0813/subra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Leonis0813/subra/downloads","issues_url":"https://api.github.com/repos/Leonis0813/subra/issues{/number}","pulls_url":"https://api.github.com/repos/Leonis0813/subra/pulls{/number}","milestones_url":"https://api.github.com/repos/Leonis0813/subra/milestones{/number}","notifications_url":"https://api.github.com/repos/Leonis0813/subra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Leonis0813/subra/labels{/name}","releases_url":"https://api.github.com/repos/Leonis0813/subra/releases{/id}","deployments_url":"https://api.github.com/repos/Leonis0813/subra/deployments","created_at":"2016-07-23T13:40:37Z","updated_at":"2019-08-28T11:50:52Z","pushed_at":"2019-09-05T14:27:09Z","git_url":"git://github.com/Leonis0813/subra.git","ssh_url":"git@github.com:Leonis0813/subra.git","clone_url":"https://github.com/Leonis0813/subra.git","svn_url":"https://github.com/Leonis0813/subra","homepage":null,"size":448,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Leonis0813/subra/pulls/221"},"html":{"href":"https://github.com/Leonis0813/subra/pull/221"},"issue":{"href":"https://api.github.com/repos/Leonis0813/subra/issues/221"},"comments":{"href":"https://api.github.com/repos/Leonis0813/subra/issues/221/comments"},"review_comments":{"href":"https://api.github.com/repos/Leonis0813/subra/pulls/221/comments"},"review_comment":{"href":"https://api.github.com/repos/Leonis0813/subra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Leonis0813/subra/pulls/221/commits"},"statuses":{"href":"https://api.github.com/repos/Leonis0813/subra/statuses/69f413a2f172f8c1c0c71213abe33421de94f2ac"}},"author_association":"OWNER"}}
other: {"actor":{"display_login":"Leonis0813"}}