mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-08 05:01:11 +00:00
.
This commit is contained in:
parent
beb1329f9f
commit
2b95e76931
7736 changed files with 1874747 additions and 51184 deletions
node_modules/@octokit/auth-token/dist-src
14
node_modules/@octokit/auth-token/dist-src/index.js
generated
vendored
Normal file
14
node_modules/@octokit/auth-token/dist-src/index.js
generated
vendored
Normal 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)
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue