Embed your repos

In the spirit of GitHub integration (see my last post), meet Gitview. It’s a framework-agnostic widget written in raw JavaScript that lists your repositories, participation, watchers, and forks. It is configurable, too! Paginate repos, add custom styles, and to show or hide forks.

How it works

Upon load, Gitview makes an XHR request for user data, repo data, and participation data via a specific github.com url based on the provided user and repository names. GitHub hasn’t exposed participation data via the api yet, but plans to. Until then, requests funnel through a simple proxy via my vps. Immediately after issuing the request, the various UI elements render to the page, and refresh as soon as data returns. The rest of the functionality is straight forward. The participation graphs are rendered using a simple canvas script I wrote called Gitgraph.

Going forward

As I said in my last post on gitgraph, the proxying github data is not the cleanest thing to do. I plan to drop the proxy that as soon as Github exposes their participation data publically. Until then, no plans other than general maintainence. Feel free to fork and pull.

Demo gitgraph now

Posted on

Newer ยท Older