github-pages-deploy-action/node_modules/@octokit/auth-token/dist-src/auth.js
2021-11-26 12:57:51 +00:00

13 lines
274 B
JavaScript

export async function auth(token) {
const tokenType = token.split(/\./).length === 3
? "app"
: /^v\d+\./.test(token)
? "installation"
: "oauth";
return {
type: "token",
token: token,
tokenType
};
}