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

github

Package Overview
Dependencies
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

42

api/v3.0.0/gitdata.js

@@ -327,2 +327,3 @@ /**

* - repo (String): Required.
* - ref (String): Required. String of the name of the fully qualified reference (ie: heads/master). If it doesn’t have at least one slash, it will be rejected.
* - sha (String): Required.

@@ -362,2 +363,43 @@ * - force (Boolean): Required. Boolean indicating whether to force the update or to make sure the update is a fast-forward update. The default is false, so leaving this out or setting it to false will make sure you’re not overwriting work.

/** section: github
* gitdata#deleteReference(msg, callback) -> null
* - msg (Object): Object that contains the parameters and their values to be sent to the server.
* - callback (Function): function to call when the request is finished with an error as first argument and result data as second argument.
*
* ##### Params on the `msg` object:
*
* - user (String): Required.
* - repo (String): Required.
* - ref (String): Required. String of the name of the fully qualified reference (ie: heads/master). If it doesn’t have at least one slash, it will be rejected.
**/
this.deleteReference = function(msg, block, callback) {
var self = this;
this.client.httpSend(msg, block, function(err, res) {
if (err)
return self.sendError(err, null, msg, callback);
var ret;
try {
ret = JSON.parse(res.data);
}
catch (ex) {
if (callback)
callback(new error.InternalServerError(ex.message), res);
return;
}
if (!ret)
ret = {};
if (!ret.meta)
ret.meta = {};
["x-ratelimit-limit", "x-ratelimit-remaining", "link"].forEach(function(header) {
if (res.headers[header])
ret.meta[header] = res.headers[header];
});
if (callback)
callback(null, ret);
});
};
/** section: github
* gitdata#getTag(msg, callback) -> null

@@ -364,0 +406,0 @@ * - msg (Object): Object that contains the parameters and their values to be sent to the server.

@@ -185,2 +185,3 @@ /*

repo: "String",
ref: "String",
sha: "String",

@@ -196,2 +197,22 @@ force: "Boolean"

"test: DELETE /repos/:user/:repo/git/refs/:ref (deleteReference)": function(next) {
var self = this;
this.client.authenticate({
type: "token",
username: username,
token: token
});
this.client.gitdata.deleteReference(
{
user: "String",
repo: "String",
ref: "String"
},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
}
);
},
"test: GET /repos/:user/:repo/git/tags/:sha (getTag)": function(next) {

@@ -198,0 +219,0 @@ var self = this;

2

package.json
{
"name" : "github",
"version" : "0.1.2",
"version" : "0.1.3",
"description" : "NodeJS wrapper for the GitHub API",

@@ -5,0 +5,0 @@ "author": "ajax.org B.V. <info@ajax.org>",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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