Skip to content

Commit 06c4e15

Browse files
committed
[fixup] Upgrade github-request, fix require()
1 parent ea69962 commit 06c4e15

File tree

6 files changed

+78
-48
lines changed

6 files changed

+78
-48
lines changed

lib/github.js

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,11 @@
11
var url = require( "url" ),
2-
github = require( "github" );
2+
github = require( "github-request" );
33

44
module.exports = function( Release ) {
55

66
Release.define({
7-
_githubRequest: function( settings, data, callback ) {
8-
if ( typeof data === "function" ) {
9-
callback = data;
10-
data = null;
11-
}
12-
13-
github.request( settings, data, function( error, first, meta ) {
14-
if ( error ) {
15-
return callback( error );
16-
}
17-
18-
if ( !meta.links || !meta.links.next ) {
19-
return callback( null, first );
20-
}
21-
22-
settings.path = url.parse( meta.links.next ).path;
23-
Release._githubRequest( settings, data, function( error, next ) {
24-
if ( error ) {
25-
return callback( error );
26-
}
27-
28-
callback( null, first.concat( next ) );
29-
});
30-
});
31-
},
32-
337
_githubMilestone: function( callback ) {
34-
Release._githubRequest({
8+
github.requestAll({
359
path: "/repos/jquery/" + Release.project + "/milestones"
3610
}, function( error, milestones ) {
3711
if ( error ) {
@@ -56,7 +30,7 @@ Release.define({
5630
return callback( error );
5731
}
5832

59-
Release._githubRequest({
33+
github.requestAll({
6034
path: "/repos/jquery/" + Release.project + "/issues",
6135
}, {
6236
milestone: milestone,

node_modules/github-request/LICENSE-MIT.txt renamed to node_modules/github-request/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/github-request/README.md

Lines changed: 17 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/github-request/lib/request.js

Lines changed: 31 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/github-request/package.json

Lines changed: 24 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"dependencies": {
33
"colors": "0.6.2",
4-
"shelljs": "0.2.6",
5-
"github-request": "1.1.0"
4+
"github-request": "1.2.1",
5+
"shelljs": "0.2.6"
66
},
77
"devDependencies": {
88
"grunt": "0.4.1",

0 commit comments

Comments
 (0)