VChet / StyleBase

UserCSS theme sharing site

Home Page:https://stylebase.cc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get "last updated" attribute per-style instead of per-repo

RiedleroD opened this issue · comments

All of my styles are displayed as "updated 4 days ago", and while this does increase visiblilty of my styles, which is nice, it doesn't represent them very well. E.g. Dark Grimm hasn't been updated in over a year, and is technically abandoned.

Git itself doesn't store file timestamps. The last modified date showed on GitHub is being parsed through commit history, but it's not available via GitHub API.

To get the last modified datestamp manually, it requires to request a list of all repository commits(1), then request data of each commit(2), and then look for a specific file in a changed files list.
It will greatly increase the number of requests to GitHub and request rate limit will be reached even with a small list of repositories.

I'm not going to implement it with the said logic. Maybe someday it will be added to GitHub API or someone will prove me wrong and show me how to get it from the current API in an easier way.

well shucks. Would've been pretty neat, but yeah, that's a pretty solid argument to not implement it. I'm gonna look into the API for a bit anyway, mostly because I'm interested, but also because two pairs of eyes are always better than one.

edit: unsurprisingly, I didn't find anything