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

Function gist_path_for_pr

social/scripts/common.py:578–581  ·  view source on GitHub ↗

Return the repo-relative path for a gist file: social/news/gists/YYYY-MM-DD/PR-{n}.json

(pr_number: int, merged_at: str)

Source from the content-addressed store, hash-verified

576 return ai_tier
577
578def gist_path_for_pr(pr_number: int, merged_at: str) -> str:
579 """Return the repo-relative path for a gist file: social/news/gists/YYYY-MM-DD/PR-{n}.json"""
580 date_str = merged_at[:10] # YYYY-MM-DD from ISO timestamp
581 return f"{GISTS_REL_DIR}/{date_str}/PR-{pr_number}.json"
582
583
584def commit_gist(gist: Dict, github_token: str, owner: str, repo: str) -> bool:

Callers 2

fetch_gistFunction · 0.90
commit_gistFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected