Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grep-tests-from-pull-requests

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grep-tests-from-pull-requests - npm Package Compare versions

Comparing version 1.8.1 to 1.8.2

src/universal.js

2

package.json
{
"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) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc