{"action":"created","comment":{"url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/comments/235193541","pull_request_review_id":177004871,"id":235193541,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTE5MzU0MQ==","diff_hunk":"@@ -0,0 +1,230 @@\n+package gov.ca.cwds.jenkins.licensing\n+\n+import spock.lang.Specification\n+\n+class LicensingSupportSpecification extends Specification {\n+\n+  class PipeLineScript {\n+    PipeLineScript() {\n+    }\n+\n+    def sshagent(hash, closure) {\n+      closure()\n+    }\n+\n+    def sh(hash) {}\n+\n+    def echo(String) {}\n+  }\n+\n+  class RuntimeGradle {\n+    RuntimeGradle() {\n+    }\n+\n+    def run(map) {\n+    }\n+  }\n+\n+  def \"When licensing support is asked to update the license report for a non-master branch then skip license report generation\"() {\n+    given: 'a pipeline'\n+    def pipeline = Mock(PipeLineScript)\n+\n+    and: 'a licensing support instance which is the class under test'\n+    def licensingSupport = new LicensingSupport(pipeline)\n+\n+    when: 'it is asked to update the license report for a non-master branch'\n+    licensingSupport.updateLicenseReport('myTempBranch', 'credentials-id')\n+\n+    then: 'it will not invoke any command for report generation'\n+    0 * pipeline.sh('./gradlew downloadLicenses')\n+    0 * pipeline.sh('yarn licenses-report')\n+\n+    and: 'it will print a message about that updating license report is skipped'\n+    1 * pipeline.echo('Not working with the master branch. Skipping Update License Report for the other branch.')\n+  }\n+\n+  def \"When licensing support can't detect Licensing Support Type for a Java project then Exception is thrown\"() {\n+    given: 'a pipeline'\n+    def pipeline = Stub(PipeLineScript)\n+","path":"test/gov/ca/cwds/jenkins/licensing/LicensingSupportSpecification.groovy","position":49,"original_position":49,"commit_id":"85231664a48dfd6b2804e54c0a2a8f31b206d74f","original_commit_id":"85231664a48dfd6b2804e54c0a2a8f31b206d74f","user":{"login":"SergiiRedchuk","id":19473857,"node_id":"MDQ6VXNlcjE5NDczODU3","avatar_url":"https://avatars2.githubusercontent.com/u/19473857?v=4","gravatar_id":"","url":"https://api.github.com/users/SergiiRedchuk","html_url":"https://github.com/SergiiRedchuk","followers_url":"https://api.github.com/users/SergiiRedchuk/followers","following_url":"https://api.github.com/users/SergiiRedchuk/following{/other_user}","gists_url":"https://api.github.com/users/SergiiRedchuk/gists{/gist_id}","starred_url":"https://api.github.com/users/SergiiRedchuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergiiRedchuk/subscriptions","organizations_url":"https://api.github.com/users/SergiiRedchuk/orgs","repos_url":"https://api.github.com/users/SergiiRedchuk/repos","events_url":"https://api.github.com/users/SergiiRedchuk/events{/privacy}","received_events_url":"https://api.github.com/users/SergiiRedchuk/received_events","type":"User","site_admin":false},"body":"The returnStatus: true tells the external sh call to return the shell command exit code instead of failing on non-zero exit code.","created_at":"2018-11-20T22:31:33Z","updated_at":"2018-11-20T22:31:33Z","html_url":"https://github.com/ca-cwds/jenkins-pipeline-utils/pull/10#discussion_r235193541","pull_request_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/10","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/comments/235193541"},"html":{"href":"https://github.com/ca-cwds/jenkins-pipeline-utils/pull/10#discussion_r235193541"},"pull_request":{"href":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/10"}},"in_reply_to_id":235160098},"pull_request":{"url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/10","id":230971630,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwOTcxNjMw","html_url":"https://github.com/ca-cwds/jenkins-pipeline-utils/pull/10","diff_url":"https://github.com/ca-cwds/jenkins-pipeline-utils/pull/10.diff","patch_url":"https://github.com/ca-cwds/jenkins-pipeline-utils/pull/10.patch","issue_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/issues/10","number":10,"state":"open","locked":false,"title":"FIT-229: Implement Shared Library for Automated Licensing Phase Checks","user":{"login":"SergiiRedchuk","id":19473857,"node_id":"MDQ6VXNlcjE5NDczODU3","avatar_url":"https://avatars2.githubusercontent.com/u/19473857?v=4","gravatar_id":"","url":"https://api.github.com/users/SergiiRedchuk","html_url":"https://github.com/SergiiRedchuk","followers_url":"https://api.github.com/users/SergiiRedchuk/followers","following_url":"https://api.github.com/users/SergiiRedchuk/following{/other_user}","gists_url":"https://api.github.com/users/SergiiRedchuk/gists{/gist_id}","starred_url":"https://api.github.com/users/SergiiRedchuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SergiiRedchuk/subscriptions","organizations_url":"https://api.github.com/users/SergiiRedchuk/orgs","repos_url":"https://api.github.com/users/SergiiRedchuk/repos","events_url":"https://api.github.com/users/SergiiRedchuk/events{/privacy}","received_events_url":"https://api.github.com/users/SergiiRedchuk/received_events","type":"User","site_admin":false},"body":"Implemented Shared Library for Automated Licensing Phase","created_at":"2018-11-14T20:30:42Z","updated_at":"2018-11-20T22:31:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1760e3a4418366064905e9f1d3188fe1fb59e23a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/10/commits","review_comments_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/10/comments","review_comment_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/issues/10/comments","statuses_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/statuses/85231664a48dfd6b2804e54c0a2a8f31b206d74f","head":{"label":"ca-cwds:FIT-229","ref":"FIT-229","sha":"85231664a48dfd6b2804e54c0a2a8f31b206d74f","user":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"repo":{"id":153693729,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM2OTM3Mjk=","name":"jenkins-pipeline-utils","full_name":"ca-cwds/jenkins-pipeline-utils","private":false,"owner":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ca-cwds/jenkins-pipeline-utils","description":"Contains Jenkins Shared Library files","fork":false,"url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils","forks_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/forks","keys_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/teams","hooks_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/events","assignees_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/tags","blobs_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/subscription","commits_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/merges","archive_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/downloads","issues_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/deployments","created_at":"2018-10-18T22:11:23Z","updated_at":"2018-11-16T19:55:49Z","pushed_at":"2018-11-20T00:27:29Z","git_url":"git://github.com/ca-cwds/jenkins-pipeline-utils.git","ssh_url":"git@github.com:ca-cwds/jenkins-pipeline-utils.git","clone_url":"https://github.com/ca-cwds/jenkins-pipeline-utils.git","svn_url":"https://github.com/ca-cwds/jenkins-pipeline-utils","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ca-cwds:master","ref":"master","sha":"dc0b1347a9042c693f25d7cee7e73e9e341dd31a","user":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"repo":{"id":153693729,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM2OTM3Mjk=","name":"jenkins-pipeline-utils","full_name":"ca-cwds/jenkins-pipeline-utils","private":false,"owner":{"login":"ca-cwds","id":16274270,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2Mjc0Mjcw","avatar_url":"https://avatars3.githubusercontent.com/u/16274270?v=4","gravatar_id":"","url":"https://api.github.com/users/ca-cwds","html_url":"https://github.com/ca-cwds","followers_url":"https://api.github.com/users/ca-cwds/followers","following_url":"https://api.github.com/users/ca-cwds/following{/other_user}","gists_url":"https://api.github.com/users/ca-cwds/gists{/gist_id}","starred_url":"https://api.github.com/users/ca-cwds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ca-cwds/subscriptions","organizations_url":"https://api.github.com/users/ca-cwds/orgs","repos_url":"https://api.github.com/users/ca-cwds/repos","events_url":"https://api.github.com/users/ca-cwds/events{/privacy}","received_events_url":"https://api.github.com/users/ca-cwds/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ca-cwds/jenkins-pipeline-utils","description":"Contains Jenkins Shared Library files","fork":false,"url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils","forks_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/forks","keys_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/teams","hooks_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/hooks","issue_events_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/issues/events{/number}","events_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/events","assignees_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/assignees{/user}","branches_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/branches{/branch}","tags_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/tags","blobs_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/git/refs{/sha}","trees_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/statuses/{sha}","languages_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/languages","stargazers_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/stargazers","contributors_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/contributors","subscribers_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/subscribers","subscription_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/subscription","commits_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/commits{/sha}","git_commits_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/git/commits{/sha}","comments_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/comments{/number}","issue_comment_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/issues/comments{/number}","contents_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/contents/{+path}","compare_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/merges","archive_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/downloads","issues_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/issues{/number}","pulls_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls{/number}","milestones_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/milestones{/number}","notifications_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/labels{/name}","releases_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/releases{/id}","deployments_url":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/deployments","created_at":"2018-10-18T22:11:23Z","updated_at":"2018-11-16T19:55:49Z","pushed_at":"2018-11-20T00:27:29Z","git_url":"git://github.com/ca-cwds/jenkins-pipeline-utils.git","ssh_url":"git@github.com:ca-cwds/jenkins-pipeline-utils.git","clone_url":"https://github.com/ca-cwds/jenkins-pipeline-utils.git","svn_url":"https://github.com/ca-cwds/jenkins-pipeline-utils","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/10"},"html":{"href":"https://github.com/ca-cwds/jenkins-pipeline-utils/pull/10"},"issue":{"href":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/issues/10"},"comments":{"href":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/ca-cwds/jenkins-pipeline-utils/statuses/85231664a48dfd6b2804e54c0a2a8f31b206d74f"}},"author_association":"NONE"}}
{"actor":{"display_login":"SergiiRedchuk"}}