v3 new release (#87)

add token
This commit is contained in:
github-actions[bot]
2022-07-25 13:23:27 -04:00
committed by GitHub
parent e4f3964f67
commit 84b304dfb7
31 changed files with 1057 additions and 2 deletions

14
node_modules/@octokit/auth-token/dist-src/index.js generated vendored Normal file
View File

@ -0,0 +1,14 @@
import { auth } from "./auth";
import { hook } from "./hook";
export const createTokenAuth = function createTokenAuth(token) {
if (!token) {
throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
}
if (typeof token !== "string") {
throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
}
token = token.replace(/^(token|bearer) +/i, "");
return Object.assign(auth.bind(null, token), {
hook: hook.bind(null, token),
});
};