Files
release-action/node_modules/@octokit/rest/plugins/authentication/validate.js
Nick Cipollo d8a9f1e813
Some checks failed
PR Checks / check_pr (push) Has been cancelled
Create 1.2.0 release
2019-12-12 16:03:50 -05:00

22 lines
350 B
JavaScript

module.exports = validateAuth
function validateAuth (auth) {
if (typeof auth === 'string') {
return
}
if (typeof auth === 'function') {
return
}
if (auth.username && auth.password) {
return
}
if (auth.clientId && auth.clientSecret) {
return
}
throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`)
}