MCPcopy Create free account
hub / github.com/pollinations/pollinations / _get_token

Method _get_token

apps/polly/src/services/github.py:52–59  ·  view source on GitHub ↗

Get GitHub token (from App or PAT).

(self)

Source from the content-addressed store, hash-verified

50 self._connector = None
51
52 async def _get_token(self) -> str | None:
53 """Get GitHub token (from App or PAT)."""
54 if github_auth.github_app_auth:
55 token = await github_auth.github_app_auth.get_token()
56 if token:
57 return token
58 # Fallback to PAT
59 return config.github_token if config.github_token else None
60
61 def _has_auth(self) -> bool:
62 """Check if any auth method is available (sync check)."""

Callers 1

_get_headersMethod · 0.95

Calls 1

get_tokenMethod · 0.80

Tested by

no test coverage detected