release v1

This commit is contained in:
Shawn Napora
2019-08-06 17:37:58 -04:00
parent df4ea523fe
commit c607b751c2
540 changed files with 92301 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
module.exports = authenticationPlugin
const beforeRequest = require('./before-request')
const requestError = require('./request-error')
const validate = require('./validate')
function authenticationPlugin (octokit, options) {
if (!options.auth) {
return
}
validate(options.auth)
const state = {
octokit,
auth: options.auth
}
octokit.hook.before('request', beforeRequest.bind(null, state))
octokit.hook.error('request', requestError.bind(null, state))
}