{"action":"created","comment":{"url":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/comments/240909642","pull_request_review_id":184046594,"id":240909642,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDkwOTY0Mg==","diff_hunk":"@@ -44,3 +51,21 @@ def applyDefaults(provided=[:], templateParams) {\n   setParam('RELEASE_VERSION') { Utils.shWithOutput(this, \"git rev-list --count HEAD\") }\n   return params\n }\n+\n+boolean isValidTemplate(parameters=[[:]]){\n+  def pass = true\n+  def mandatParamList = [\"RELEASE_VERSION\"]\n+  def templateParam = []\n+  //to convert complex hashmap in list to simple list of params.\n+  parameters.each {\n+    templateParam << it.name\n+  }\n+  //check if the mandatory params are present in template\n+  mandatParamList.each {","path":"vars/processTemplate.groovy","position":42,"original_position":42,"commit_id":"4949b087ee7a068be1627c4624240675cfab193e","original_commit_id":"4949b087ee7a068be1627c4624240675cfab193e","user":{"login":"piyush-garg","id":19270240,"node_id":"MDQ6VXNlcjE5MjcwMjQw","avatar_url":"https://avatars1.githubusercontent.com/u/19270240?v=4","gravatar_id":"","url":"https://api.github.com/users/piyush-garg","html_url":"https://github.com/piyush-garg","followers_url":"https://api.github.com/users/piyush-garg/followers","following_url":"https://api.github.com/users/piyush-garg/following{/other_user}","gists_url":"https://api.github.com/users/piyush-garg/gists{/gist_id}","starred_url":"https://api.github.com/users/piyush-garg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piyush-garg/subscriptions","organizations_url":"https://api.github.com/users/piyush-garg/orgs","repos_url":"https://api.github.com/users/piyush-garg/repos","events_url":"https://api.github.com/users/piyush-garg/events{/privacy}","received_events_url":"https://api.github.com/users/piyush-garg/received_events","type":"User","site_admin":false},"body":"we can get rid of `pass` variable.\r\n```\r\n  mandatParamList.each {\r\n    if(!templateParam.contains(it)){\r\n      echo \"Missing parameter : \" + it\r\n      return false\r\n    }\r\n  }\r\n  return true\r\n```\r\n\r\nAlso `mandatParamList` variable can be removed as only one mandatory Parameter","created_at":"2018-12-12T07:52:55Z","updated_at":"2018-12-12T07:52:55Z","html_url":"https://github.com/fabric8io/osio-pipeline/pull/86#discussion_r240909642","pull_request_url":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/86","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/comments/240909642"},"html":{"href":"https://github.com/fabric8io/osio-pipeline/pull/86#discussion_r240909642"},"pull_request":{"href":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/86","id":234891498,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0ODkxNDk4","html_url":"https://github.com/fabric8io/osio-pipeline/pull/86","diff_url":"https://github.com/fabric8io/osio-pipeline/pull/86.diff","patch_url":"https://github.com/fabric8io/osio-pipeline/pull/86.patch","issue_url":"https://api.github.com/repos/fabric8io/osio-pipeline/issues/86","number":86,"state":"open","locked":false,"title":"RELEASE_VERSION as mandatory parameter","user":{"login":"pradeepitm12","id":26105461,"node_id":"MDQ6VXNlcjI2MTA1NDYx","avatar_url":"https://avatars0.githubusercontent.com/u/26105461?v=4","gravatar_id":"","url":"https://api.github.com/users/pradeepitm12","html_url":"https://github.com/pradeepitm12","followers_url":"https://api.github.com/users/pradeepitm12/followers","following_url":"https://api.github.com/users/pradeepitm12/following{/other_user}","gists_url":"https://api.github.com/users/pradeepitm12/gists{/gist_id}","starred_url":"https://api.github.com/users/pradeepitm12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pradeepitm12/subscriptions","organizations_url":"https://api.github.com/users/pradeepitm12/orgs","repos_url":"https://api.github.com/users/pradeepitm12/repos","events_url":"https://api.github.com/users/pradeepitm12/events{/privacy}","received_events_url":"https://api.github.com/users/pradeepitm12/received_events","type":"User","site_admin":false},"body":"Fix RELEASE_VERSION parameter dependency (https://github.com/fabric8io/osio-pipeline/issues/64)\r\n    \r\n    Missing mandatory field check in template before processing.\r\n    \r\n    Resolve\r\n     - https://github.com/fabric8io/osio-pipeline/issues/64\r\n","created_at":"2018-11-30T07:05:40Z","updated_at":"2018-12-12T07:52:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06f5824fba790dfe4698c84b139e088369316011","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sthaha","id":3005132,"node_id":"MDQ6VXNlcjMwMDUxMzI=","avatar_url":"https://avatars0.githubusercontent.com/u/3005132?v=4","gravatar_id":"","url":"https://api.github.com/users/sthaha","html_url":"https://github.com/sthaha","followers_url":"https://api.github.com/users/sthaha/followers","following_url":"https://api.github.com/users/sthaha/following{/other_user}","gists_url":"https://api.github.com/users/sthaha/gists{/gist_id}","starred_url":"https://api.github.com/users/sthaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sthaha/subscriptions","organizations_url":"https://api.github.com/users/sthaha/orgs","repos_url":"https://api.github.com/users/sthaha/repos","events_url":"https://api.github.com/users/sthaha/events{/privacy}","received_events_url":"https://api.github.com/users/sthaha/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/86/commits","review_comments_url":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/86/comments","review_comment_url":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fabric8io/osio-pipeline/issues/86/comments","statuses_url":"https://api.github.com/repos/fabric8io/osio-pipeline/statuses/4949b087ee7a068be1627c4624240675cfab193e","head":{"label":"pradeepitm12:staging","ref":"staging","sha":"4949b087ee7a068be1627c4624240675cfab193e","user":{"login":"pradeepitm12","id":26105461,"node_id":"MDQ6VXNlcjI2MTA1NDYx","avatar_url":"https://avatars0.githubusercontent.com/u/26105461?v=4","gravatar_id":"","url":"https://api.github.com/users/pradeepitm12","html_url":"https://github.com/pradeepitm12","followers_url":"https://api.github.com/users/pradeepitm12/followers","following_url":"https://api.github.com/users/pradeepitm12/following{/other_user}","gists_url":"https://api.github.com/users/pradeepitm12/gists{/gist_id}","starred_url":"https://api.github.com/users/pradeepitm12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pradeepitm12/subscriptions","organizations_url":"https://api.github.com/users/pradeepitm12/orgs","repos_url":"https://api.github.com/users/pradeepitm12/repos","events_url":"https://api.github.com/users/pradeepitm12/events{/privacy}","received_events_url":"https://api.github.com/users/pradeepitm12/received_events","type":"User","site_admin":false},"repo":{"id":153291574,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMyOTE1NzQ=","name":"osio-pipeline","full_name":"pradeepitm12/osio-pipeline","private":false,"owner":{"login":"pradeepitm12","id":26105461,"node_id":"MDQ6VXNlcjI2MTA1NDYx","avatar_url":"https://avatars0.githubusercontent.com/u/26105461?v=4","gravatar_id":"","url":"https://api.github.com/users/pradeepitm12","html_url":"https://github.com/pradeepitm12","followers_url":"https://api.github.com/users/pradeepitm12/followers","following_url":"https://api.github.com/users/pradeepitm12/following{/other_user}","gists_url":"https://api.github.com/users/pradeepitm12/gists{/gist_id}","starred_url":"https://api.github.com/users/pradeepitm12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pradeepitm12/subscriptions","organizations_url":"https://api.github.com/users/pradeepitm12/orgs","repos_url":"https://api.github.com/users/pradeepitm12/repos","events_url":"https://api.github.com/users/pradeepitm12/events{/privacy}","received_events_url":"https://api.github.com/users/pradeepitm12/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pradeepitm12/osio-pipeline","description":"Utility function in groovy for running Jenkins OSIO Pipeline","fork":true,"url":"https://api.github.com/repos/pradeepitm12/osio-pipeline","forks_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/forks","keys_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/teams","hooks_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/hooks","issue_events_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/events","assignees_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/tags","blobs_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/languages","stargazers_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/stargazers","contributors_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/contributors","subscribers_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/subscribers","subscription_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/subscription","commits_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/issues/comments{/number}","contents_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/merges","archive_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/downloads","issues_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/releases{/id}","deployments_url":"https://api.github.com/repos/pradeepitm12/osio-pipeline/deployments","created_at":"2018-10-16T13:37:17Z","updated_at":"2018-10-24T12:30:49Z","pushed_at":"2018-12-11T09:36:49Z","git_url":"git://github.com/pradeepitm12/osio-pipeline.git","ssh_url":"git@github.com:pradeepitm12/osio-pipeline.git","clone_url":"https://github.com/pradeepitm12/osio-pipeline.git","svn_url":"https://github.com/pradeepitm12/osio-pipeline","homepage":null,"size":76,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fabric8io:master","ref":"master","sha":"0af26ef1d3168e4e549f6231f71a4dff3ef1540d","user":{"login":"fabric8io","id":6074349,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwNzQzNDk=","avatar_url":"https://avatars1.githubusercontent.com/u/6074349?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8io","html_url":"https://github.com/fabric8io","followers_url":"https://api.github.com/users/fabric8io/followers","following_url":"https://api.github.com/users/fabric8io/following{/other_user}","gists_url":"https://api.github.com/users/fabric8io/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8io/subscriptions","organizations_url":"https://api.github.com/users/fabric8io/orgs","repos_url":"https://api.github.com/users/fabric8io/repos","events_url":"https://api.github.com/users/fabric8io/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8io/received_events","type":"Organization","site_admin":false},"repo":{"id":141456160,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE0NTYxNjA=","name":"osio-pipeline","full_name":"fabric8io/osio-pipeline","private":false,"owner":{"login":"fabric8io","id":6074349,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwNzQzNDk=","avatar_url":"https://avatars1.githubusercontent.com/u/6074349?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8io","html_url":"https://github.com/fabric8io","followers_url":"https://api.github.com/users/fabric8io/followers","following_url":"https://api.github.com/users/fabric8io/following{/other_user}","gists_url":"https://api.github.com/users/fabric8io/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8io/subscriptions","organizations_url":"https://api.github.com/users/fabric8io/orgs","repos_url":"https://api.github.com/users/fabric8io/repos","events_url":"https://api.github.com/users/fabric8io/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/fabric8io/osio-pipeline","description":"Utility function in groovy for running Jenkins OSIO Pipeline","fork":false,"url":"https://api.github.com/repos/fabric8io/osio-pipeline","forks_url":"https://api.github.com/repos/fabric8io/osio-pipeline/forks","keys_url":"https://api.github.com/repos/fabric8io/osio-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabric8io/osio-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabric8io/osio-pipeline/teams","hooks_url":"https://api.github.com/repos/fabric8io/osio-pipeline/hooks","issue_events_url":"https://api.github.com/repos/fabric8io/osio-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/fabric8io/osio-pipeline/events","assignees_url":"https://api.github.com/repos/fabric8io/osio-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/fabric8io/osio-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/fabric8io/osio-pipeline/tags","blobs_url":"https://api.github.com/repos/fabric8io/osio-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabric8io/osio-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabric8io/osio-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabric8io/osio-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabric8io/osio-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/fabric8io/osio-pipeline/languages","stargazers_url":"https://api.github.com/repos/fabric8io/osio-pipeline/stargazers","contributors_url":"https://api.github.com/repos/fabric8io/osio-pipeline/contributors","subscribers_url":"https://api.github.com/repos/fabric8io/osio-pipeline/subscribers","subscription_url":"https://api.github.com/repos/fabric8io/osio-pipeline/subscription","commits_url":"https://api.github.com/repos/fabric8io/osio-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabric8io/osio-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabric8io/osio-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabric8io/osio-pipeline/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabric8io/osio-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/fabric8io/osio-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabric8io/osio-pipeline/merges","archive_url":"https://api.github.com/repos/fabric8io/osio-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabric8io/osio-pipeline/downloads","issues_url":"https://api.github.com/repos/fabric8io/osio-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/fabric8io/osio-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/fabric8io/osio-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabric8io/osio-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/fabric8io/osio-pipeline/releases{/id}","deployments_url":"https://api.github.com/repos/fabric8io/osio-pipeline/deployments","created_at":"2018-07-18T15:44:09Z","updated_at":"2018-12-03T10:31:11Z","pushed_at":"2018-12-11T09:36:50Z","git_url":"git://github.com/fabric8io/osio-pipeline.git","ssh_url":"git@github.com:fabric8io/osio-pipeline.git","clone_url":"https://github.com/fabric8io/osio-pipeline.git","svn_url":"https://github.com/fabric8io/osio-pipeline","homepage":null,"size":73,"stargazers_count":3,"watchers_count":3,"language":"Groovy","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":32,"license":null,"forks":13,"open_issues":32,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/86"},"html":{"href":"https://github.com/fabric8io/osio-pipeline/pull/86"},"issue":{"href":"https://api.github.com/repos/fabric8io/osio-pipeline/issues/86"},"comments":{"href":"https://api.github.com/repos/fabric8io/osio-pipeline/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fabric8io/osio-pipeline/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/fabric8io/osio-pipeline/statuses/4949b087ee7a068be1627c4624240675cfab193e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"piyush-garg"}}