HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
wong2
first-commit
HTML2015–2015
wong2 / first-commit

first-commit

(deprecated) a service to find the first commit of a repo, built with koa.js

2Distinct people
2Mentions
0Explicit recommenders
68GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

(deprecated) a service to find the first commit of a repo, built with koa.js

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour2 dated mentions

Observed mentions: 2015-11-22 14:44:26 UTC to 2015-11-22 15:08:33 UTC.

012015-11-22 14:00:00 UTC to 2015-11-22 15:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 22, 14:002015-11-22 15:00:00 UTC to 2015-11-22 16:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 22, 15:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Nov 22, 14:002015-11-22 14:00:00 UTC2015-11-22 15:00:00 UTC101
Nov 22, 15:002015-11-22 15:00:00 UTC2015-11-22 16:00:00 UTC101

What Hacker News says

2 sources
I think wonderfuly's reply missed the point of the question which is to explain it without having someone dissect the source code line by line. Anyways, I did a quick look at the source file[1] and it looks like it depends on the assumption of github returning 35 commit titles per page. From that, it divides total # of commits by 35 to derive the url for the last page containing the 1st commit. (The url you'd arrive at if you if you repeatedly clicked the "Older" button on github to get to the final page which contains the 1st commit.) It then scrapes that url for relevant data. (It uses the cheerio library to help with scraping.) I'm not familiar enough with github's HTML navigation and page formatting to know if this method is fragile or robust. Github does offer an API[2] so it may be possible to get the 1st commit that way instea
Read the rest
d of scraping HTML that was intended for display in a web browser. Excerpt of the arithmetic: function getFirstPageUrl(repo, num_of_commits) { const COMMITS_PER_PAGE = 35; var first_page = Math.ceil(num_of_commits / COMMITS_PER_PAGE); return `${BASE_URL}/${repo}/commits?page=${first_page}`; } [1]https://github.com/wong2/first-commit/blob/master/app/github... [2]https://developer.github.com/v3/git/commits/
In Show HN: First Commit – find the first commit of any GitHub project

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.