grep-tests-from-pull-requests
Advanced tools
Comparing version 1.8.1 to 1.8.2
{ | ||
"name": "grep-tests-from-pull-requests", | ||
"version": "1.8.1", | ||
"version": "1.8.2", | ||
"description": "Grabs the test tags to run from the pull request text", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
// @ts-check | ||
const { getBaseUrlFromTextLine } = require('./universal') | ||
const got = require('got') | ||
@@ -17,21 +18,2 @@ const debug = require('debug')('grep-tests-from-pull-requests') | ||
/** | ||
* Finds and returns the test (base URL) in the given text line, if present. | ||
* @param {string} line a single line of text | ||
*/ | ||
function getBaseUrlFromTextLine(line) { | ||
// if the line is in the form of | ||
// baseUlr <url> | ||
if (line.includes('baseUrl')) { | ||
return line.split('baseUrl')[1].trim() | ||
} | ||
// if the line is in the frm of | ||
// Test URL: <url> | ||
if (line.match(/^\s*Test URL:/)) { | ||
return line.split('Test URL:')[1].trim() | ||
} | ||
// did not find the base url | ||
} | ||
// assume we do need to authenticate to fetch the pull request body | ||
@@ -38,0 +20,0 @@ async function getPullRequestBody(options, envOptions) { |
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
21747
8
487