REST/GraphQL endpoint to set a repository's social preview image #197021
Replies: 3 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
@Andrew6rant @karol-brejna-i @SableRaf Bump so this doesn't get forgotten. |
|
Four months on, this is still the one step in my repo setup I can't automate. Has anyone found a supported way to do it, or run into the same gap? A public API would let me handle it in CI. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
💬 Feature/Topic Area
API
Body
In 2026, setting a repository's social preview card (the 1200×630 image GitHub uses for link unfurls on Twitter/Slack/Discord and the repo card) still requires clicking through Settings → Social preview → Upload an image in the web UI. No REST endpoint, no GraphQL mutation. Discussion #32166 opened in September 2022 and has accumulated 13 upvotes since. Filing a refreshed ask because the use case has shifted meaningfully.
Why this matters in 2026
Three things changed since #32166 was filed:
gh repo create, push initial commit, set topics, configure branch protection, generate banner + social card. Every other step has a clean API; the social preview is the single manual interrupt.github/github-mcp-serverexposes the GitHub API as tools an LLM can call. There's no tool for social preview because there's no API to wrap. The MCP team can't ship this until the platform does.assets/social-preview.png; CI could upload it; the web-UI requirement is the lone blocker.Proposed API surface
Mirror in GraphQL via
updateRepository(input: { socialPreview: Upload })so the existingRepository.openGraphImageUrlread field has a write counterpart.Downstream impact
Once the API ships, two downstream features land essentially for free:
gh repo edit --social-preview ./card.pngin cli/cliupdate_repository_social_previewtool in github/github-mcp-serverHappy to follow up with concrete PRs against either once the platform endpoint exists.
cc @Andrew6rant @karol-brejna-i @SableRaf — figure you'd want to know this is getting a refresh with 2026 context.
All reactions