API for repository's wiki

From my understanding and experience, you cannot use GitHub API’s to interact with a repository’s wiki.

Given that the wiki is git-backed I assumed that calls to the API using the following would work:

{
owner: 'owner',
repo: 'repository.wiki'
}

However, but these result in 404 s. (at least for this method).

I truly think having this would open the doors to having automatically updated wiki pages. (leaderboards or statistics pages are just some examples).

Are there any plans for exposing at least a subset of the API (to enable a getReference -> createTree -> createCommit -> updateRef flow) for wikis as well anytime in the future?

5 Likes

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the How to use Git and GitHub board. No action is needed on your part; you can continue the conversation as normal here.

1 Like

There currently aren’t any plans to add API support for wikis, no. You can automatically update wikis however by writing scripts that use Git to update them.

I hope that helps!

I was already employing that approach, successfully.

The main “behind-the-scenes” reason I posted this question was in light of the rise of serverless computing services over the last years.

Most, if not all serverless running environments don’t expose git as a readily available resource. However, in the case of AWS Lambda functions, I managed to bypass this by installing the binary version of git on each function call.

This installation, among all remote interactions with github via git can become a bit computationally heavy in the case of simple actions, adding an overhead.

Instead, I reckon a direct API call would be the go-to option for most developers that find themselves in similar scenarios.

Anyway, thanks for the prompt reply!

1 Like

Any changes in plans after a year?

12 Likes