Socket
Socket
Sign inDemoInstall

github

Package Overview
Dependencies
Maintainers
3
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 9.2.0 to 9.3.0

31

CHANGELOG.md
# CHANGELOG
## 9.3.0
Features:
* Update params for create/edit repo.
* Add Review Requests preview stuff for team reviewers.
* Update params for create pull request review endpoint.
* Update params for update pull request endpoint.
* Add state param to some project endpoints.
* Add filter param to outside collaborators endpoint.
* Mark that default role is member for add-org-membership.
* Add Code of Conduct preview endpoint support.
* Add endpoint to include issue events triggered by integrations.
* Add single comment endpoint to include issue comments.
* Remove extra issue comments endpoint.
* Add issue-related endpoints to include reactions.
* Add endpoints to include issues opened by users.
* Add endpoints to include reactions in responses.
* Allow to see star creation timestamps.
* Add revoke grant endpoint.
* Pull Request Reviews API now official.
* Repository invitation api now official.
* Add Protected Branches API Pull Request Review Dismissal Restrictions.
* Add package lock file.
* Organization Memberships API is now official.
Bug fixes:
* Add two missing endpoints for project preview accept header.
* Updated api urls for convert/remove collaborator.
## 9.2.0

@@ -180,3 +209,3 @@

* Fix mismatched endpoints in acceptTree object.
* Prevent `accept` and `Accept` mixing in headers.
* Prevent `accept` and `Accept` mixing in headers.
* Adjust getFollowers endpoint url.

@@ -183,0 +212,0 @@ * Adjust testHook endpoint url.

7

examples/testPromise.js

@@ -16,6 +16,5 @@ "use strict";

console.log(res);
github.users.getById({ id: "429706" }).then(function(res) {
console.log(res);
});
return github.users.getById({ id: "429706" });
}).then(function(res) {
console.log(res);
});

@@ -85,3 +85,3 @@ "use strict";

this.routes = JSON.parse(fs.readFileSync(__dirname + "/routes.json", "utf8"));
this.routes = require("./routes.json");

@@ -641,3 +641,3 @@ var pathPrefix = "";

var host = block.host || this.config.host || this.constants.host;
// Edge case for github enterprise uploadAsset:

@@ -651,3 +651,3 @@ // 1) In public api, host changes to uploads.github.com. In enterprise, the host remains the same.

}
var obj = getQueryAndUrl(msg, block, format, self.config);

@@ -660,3 +660,3 @@ var query = obj.query;

}
var proxyUrl;

@@ -672,3 +672,3 @@ var agent = undefined;

}
var ca = this.config.ca;

@@ -755,3 +755,3 @@

}
var options = {

@@ -763,3 +763,4 @@ host: host,

headers: headers,
ca: ca
ca: ca,
family: this.config.family
};

@@ -877,3 +878,3 @@

var data = res.data;
var contentType = res.headers["content-type"];

@@ -880,0 +881,0 @@ if (contentType && contentType.indexOf("application/json") !== -1) {

{
"name": "github",
"version": "9.2.0",
"version": "9.3.0",
"description": "NodeJS wrapper for the GitHub API",

@@ -53,3 +53,3 @@ "author": "Mike de Boer <info@mikedeboer.nl>",

"name": "node-github",
"version": "9.2.0",
"version": "9.3.0",
"template": {

@@ -56,0 +56,0 @@ "withCompare": true

@@ -1,3 +0,1 @@

**NOTE: The `node-github` npm package is deprecated. You want the `github` npm package (see Installation).**
# Node-github

@@ -30,3 +28,3 @@

Client API: [https://mikedeboer.github.io/node-github/](https://mikedeboer.github.io/node-github/)
Client API: [https://mikedeboer.github.io/node-github/](https://mikedeboer.github.io/node-github/)
GitHub API: [https://developer.github.com/v3/](https://developer.github.com/v3/)

@@ -50,2 +48,3 @@

Promise: require('bluebird'),
family: 6,
followRedirects: false, // default: true; there's currently an issue with non-get redirects, so allow ability to disable follow-redirects

@@ -70,3 +69,3 @@ timeout: 5000

There are a few pagination-related methods:
There are a few pagination-related methods:

@@ -171,3 +170,3 @@ ```

For using bluebird, see [here](https://github.com/mikedeboer/node-github/blob/master/examples/testPromise.js).
For using bluebird, see [here](https://github.com/mikedeboer/node-github/blob/master/examples/testPromise.js).
For using Q, see [here](https://github.com/mikedeboer/node-github/blob/master/examples/testPromiseQ.js).

@@ -197,2 +196,4 @@

| ------------------- | ----------------------------------------------- |
| Blocking Users | application/vnd.github.giant-sentry-fist-preview+json |
| Codes of Conduct | application/vnd.github.scarlet-witch-preview+json |
| Commit Search | application/vnd.github.cloak-preview+json |

@@ -206,3 +207,2 @@ | Community | application/vnd.github.black-panther-preview+json |

| Migrations | application/vnd.github.wyandotte-preview+json |
| Organization Membership | application/vnd.github.korra-preview+json |
| Pages | application/vnd.github.mister-fantastic-preview |

@@ -214,4 +214,5 @@ | Pre-receive | application/vnd.github.eye-scream-preview |

| Reactions | application/vnd.github.squirrel-girl-preview |
| Review Requests | application/vnd.github.thor-preview+json |
| Star Creation Timestamp | application/vnd.github.v3.star+json |
| Timeline | application/vnd.github.mockingbird-preview |
| User Blocking | application/vnd.github.giant-sentry-fist-preview+json |

@@ -218,0 +219,0 @@ ## Dev notes

@@ -206,2 +206,16 @@ /*

it("should successfully execute DELETE /applications/:client_id/grants/:access_token (revokeGrant)", function(next) {
client.authorization.revokeGrant(
{
client_id: "String",
access_token: "String"
},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
next();
}
);
});
it("should successfully execute PATCH /authorizations/:id (update)", function(next) {

@@ -208,0 +222,0 @@ client.authorization.update(

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

number: "Number",
since: "Date",
page: "Number",

@@ -300,0 +301,0 @@ per_page: "Number"

@@ -28,2 +28,26 @@ /*

it("should successfully execute GET /codes_of_conduct/:key (getCodeOfConduct)", function(next) {
client.misc.getCodeOfConduct(
{
key: "String"
},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
next();
}
);
});
it("should successfully execute GET /codes_of_conduct (getCodesOfConduct)", function(next) {
client.misc.getCodesOfConduct(
{},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
next();
}
);
});
it("should successfully execute GET /emojis (getEmojis)", function(next) {

@@ -110,2 +134,16 @@ client.misc.getEmojis(

it("should successfully execute GET /repos/:owner/:repo/community/code_of_conduct (getRepoCodeOfConduct)", function(next) {
client.misc.getRepoCodeOfConduct(
{
owner: "String",
repo: "String"
},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
next();
}
);
});
it("should successfully execute GET /repos/:owner/:repo/license (getRepoLicense)", function(next) {

@@ -112,0 +150,0 @@ client.misc.getRepoLicense(

@@ -159,3 +159,3 @@ /*

it("should successfully execute PUT /orgs/:org/outside_collaborator/:username (convertMemberToOutsideCollaborator)", function(next) {
it("should successfully execute PUT /orgs/:org/outside_collaborators/:username (convertMemberToOutsideCollaborator)", function(next) {
client.orgs.convertMemberToOutsideCollaborator(

@@ -408,2 +408,3 @@ {

org: "String",
filter: "String",
page: "Number",

@@ -590,3 +591,3 @@ per_page: "Number"

it("should successfully execute DELETE /orgs/:org/outside_collaborator/:username (removeOutsideCollaborator)", function(next) {
it("should successfully execute DELETE /orgs/:org/outside_collaborators/:username (removeOutsideCollaborator)", function(next) {
client.orgs.removeOutsideCollaborator(

@@ -593,0 +594,0 @@ {

@@ -131,3 +131,4 @@ /*

{
org: "String"
org: "String",
state: "String"
},

@@ -211,3 +212,4 @@ function(err, res) {

owner: "String",
repo: "String"
repo: "String",
state: "String"
},

@@ -256,3 +258,4 @@ function(err, res) {

name: "String",
body: "String"
body: "String",
state: "String"
},

@@ -259,0 +262,0 @@ function(err, res) {

@@ -123,7 +123,6 @@ /*

number: "Number",
commit_id: "String",
body: "String",
event: "String",
comments: "Array",
path: "String",
position: "Number"
comments: "Array"
},

@@ -144,3 +143,4 @@ function(err, res) {

number: "Number",
reviewers: "Array"
reviewers: "Array",
team_reviewers: "Array"
},

@@ -170,2 +170,18 @@ function(err, res) {

it("should successfully execute DELETE /repos/:owner/:repo/pulls/:number/reviews/:id (deletePendingReview)", function(next) {
client.pullRequests.deletePendingReview(
{
owner: "String",
repo: "String",
number: "Number",
id: "String"
},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
next();
}
);
});
it("should successfully execute DELETE /repos/:owner/:repo/pulls/:number/requested_reviewers (deleteReviewRequest)", function(next) {

@@ -177,3 +193,4 @@ client.pullRequests.deleteReviewRequest(

number: "Number",
reviewers: "Array"
reviewers: "Array",
team_reviewers: "Array"
},

@@ -458,3 +475,4 @@ function(err, res) {

state: "String",
base: "String"
base: "String",
maintainer_can_modify: "Boolean"
},

@@ -461,0 +479,0 @@ function(err, res) {

@@ -44,2 +44,19 @@ /*

it("should successfully execute POST /repos/:owner/:repo/branches/:branch/protection/enforce_admins (addProtectedBranchAdminEnforcement)", function(next) {
client.repos.addProtectedBranchAdminEnforcement(
{
owner: "String",
repo: "String",
branch: "String",
page: "Number",
per_page: "Number"
},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
next();
}
);
});
it("should successfully execute POST /repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts (addProtectedBranchRequiredStatusChecksContexts)", function(next) {

@@ -132,4 +149,4 @@ client.repos.addProtectedBranchRequiredStatusChecksContexts(

has_issues: "Boolean",
has_projects: "Boolean",
has_wiki: "Boolean",
has_downloads: "Boolean",
team_id: "Number",

@@ -242,4 +259,4 @@ auto_init: "Boolean",

has_issues: "Boolean",
has_projects: "Boolean",
has_wiki: "Boolean",
has_downloads: "Boolean",
team_id: "Number",

@@ -428,6 +445,7 @@ auto_init: "Boolean",

it("should successfully execute DELETE /repositories/:repo_id/invitations/:invitation_id (deleteInvite)", function(next) {
it("should successfully execute DELETE /repos/:owner/:repo/invitations/:invitation_id (deleteInvite)", function(next) {
client.repos.deleteInvite(
{
repo_id: "String",
owner: "String",
repo: "String",
invitation_id: "String"

@@ -483,4 +501,4 @@ },

has_issues: "Boolean",
has_projects: "Boolean",
has_wiki: "Boolean",
has_downloads: "Boolean",
default_branch: "String",

@@ -1044,6 +1062,7 @@ allow_squash_merge: "Boolean",

it("should successfully execute GET /repositories/:repo_id/invitations (getInvites)", function(next) {
it("should successfully execute GET /repos/:owner/:repo/invitations (getInvites)", function(next) {
client.repos.getInvites(
{
repo_id: "String"
owner: "String",
repo: "String"
},

@@ -1196,2 +1215,19 @@ function(err, res) {

it("should successfully execute GET /repos/:owner/:repo/branches/:branch/protection/enforce_admins (getProtectedBranchAdminEnforcement)", function(next) {
client.repos.getProtectedBranchAdminEnforcement(
{
owner: "String",
repo: "String",
branch: "String",
page: "Number",
per_page: "Number"
},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
next();
}
);
});
it("should successfully execute GET /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews (getProtectedBranchPullRequestReviewEnforcement)", function(next) {

@@ -1603,2 +1639,19 @@ client.repos.getProtectedBranchPullRequestReviewEnforcement(

it("should successfully execute DELETE /repos/:owner/:repo/branches/:branch/protection/enforce_admins (removeProtectedBranchAdminEnforcement)", function(next) {
client.repos.removeProtectedBranchAdminEnforcement(
{
owner: "String",
repo: "String",
branch: "String",
page: "Number",
per_page: "Number"
},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
next();
}
);
});
it("should successfully execute DELETE /repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews (removeProtectedBranchPullRequestReviewEnforcement)", function(next) {

@@ -1799,3 +1852,5 @@ client.repos.removeProtectedBranchPullRequestReviewEnforcement(

required_pull_request_reviews: "Json",
dismissal_restrictions: "Json",
restrictions: "Json",
enforce_admins: "Boolean",
page: "Number",

@@ -1848,8 +1903,9 @@ per_page: "Number"

it("should successfully execute PATCH /repositories/:repo_id/invitations/:invitation_id (updateInvite)", function(next) {
it("should successfully execute PATCH /repos/:owner/:repo/invitations/:invitation_id (updateInvite)", function(next) {
client.repos.updateInvite(
{
repo_id: "String",
owner: "String",
repo: "String",
invitation_id: "String",
permission: "String"
permissions: "String"
},

@@ -1870,3 +1926,4 @@ function(err, res) {

branch: "String",
include_admins: "Boolean"
dismissal_restrictions: "Json",
dismiss_stale_reviews: "Boolean"
},

@@ -1873,0 +1930,0 @@ function(err, res) {

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

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

Sorry, the diff of this file is not supported yet

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

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