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

octopie

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

octopie - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

14

lib/octopie.js

@@ -66,3 +66,3 @@ var GitHub = require('node-github')

Octopie.prototype.listen = function(port) {
Octopie.prototype.listen = function(port, cb) {
if (!port) { throw new Error("Can't start listening without a port!") }

@@ -72,10 +72,16 @@

function combineEvents(obj, repo) {
obj[repo] = self.events
return obj
}
syncHooks({
// Interpolate our repos and events into a repo: [events] hash
hooks: this.repos.reduce(function(obj, repo) { obj[repo] = self.events }, {}),
eventsHash: this.repos.reduce(combineEvents, {}),
auth: { type: 'oauth', token: this.authToken },
url: this.url
}, function(err, results) {
this.server.listen(port)
console.log('Now listening on port', port)
self.server.listen(port, function() {
if (typeof cb === 'function') { cb.call(null, arguments) }
})
})

@@ -82,0 +88,0 @@ }

{
"name": "octopie",
"version": "1.0.3",
"version": "1.1.0",
"description": "An easy way to add GitHub hooks to your project",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -92,29 +92,2 @@ var assert = require("assert")

})
it("should not find hooks on a repo that is inaccessible", function (done) {
var octopie = octoFactory();
octopie.add('fullscreeninc/bacon');
octopie._configureHooks(function (err, hooks) {
assert.deepEqual(hooks, [])
done();
});
});
it("should create our hook in response to not finding our hook", function (done) {
var octopie = octoFactory();
octopie.add('ryancbarry/underscore');
octopie.on('issues', function () {});
octopie.on('pull_request', function () {});
octopie._configureHooks(function (err, hooks) {
console.log('configured : hooks:\n', hooks);
// assert.deepEqual(hooks, [])
// var hook = hooks[0];
// assert(hook.config.url === 'http://google.com');
// assert(hook.name === 'web');
// assert.deepEqual(hook.events, ['issues', 'pull_request']);
// assert(hook.config.content_type === 'json');
// assert(hook.config.insecure_ssl === '1');
done();
});
});
});
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