Browse Source

🐛 Fix Sponsors Git authentication (#16174)

pull/16175/head
Sebastián Ramírez 1 week ago
committed by GitHub
parent
commit
d353359c78
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/sponsors.yml
  2. 4
      scripts/sponsors.py

2
.github/workflows/sponsors.yml

@ -59,4 +59,4 @@ jobs:
uv run ./scripts/sponsors.py
env:
SPONSORS_TOKEN: ${{ secrets.SPONSORS_TOKEN }} # zizmor: ignore[secrets-outside-env]
PR_TOKEN: ${{ steps.pr-submit.outputs.token }}
GITHUB_TOKEN: ${{ steps.pr-submit.outputs.token }}

4
scripts/sponsors.py

@ -84,7 +84,7 @@ class SponsorsResponse(BaseModel):
class Settings(BaseSettings):
sponsors_token: SecretStr
pr_token: SecretStr
github_token: SecretStr
github_repository: str
httpx_timeout: int = 30
@ -160,7 +160,7 @@ def main() -> None:
logging.basicConfig(level=logging.INFO)
settings = Settings()
logging.info(f"Using config: {settings.model_dump_json()}")
g = Github(settings.pr_token.get_secret_value())
g = Github(settings.github_token.get_secret_value())
repo = g.get_repo(settings.github_repository)
tiers = get_individual_sponsors(settings=settings)

Loading…
Cancel
Save