MCPcopy Index your code
hub / github.com/refined-github/refined-github / expectToken

Function expectToken

source/github-helpers/github-token.ts:52–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50});
51
52export async function expectToken(): Promise<string> {
53 const token = await getToken();
54 if (!token) {
55 throw new Error('Personal token required for this feature');
56 }
57
58 return token;
59}
60
61export async function hasValidGitHubComToken(token?: string): Promise<boolean> {
62 token ??= await getToken();

Callers 2

addFunction · 0.85
expectTokenScopeFunction · 0.85

Calls 1

getTokenFunction · 0.85

Tested by

no test coverage detected