How to set repository's social media preview via Github API?

363 Views Asked by At

I am working on a project where I want to set the social media preview for multiple (lots of repositories) I own. I know there is a manual way to do it as mentioned here. I was wondering if there was some way to do it via Github API or what kind of scripting could automate the task for adding social previews to multiple repositories.

1

There are 1 best solutions below

0
On

If it was doable via the API, it'd almost certainly be one of the parameters at https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#update-a-repository. It's not there as of the time of this writing, but maybe someday.

There's sort of a feature request at https://github.com/orgs/community/discussions/32166. It's unclear if there's a better place to make an API feature request.