Skip to content

Commit

Permalink
add github pages preview stuff (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizensoze committed Jul 26, 2016
1 parent aa885e0 commit eddf674
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
14 changes: 13 additions & 1 deletion doc/apidoc.js
Expand Up @@ -3727,7 +3727,7 @@ github.repos.getLatestRelease({ ... });
/**
* @api {get} /repos/:user/:repo/pages getPages
* @apiName getPages
* @apiDescription Get information about a Pages site
* @apiDescription Get information about a Pages site. (Use preview header to include additional info.)
* @apiGroup repos
*
* @apiParam {String} user
Expand Down Expand Up @@ -4210,6 +4210,18 @@ github.repos.replaceProtectedBranchTeamRestrictions({ ... });
github.repos.replaceProtectedBranchUserRestrictions({ ... });
*/

/**
* @api {post} /repos/:user/:repo/pages/builds requestPageBuild
* @apiName requestPageBuild
* @apiDescription Request a page build. (In preview period. See README.)
* @apiGroup repos
*
* @apiParam {String} user
* @apiParam {String} repo
* @apiExample {js} ex:
github.repos.requestPageBuild({ ... });
*/

/**
* @api {post} /repos/:user/:repo/hooks/:id/test testHook
* @apiName testHook
Expand Down
26 changes: 12 additions & 14 deletions lib/routes.json
Expand Up @@ -9,19 +9,7 @@
"documentation": "https://developer.github.com/v3",
"dateFormat": "YYYY-MM-DDTHH:MM:SSZ",
"requestFormat": "json",
"requestMedia": "application/vnd.github.v3+json",
"previewRequestMedia": [
"application/vnd.github.mockingbird-preview",
"application/vnd.github.squirrel-girl-preview",
"application/vnd.github.barred-rock-preview",
"application/vnd.github.damage-preview",
"application/vnd.github.ant-man-preview+json",
"application/vnd.github.cryptographer-preview",
"application/vnd.github.polaris-preview",
"application/vnd.github.drax-preview+json",
"application/vnd.github.loki-preview+json",
"application/vnd.github.wyandotte-preview+json"
]
"requestMedia": "application/vnd.github.v3+json"
},
"response-headers": [
"X-RateLimit-Limit",
Expand Down Expand Up @@ -5064,7 +5052,17 @@
"$page": null,
"$per_page": null
},
"description": "Get information about a Pages site"
"description": "Get information about a Pages site. (Use preview header to include additional info.)"
},

"request-page-build": {
"url": "/repos/:user/:repo/pages/builds",
"method": "POST",
"params": {
"$user": null,
"$repo": null
},
"description": "Request a page build. (In preview period. See README.)"
},

"get-pages-builds": {
Expand Down
14 changes: 14 additions & 0 deletions test/reposTest.js
Expand Up @@ -1631,6 +1631,20 @@ describe("[repos]", function() {
);
});

it("should successfully execute POST /repos/:user/:repo/pages/builds (requestPageBuild)", function(next) {
client.repos.requestPageBuild(
{
user: "String",
repo: "String"
},
function(err, res) {
Assert.equal(err, null);
// other assertions go here
next();
}
);
});

it("should successfully execute POST /repos/:user/:repo/hooks/:id/test (testHook)", function(next) {
client.repos.testHook(
{
Expand Down

0 comments on commit eddf674

Please sign in to comment.