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

gith

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gith - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

test/payloads/tag-on-branch.json

8

lib/gith.js

@@ -158,5 +158,6 @@ /*

var tag = '';
var rRef = /refs\/(tags|heads)\/(.*)$/;
// break out if it was a tag or branch and assign
var refMatches = ( payload.ref || "" ).match( /refs\/(tags|heads)\/(.*)$/ );
var refMatches = ( payload.ref || "" ).match( rRef );
if ( refMatches ) {

@@ -171,2 +172,7 @@ if ( refMatches[1] === "heads" ) {

// if branch wasn't found, use base_ref if available
if ( !branch && payload.base_ref ) {
branch = payload.base_ref.replace( rRef, '$2' );
}
var simpler = {

@@ -173,0 +179,0 @@ original: payload,

2

package.json
{
"name": "gith",
"description": "gith[ooks] - a simple node server that responds to github post-receive events with meaningful data",
"version": "1.0.3",
"version": "1.0.4",
"homepage": "https://github.com/danheberden/gith",

@@ -6,0 +6,0 @@ "author": {

# gith
Version: 1.0.3
Version: 1.0.4

@@ -5,0 +5,0 @@ gith[ooks] - a simple node server that responds to github post-receive events with meaningful data

@@ -336,4 +336,17 @@ var githFactory = require('../lib/gith.js');

gith.payload( json );
},
'tag-on-branch.json': function( test ) {
var json = require( './payloads/tag-on-branch.json' );
test.expect(2);
var gith = githFactory.create();
var g = gith();
g.on( 'tag:add', function( payload ) {
test.equal( payload.branch, 'itsabranch', 'tagging operation should still get the branch it fired on' );
test.equal( payload.sha, '48722bc3552e5e04293a74fd3851c0c643f76657' , 'tagging operation should point to commit' );
test.done();
});
gith.payload( json );
}
};

@@ -340,0 +353,0 @@

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