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

env-ci

Package Overview
Dependencies
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-ci - npm Package Compare versions

Comparing version 5.4.0 to 5.4.1

4

package.json
{
"name": "env-ci",
"description": "Get environment variables exposed by CI services",
"version": "5.4.0",
"version": "5.4.1",
"author": "Pierre Vanduynslager (https://github.com/pvdlg)",

@@ -26,3 +26,3 @@ "ava": {

"tempy": "0.7.1",
"xo": "0.45.0"
"xo": "0.46.3"
},

@@ -29,0 +29,0 @@ "engines": {

@@ -21,2 +21,7 @@ // https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables

const getPrNumber = (env) => {
const event = env.GITHUB_EVENT_PATH ? require(env.GITHUB_EVENT_PATH) : undefined;
return event && event.pull_request ? event.pull_request.number : undefined;
};
module.exports = {

@@ -28,3 +33,5 @@ detect({env}) {

const isPr = env.GITHUB_EVENT_NAME === 'pull_request' || env.GITHUB_EVENT_NAME === 'pull_request_target';
const branch = parseBranch(env.GITHUB_REF);
const branch = parseBranch(
env.GITHUB_EVENT_NAME === 'pull_request_target' ? `refs/pull/${getPrNumber(env)}/merge` : env.GITHUB_REF
);

@@ -31,0 +38,0 @@ return {

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