resume / resume.github.com

Resumes generated using the GitHub informations
https://resume.github.com
62.01k stars 1.36k forks source link

Not a true reflection, not by a long shot. #73

Open trans opened 11 years ago

trans commented 11 years ago

So I had a look at my github resume and it's rather a sad thing to see. Only a few projects listed and a couple of organizations, none of which are related to my primary work on github. I am the creator and maintainer of over 100 projects, but they do not appear under my personal account (I use that as only a scratch pad, so to speak). Rather, all my maintained projects appear under various organizations of which I am an owner. e.g. http://github.com/rubyworks.

This seems to be common problem with lots of 3rd party github tools. They totally overlook the projects people work on and maintain that are not found directly in there personal account repos.

I hope you can fix.

davidcoallier commented 11 years ago

Unfortunately without server-side processing and time, this isn't something that can be fixed easily using the Github API :(( I've had that concern myself many times, I'm waiting and hoping things will change at some point from the API side.

trans commented 11 years ago

Why can't it use: http://developer.github.com/v3/orgs/ ?

davidcoallier commented 11 years ago

There were limitations last we looked, but I can't remember now which means I'll take a look at seeing whether or not this is possible now! :) :+1:

trans commented 11 years ago

:+1: Awesome. I hope it can! (I think github resume is a really great idea btw.)

kevinrenskers commented 11 years ago

Agreed, almost all of the open source projects I work on are on my employer's Github account, but I contribute using my own Github account of course. Some third party tools correctly see these contributions, but not many (this included).

trans commented 11 years ago

So I decided to take a quick stab at this, thinking it shouldn't be too hard to pull down a user's org repos. Ran into an problem though with async behavior. What I did was copy github_uesr_repos to create:

var github_org_repos = function(org, callback, page_number, prev_data) {
    var page = (page_number ? page_number : 1),
        url = 'https://api.github.com/orgs/' + org + '/repos?callback=?',
        data = (prev_data ? prev_data : []);

    if (page_number > 1) {
      url += '&page=' + page_number;
    }
    $.getJSON(url, function(repos) {
        data = data.concat(repos.data);
        if (repos.data.length > 0) {
            github_org_repos(org, callback, page + 1, data);
        } else {
            callback(data);
        }
    });
}

I don't quite get the pagination part, but I figured I'd just go with it. So then I figure all we need to do is combine the user repos with all the users org repos, so tried to write that:

var github_all_user_repos = function(username, callback) {
    var repos = {};
    github_user_repos(username, function(user_repos) {
        repos.concat(user_repos);
        github_user_orgs(username, function(orgs) {
            $.each(orgs.data, function(i, org) {
                github_org_repos(org, function(org_repos) {
                    repos.concat(org_repos);
                }
            }
        }
    }
}

But the problem is I have no place to call callback, because the org repos are being loaded in a loop of async calls. I worry about a race condition on repos too (though I read somewhere that isn't an actual concern in callback code --so I am not sure).

Any ideas how to handle this?

certik commented 11 years ago

Indeed, I was about to create an issue about this myself. My best repositories and projects that I started usually live their own life under their own organization. So my own github profile only shows projects that didn't take off yet... => the resulting resume is not accurate at all.

u2 commented 8 years ago

I have added contributions section, but this is imperfect. You can see it http://resume.github.io/?u2 . There are more works to do:

  1. Duplicate repo with own repo (eg: u2/grape-present_cache)
  2. Missing org repo (eg: resume/resume.github.com)
  3. forked repo

I am glad to see more pull requests.