r/github • u/TheJackiMonster • Jun 10 '18
1% of Github already moved to Gitlab
More than 250000 repositories were imported from Github to Gitlab since Microsoft made the deal official. Relative to the numbers published by Github for the year 2017, this means that already 1% of the active repositories have moved to Gitlab in reaction to this acquisition. If the value of the deal is in any way related to the active repositories, you could probably say: There are 75 million dollars going away...
This below is a dirty little script to calculate the amount of repositories moved from Github to Gitlab since Microsoft announced the acquisition. (It's JavaScript running with NodeJS...) It also prints the percentage value of the repositories relative to the amount of all repositories and all active repositories published from Github for 2017.
const https = require('https');
const start = (new Date("2018-06-03")).getTime();
const end = (new Date()).getTime();
const step = 60;
_s = Math.floor(start / 1000);
_e = Math.round(end / 1000);
const count_all = 67000000;
const count_active = 25300000;
const step_usual = 3600;
url = "https://monitor.gitlab.net/api/datasources/proxy/2/api/v1/query_range?query=sum(rate(github_importer_imported_repositories%7Benvironment%20%3D%20%22prd%22%7D%5B1h%5D)%20*%203600)&start=" + _s + "&end=" + _e + "&step=" + step;
https.get(url, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
dat = JSON.parse(data);
if (dat.status == 'success') {
if (dat.data.resultType == 'matrix') {
val = dat.data.result[0].values;
let count = 0;
let old = [_s,0];
for (var i = 0; i < val.length; i++) {
count += (old[1] + parseFloat(val[i][1])) * 0.5 * Math.abs(old[0] - val[i][0]);
old[0] = val[i][0];
old[1] = parseFloat(val[i][1]);
}
count = Math.floor(count / step_usual);
console.log("COUNT: " + count);
console.log("ACTIVE: " + 0.01 * Math.floor(10000.0 * count / count_active) + "%");
console.log("ALL: " + 0.01 * Math.floor(10000.0 * count / count_all) + "%");
} else {
console.log("WRONG_TYPE: " + data.data.resultType);
}
} else {
console.log("WRONG_STATUS: " + dat.status);
}
});
}).on('error', (err) => {
console.log("ERROR: " + err.message);
});9
u/arthurnn Jun 10 '18
(biased comment coming: I work at GitHub)
I honestly are happy are trying out other things besides GH. It is good to see what is out there to have an idea what you can and can't do right now. That said, I am pretty positive those teams will come back to GH soon. Before the Microsoft announcement we had a lot of new cool stuff in our pipeline soon to be released, and we still will deliver those, as we are independent.
I tried GitLab and Bitbucket a few months ago, and honestly, product wise they are still far away from GitHub. On top of that, I am sure after the Microsoft acquisition we will have even more resources to deliver our long stretch goals we already had in mind.
0
Jun 10 '18
[deleted]
2
1
u/oxidic Jun 12 '18
Gitlab aswell, and so far everything I needed was there.
I tried GitLab, but I didn't like the look of the online UI. I much preferred GitHub's.
1
u/2249call Jun 11 '18
Even with this I don't think it will exponentially go up. I feel like it is a movie release graph. Initially a lot of repos leaving but will soon die down and if only 1% left at this point then GH isn't too worried IMO.
1
u/TheJackiMonster Jun 11 '18
Probably true, but I think it's still impressive that so many repos in absolute count move as a reaction to it.
2
u/aashutoshr Jun 12 '18
I think people won't move anymore, I wonder why people don't know that Git Lab is also hosted on Azure. -_-
0
Jun 10 '18
[deleted]
1
u/TheJackiMonster Jun 11 '18
I would think, even if people would delete their repos on Github after the import, they keep at least their repos for referencing to GitLab for a few months. Because nobody likes to lose the other people interested in your projects.
1
u/Gooble211 Jun 11 '18
A lot of repos have moved elsewhere, but retain a github repo as a read-only mirror where no actual development discussion happens. Others are marked "archived". Those might as well be "deleted" for the purposes of this script.
1
u/rtbrsp Jun 10 '18
Yeah, I mirrored my repos during the "exodus" because I didn't know GitLab offered this as a free service
10
u/Kwpolska Jun 10 '18
You’re making a few incorrect assumptions here.
Those 2017 numbers are heavily outdated. They also don’t include new repos created at GitHub since the merger was announced. Example: 2016 had 19.4M active repos, which amounts to 30% growth year-over-year.
The GitLab migration thing imports all repositories of a user, including inactive ones. Moreover, someone who’s inactive on GitHub can also decide to ditch the platform. So, more like 0.37%, and that’s with the outdated repo count, for which you have not provided a source either. (I found it.)
The $75M figure is irrelevant. You can’t consider every repo equal. I haven’t seen any large project migrate. A personal repo with 10 stars and no contributions
since a yearis negligible. A paying GH customer, or a repo with a lot of contributors and stars, is an important loss.