{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/comments/67202278","id":67202278,"diff_hunk":"@@ -225,12 +242,12 @@ public static EnvVars getPollEnvironment(AbstractProject p, FilePath ws, Launche\n                     }\n                 }\n             } else {\n-                env = new EnvVars(System.getenv());\n+                env = p.getEnvironment(workspaceToNode(ws), TaskListener.NULL);\n             }\n \n             p.getScm().buildEnvVars(b,env);\n         } else {\n-            env = new EnvVars(System.getenv());\n+            env = p.getEnvironment(workspaceToNode(ws), listener);","path":"src/main/java/hudson/plugins/git/util/GitUtils.java","position":45,"original_position":45,"commit_id":"b44a0011f63bf2a526c4b59418ffe861d0f13c3e","original_commit_id":"b44a0011f63bf2a526c4b59418ffe861d0f13c3e","user":{"login":"svanoort","id":5400948,"avatar_url":"https://avatars.githubusercontent.com/u/5400948?v=3","gravatar_id":"","url":"https://api.github.com/users/svanoort","html_url":"https://github.com/svanoort","followers_url":"https://api.github.com/users/svanoort/followers","following_url":"https://api.github.com/users/svanoort/following{/other_user}","gists_url":"https://api.github.com/users/svanoort/gists{/gist_id}","starred_url":"https://api.github.com/users/svanoort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svanoort/subscriptions","organizations_url":"https://api.github.com/users/svanoort/orgs","repos_url":"https://api.github.com/users/svanoort/repos","events_url":"https://api.github.com/users/svanoort/events{/privacy}","received_events_url":"https://api.github.com/users/svanoort/received_events","type":"User","site_admin":false},"body":"🐜 probably worth a try/catch and give the System.getEnv if it fails, since the workspace may be remote. ","created_at":"2016-06-15T17:01:52Z","updated_at":"2016-06-15T17:01:52Z","html_url":"https://github.com/jenkinsci/git-plugin/pull/415#discussion_r67202278","pull_request_url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/415","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/comments/67202278"},"html":{"href":"https://github.com/jenkinsci/git-plugin/pull/415#discussion_r67202278"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/415"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/415","id":73741107,"html_url":"https://github.com/jenkinsci/git-plugin/pull/415","diff_url":"https://github.com/jenkinsci/git-plugin/pull/415.diff","patch_url":"https://github.com/jenkinsci/git-plugin/pull/415.patch","issue_url":"https://api.github.com/repos/jenkinsci/git-plugin/issues/415","number":415,"state":"open","locked":false,"title":"Dont rely on System.getEnv()","user":{"login":"ndeloof","id":132757,"avatar_url":"https://avatars.githubusercontent.com/u/132757?v=3","gravatar_id":"","url":"https://api.github.com/users/ndeloof","html_url":"https://github.com/ndeloof","followers_url":"https://api.github.com/users/ndeloof/followers","following_url":"https://api.github.com/users/ndeloof/following{/other_user}","gists_url":"https://api.github.com/users/ndeloof/gists{/gist_id}","starred_url":"https://api.github.com/users/ndeloof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndeloof/subscriptions","organizations_url":"https://api.github.com/users/ndeloof/orgs","repos_url":"https://api.github.com/users/ndeloof/repos","events_url":"https://api.github.com/users/ndeloof/events{/privacy}","received_events_url":"https://api.github.com/users/ndeloof/received_events","type":"User","site_admin":false},"body":"use `project.getEnvironment()` to ensure all environment contributors get involved and can populate environment for polling or checking git URL\r\n","created_at":"2016-06-14T13:37:57Z","updated_at":"2016-06-15T17:01:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6b1092285cfb7716dd3cf9f0b1db96eb248ff6f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/415/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/415/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/git-plugin/issues/415/comments","statuses_url":"https://api.github.com/repos/jenkinsci/git-plugin/statuses/b44a0011f63bf2a526c4b59418ffe861d0f13c3e","head":{"label":"ndeloof:master","ref":"master","sha":"b44a0011f63bf2a526c4b59418ffe861d0f13c3e","user":{"login":"ndeloof","id":132757,"avatar_url":"https://avatars.githubusercontent.com/u/132757?v=3","gravatar_id":"","url":"https://api.github.com/users/ndeloof","html_url":"https://github.com/ndeloof","followers_url":"https://api.github.com/users/ndeloof/followers","following_url":"https://api.github.com/users/ndeloof/following{/other_user}","gists_url":"https://api.github.com/users/ndeloof/gists{/gist_id}","starred_url":"https://api.github.com/users/ndeloof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndeloof/subscriptions","organizations_url":"https://api.github.com/users/ndeloof/orgs","repos_url":"https://api.github.com/users/ndeloof/repos","events_url":"https://api.github.com/users/ndeloof/events{/privacy}","received_events_url":"https://api.github.com/users/ndeloof/received_events","type":"User","site_admin":false},"repo":{"id":32762148,"name":"git-plugin","full_name":"ndeloof/git-plugin","owner":{"login":"ndeloof","id":132757,"avatar_url":"https://avatars.githubusercontent.com/u/132757?v=3","gravatar_id":"","url":"https://api.github.com/users/ndeloof","html_url":"https://github.com/ndeloof","followers_url":"https://api.github.com/users/ndeloof/followers","following_url":"https://api.github.com/users/ndeloof/following{/other_user}","gists_url":"https://api.github.com/users/ndeloof/gists{/gist_id}","starred_url":"https://api.github.com/users/ndeloof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndeloof/subscriptions","organizations_url":"https://api.github.com/users/ndeloof/orgs","repos_url":"https://api.github.com/users/ndeloof/repos","events_url":"https://api.github.com/users/ndeloof/events{/privacy}","received_events_url":"https://api.github.com/users/ndeloof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ndeloof/git-plugin","description":"Git plugin for Jenkins","fork":true,"url":"https://api.github.com/repos/ndeloof/git-plugin","forks_url":"https://api.github.com/repos/ndeloof/git-plugin/forks","keys_url":"https://api.github.com/repos/ndeloof/git-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ndeloof/git-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ndeloof/git-plugin/teams","hooks_url":"https://api.github.com/repos/ndeloof/git-plugin/hooks","issue_events_url":"https://api.github.com/repos/ndeloof/git-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/ndeloof/git-plugin/events","assignees_url":"https://api.github.com/repos/ndeloof/git-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/ndeloof/git-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/ndeloof/git-plugin/tags","blobs_url":"https://api.github.com/repos/ndeloof/git-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ndeloof/git-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ndeloof/git-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/ndeloof/git-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ndeloof/git-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/ndeloof/git-plugin/languages","stargazers_url":"https://api.github.com/repos/ndeloof/git-plugin/stargazers","contributors_url":"https://api.github.com/repos/ndeloof/git-plugin/contributors","subscribers_url":"https://api.github.com/repos/ndeloof/git-plugin/subscribers","subscription_url":"https://api.github.com/repos/ndeloof/git-plugin/subscription","commits_url":"https://api.github.com/repos/ndeloof/git-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/ndeloof/git-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/ndeloof/git-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/ndeloof/git-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/ndeloof/git-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/ndeloof/git-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ndeloof/git-plugin/merges","archive_url":"https://api.github.com/repos/ndeloof/git-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ndeloof/git-plugin/downloads","issues_url":"https://api.github.com/repos/ndeloof/git-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/ndeloof/git-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/ndeloof/git-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/ndeloof/git-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ndeloof/git-plugin/labels{/name}","releases_url":"https://api.github.com/repos/ndeloof/git-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/ndeloof/git-plugin/deployments","created_at":"2015-03-23T22:19:27Z","updated_at":"2016-06-14T13:38:08Z","pushed_at":"2016-06-14T13:37:50Z","git_url":"git://github.com/ndeloof/git-plugin.git","ssh_url":"git@github.com:ndeloof/git-plugin.git","clone_url":"https://github.com/ndeloof/git-plugin.git","svn_url":"https://github.com/ndeloof/git-plugin","homepage":"http://wiki.jenkins-ci.org/display/JENKINS/Git Plugin","size":4407,"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":"jenkinsci:master","ref":"master","sha":"7e9edc7e448ed29e287171046ba2c859b41a1cd8","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":612587,"name":"git-plugin","full_name":"jenkinsci/git-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/git-plugin","description":"Git plugin for Jenkins","fork":true,"url":"https://api.github.com/repos/jenkinsci/git-plugin","forks_url":"https://api.github.com/repos/jenkinsci/git-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/git-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/git-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/git-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/git-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/git-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/git-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/git-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/git-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/git-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/git-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/git-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/git-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/git-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/git-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/git-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/git-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/git-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/git-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/git-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/git-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/git-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/git-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/git-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/git-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/git-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/git-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/git-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/git-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/git-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/git-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/git-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/git-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/git-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/git-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/git-plugin/deployments","created_at":"2010-04-15T21:07:21Z","updated_at":"2016-06-11T14:40:46Z","pushed_at":"2016-06-15T16:53:11Z","git_url":"git://github.com/jenkinsci/git-plugin.git","ssh_url":"git@github.com:jenkinsci/git-plugin.git","clone_url":"https://github.com/jenkinsci/git-plugin.git","svn_url":"https://github.com/jenkinsci/git-plugin","homepage":"http://wiki.jenkins-ci.org/display/JENKINS/Git Plugin","size":7556,"stargazers_count":389,"watchers_count":389,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":548,"mirror_url":null,"open_issues_count":63,"forks":548,"open_issues":63,"watchers":389,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/415"},"html":{"href":"https://github.com/jenkinsci/git-plugin/pull/415"},"issue":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/issues/415"},"comments":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/issues/415/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/415/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/pulls/415/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/git-plugin/statuses/b44a0011f63bf2a526c4b59418ffe861d0f13c3e"}}}}
{"actor":{"display_login":"svanoort"}}