-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
31 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = octokitRegisterEndpoints | ||
|
||
const registerEndpoints = require('./register-endpoints') | ||
|
||
function octokitRegisterEndpoints (octokit) { | ||
octokit.registerEndpoints = registerEndpoints.bind(null, octokit) | ||
} |
19 changes: 6 additions & 13 deletions
19
plugins/endpoint-methods/index.js → .../register-endpoints/register-endpoints.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = octokitRestApiEndpoints | ||
|
||
const ROUTES = require('./routes.json') | ||
|
||
function octokitRestApiEndpoints (octokit) { | ||
octokit.registerEndpoints(ROUTES) | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = octokitValidate | ||
|
||
const validate = require('./validate') | ||
|
||
function octokitValidate (octokit) { | ||
octokit.hook.before('request', validate) | ||
} |
File renamed without changes.