0649bd8119
* Bumping actions/github to 2.2.0 for GHES * Husky commit correct node modules
13 lines
274 B
JavaScript
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
|
|
};
|
|
}
|