@percy/env
Advanced tools
Comparing version 1.15.0 to 1.16.0
@@ -41,2 +41,4 @@ import { getCommitData, getJenkinsSha, github } from './utils.js'; | ||
return 'netlify'; | ||
} else if (this.vars.HARNESS_PROJECT_ID) { | ||
return 'harness'; | ||
} else if (this.vars.CI) { | ||
@@ -102,2 +104,4 @@ return 'CI/unknown'; | ||
return ((_github$pull_request = github(this.vars).pull_request) === null || _github$pull_request === void 0 ? void 0 : _github$pull_request.head.sha) || this.vars.GITHUB_SHA; | ||
case 'harness': | ||
return this.vars.DRONE_COMMIT_SHA; | ||
} | ||
@@ -148,2 +152,4 @@ })(); | ||
return this.vars.HEAD; | ||
case 'harness': | ||
return this.vars.DRONE_SOURCE_BRANCH || this.vars.DRONE_COMMIT_BRANCH; | ||
} | ||
@@ -160,3 +166,3 @@ })(); | ||
let pr = (() => { | ||
var _this$vars$CI_PULL_RE, _this$vars$PULL_REQUE, _github$pull_request3; | ||
var _this$vars$CI_PULL_RE, _this$vars$PULL_REQUE, _github$pull_request3, _this$vars$DRONE_COMM; | ||
switch (this.ci) { | ||
@@ -193,2 +199,4 @@ case 'travis': | ||
return (_github$pull_request3 = github(this.vars).pull_request) === null || _github$pull_request3 === void 0 ? void 0 : _github$pull_request3.number; | ||
case 'harness': | ||
return this.vars.DRONE_BUILD_EVENT === 'pull_request' && ((_this$vars$DRONE_COMM = this.vars.DRONE_COMMIT_LINK) === null || _this$vars$DRONE_COMM === void 0 ? void 0 : _this$vars$DRONE_COMM.split('/').slice(-1)[0]); | ||
} | ||
@@ -241,2 +249,4 @@ })(); | ||
return this.vars.GITHUB_RUN_ID; | ||
case 'harness': | ||
return this.vars.HARNESS_BUILD_ID; | ||
} | ||
@@ -243,0 +253,0 @@ })(); |
{ | ||
"name": "@percy/env", | ||
"version": "1.15.0", | ||
"version": "1.16.0", | ||
"license": "MIT", | ||
@@ -33,3 +33,3 @@ "repository": { | ||
}, | ||
"gitHead": "383ce2888d2e4fe6972368f9bbe8580b23431a98" | ||
"gitHead": "147d3a6f249771252ee6cf03c9af44e4e21e1c55" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19548
415