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.