{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/build/pulls/comments/180853078","pull_request_review_id":111344883,"id":180853078,"diff_hunk":"@@ -0,0 +1,94 @@\n+def canBuild(nodeMajorVersion, builderLabel, buildType) {\n+\n+  // Linux\n+  if (builderLabel.indexOf('centos5') == 0 && nodeMajorVersion >= 8)\n+    return false\n+  if (buildType == 'release' && builderLabel.indexOf('centos6') == 0 && nodeMajorVersion < 8)\n+    return false\n+  if (builderLabel =~ /centos[67]-(arm)?(64|32)-gcc48/ && nodeMajorVersion >= 10)\n+    return false\n+  if (builderLabel =~ /centos[67]-(arm)?(64|32)-gcc6/ && nodeMajorVersion < 10)\n+    return false\n+  if (builderLabel.indexOf('ubuntu1804') == 0 && nodeMajorVersion < 10) // probably temporary\n+    return false\n+  if (builderLabel.indexOf('ubuntu1204') == 0 && nodeMajorVersion >= 10)\n+    return false","path":"jenkins/scripts/VersionSelectorScript.groovy","position":15,"original_position":15,"commit_id":"7b8cb709632dbf128afee4a71bd7e5c23502e2f2","original_commit_id":"7b8cb709632dbf128afee4a71bd7e5c23502e2f2","user":{"login":"gibfahn","id":15943089,"avatar_url":"https://avatars0.githubusercontent.com/u/15943089?v=4","gravatar_id":"","url":"https://api.github.com/users/gibfahn","html_url":"https://github.com/gibfahn","followers_url":"https://api.github.com/users/gibfahn/followers","following_url":"https://api.github.com/users/gibfahn/following{/other_user}","gists_url":"https://api.github.com/users/gibfahn/gists{/gist_id}","starred_url":"https://api.github.com/users/gibfahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gibfahn/subscriptions","organizations_url":"https://api.github.com/users/gibfahn/orgs","repos_url":"https://api.github.com/users/gibfahn/repos","events_url":"https://api.github.com/users/gibfahn/events{/privacy}","received_events_url":"https://api.github.com/users/gibfahn/received_events","type":"User","site_admin":false},"body":"I'm not _sure_ about this, so just a suggestion, but it might be easier to parse if we grouped these by Node version as well as arch, i.e.:\r\n\r\n```groovy\r\n  if (builderLabel =~ /centos[67]-(arm)?(64|32)-gcc48/ && nodeMajorVersion >= 10)\r\n    return false\r\n  if (builderLabel =~ /centos[67]-(arm)?(64|32)-gcc6/ && nodeMajorVersion < 10)\r\n    return false\r\n  if (builderLabel.indexOf('ubuntu1804') == 0 && nodeMajorVersion < 10) // probably temporary\r\n    return false\r\n  if (builderLabel.indexOf('ubuntu1204') == 0 && nodeMajorVersion >= 10)\r\n    return false\r\n```\r\n\r\nto \r\n\r\n```groovy\r\nif (nodeMajorVersion >= 10) {\r\n  if (builderLabel =~ /centos[67]-(arm)?(64|32)-gcc48/)\r\n    return false\r\n  if (builderLabel =~ /centos[67]-(arm)?(64|32)-gcc6/)\r\n    return false\r\n  if (builderLabel.startsWith('ubuntu1804')) // probably temporary\r\n    return false\r\n  if (builderLabel.startsWith('ubuntu1204'))\r\n    return false\r\n}\r\n```\r\n\r\n","created_at":"2018-04-11T18:25:30Z","updated_at":"2018-04-11T19:00:20Z","html_url":"https://github.com/nodejs/build/pull/1217#discussion_r180853078","pull_request_url":"https://api.github.com/repos/nodejs/build/pulls/1217","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/nodejs/build/pulls/comments/180853078"},"html":{"href":"https://github.com/nodejs/build/pull/1217#discussion_r180853078"},"pull_request":{"href":"https://api.github.com/repos/nodejs/build/pulls/1217"}}},"pull_request":{"url":"https://api.github.com/repos/nodejs/build/pulls/1217","id":179851737,"html_url":"https://github.com/nodejs/build/pull/1217","diff_url":"https://github.com/nodejs/build/pull/1217.diff","patch_url":"https://github.com/nodejs/build/pull/1217.patch","issue_url":"https://api.github.com/repos/nodejs/build/issues/1217","number":1217,"state":"open","locked":false,"title":"added VersionSelectorScript.groovy to select builders for Node version","user":{"login":"rvagg","id":495647,"avatar_url":"https://avatars2.githubusercontent.com/u/495647?v=4","gravatar_id":"","url":"https://api.github.com/users/rvagg","html_url":"https://github.com/rvagg","followers_url":"https://api.github.com/users/rvagg/followers","following_url":"https://api.github.com/users/rvagg/following{/other_user}","gists_url":"https://api.github.com/users/rvagg/gists{/gist_id}","starred_url":"https://api.github.com/users/rvagg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvagg/subscriptions","organizations_url":"https://api.github.com/users/rvagg/orgs","repos_url":"https://api.github.com/users/rvagg/repos","events_url":"https://api.github.com/users/rvagg/events{/privacy}","received_events_url":"https://api.github.com/users/rvagg/received_events","type":"User","site_admin":false},"body":"Following on from https://github.com/nodejs/build/issues/1153\r\n\r\nnode-version-jenkins-plugin is now installed on ci.nodejs.org and is being used in node-test-commit-linux-arm, node-test-commit-linux-containered and node-test-commit-linux to select the right builders to run. So we have some ARM and containered specific options in here. The script also has a \"buildType\"  so that it can do slightly different things for release as for test (and other), e.g. centos6 shouldn't be used for Node 4 in release but it should be used for everything for test.","created_at":"2018-04-06T04:23:00Z","updated_at":"2018-04-11T19:00:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9f1ef57ac99a726b7da5e63731edb4df6826439","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/build/pulls/1217/commits","review_comments_url":"https://api.github.com/repos/nodejs/build/pulls/1217/comments","review_comment_url":"https://api.github.com/repos/nodejs/build/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/build/issues/1217/comments","statuses_url":"https://api.github.com/repos/nodejs/build/statuses/7b8cb709632dbf128afee4a71bd7e5c23502e2f2","head":{"label":"nodejs:rvagg/VersionSelectorScript.groovy","ref":"rvagg/VersionSelectorScript.groovy","sha":"7b8cb709632dbf128afee4a71bd7e5c23502e2f2","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":22736886,"name":"build","full_name":"nodejs/build","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/build","description":"Better build and test infra for Node.","fork":false,"url":"https://api.github.com/repos/nodejs/build","forks_url":"https://api.github.com/repos/nodejs/build/forks","keys_url":"https://api.github.com/repos/nodejs/build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/build/teams","hooks_url":"https://api.github.com/repos/nodejs/build/hooks","issue_events_url":"https://api.github.com/repos/nodejs/build/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/build/events","assignees_url":"https://api.github.com/repos/nodejs/build/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/build/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/build/tags","blobs_url":"https://api.github.com/repos/nodejs/build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/build/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/build/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/build/languages","stargazers_url":"https://api.github.com/repos/nodejs/build/stargazers","contributors_url":"https://api.github.com/repos/nodejs/build/contributors","subscribers_url":"https://api.github.com/repos/nodejs/build/subscribers","subscription_url":"https://api.github.com/repos/nodejs/build/subscription","commits_url":"https://api.github.com/repos/nodejs/build/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/build/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/build/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/build/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/build/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/build/merges","archive_url":"https://api.github.com/repos/nodejs/build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/build/downloads","issues_url":"https://api.github.com/repos/nodejs/build/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/build/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/build/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/build/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/build/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/build/deployments","created_at":"2014-08-07T21:20:06Z","updated_at":"2018-04-11T15:45:08Z","pushed_at":"2018-04-11T15:44:59Z","git_url":"git://github.com/nodejs/build.git","ssh_url":"git@github.com:nodejs/build.git","clone_url":"https://github.com/nodejs/build.git","svn_url":"https://github.com/nodejs/build","homepage":"","size":10488,"stargazers_count":161,"watchers_count":161,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"archived":false,"open_issues_count":221,"license":null,"forks":79,"open_issues":221,"watchers":161,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"42a0a7158911cf581da2dd546fec63a3cd5ecf94","user":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":22736886,"name":"build","full_name":"nodejs/build","owner":{"login":"nodejs","id":9950313,"avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nodejs/build","description":"Better build and test infra for Node.","fork":false,"url":"https://api.github.com/repos/nodejs/build","forks_url":"https://api.github.com/repos/nodejs/build/forks","keys_url":"https://api.github.com/repos/nodejs/build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/build/teams","hooks_url":"https://api.github.com/repos/nodejs/build/hooks","issue_events_url":"https://api.github.com/repos/nodejs/build/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/build/events","assignees_url":"https://api.github.com/repos/nodejs/build/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/build/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/build/tags","blobs_url":"https://api.github.com/repos/nodejs/build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/build/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/build/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/build/languages","stargazers_url":"https://api.github.com/repos/nodejs/build/stargazers","contributors_url":"https://api.github.com/repos/nodejs/build/contributors","subscribers_url":"https://api.github.com/repos/nodejs/build/subscribers","subscription_url":"https://api.github.com/repos/nodejs/build/subscription","commits_url":"https://api.github.com/repos/nodejs/build/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/build/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/build/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/build/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/build/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/build/merges","archive_url":"https://api.github.com/repos/nodejs/build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/build/downloads","issues_url":"https://api.github.com/repos/nodejs/build/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/build/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/build/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/build/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/build/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/build/deployments","created_at":"2014-08-07T21:20:06Z","updated_at":"2018-04-11T15:45:08Z","pushed_at":"2018-04-11T15:44:59Z","git_url":"git://github.com/nodejs/build.git","ssh_url":"git@github.com:nodejs/build.git","clone_url":"https://github.com/nodejs/build.git","svn_url":"https://github.com/nodejs/build","homepage":"","size":10488,"stargazers_count":161,"watchers_count":161,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"archived":false,"open_issues_count":221,"license":null,"forks":79,"open_issues":221,"watchers":161,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/build/pulls/1217"},"html":{"href":"https://github.com/nodejs/build/pull/1217"},"issue":{"href":"https://api.github.com/repos/nodejs/build/issues/1217"},"comments":{"href":"https://api.github.com/repos/nodejs/build/issues/1217/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/build/pulls/1217/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/build/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/build/pulls/1217/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/build/statuses/7b8cb709632dbf128afee4a71bd7e5c23502e2f2"}},"author_association":"OWNER"}}
{"actor":{"display_login":"gibfahn"}}