webuildorg / webuild-repos

:hash: get a list of open source repositories in any city from github
MIT License
0 stars 1 forks source link

organisation repositories are not picked up? #5

Closed sayanee closed 8 years ago

sayanee commented 9 years ago

E.g. Location is Singapore, Star > 50 https://github.com/jollygoodcode/dasherize

cc @winston

winston commented 8 years ago

Is it working now? 😍

sayanee commented 8 years ago

@winston hhmmm doesn't seem to provide an API to search by location of organisations https://developer.github.com/v3/orgs/. I'm thinking whether a static list of organisations is good. Need to investigate a little more. :thought_balloon:

sayanee commented 8 years ago

eh? how come i closed it? sorry it was wrongly closed :sob:

winston commented 8 years ago

eh? how come i closed it? sorry it was wrongly closed

Ah haha I thought you solved it. Actually I was trying to find the code in webuild that does this. Can you point me to the file?

winston commented 8 years ago

Does this help? https://api.github.com/search/users?q=type:org+location:Singapore

sayanee commented 8 years ago

thank you @winston!

The current code that searches for repositories based on some criteria is here

We also used to have static list of users features and that feature could be brought back to list organisations this time. Here's the full code at that point of history, the static file and the relevant function that adds the static list of users to all users.

The functions goes like this:

function insertWhiteList(searchedUsers,whitelistUsers){

  whitelistUsers.forEach(function(whitelistUser) {
    var found = searchedUsers.filter(function(searchedUser){
        return searchedUser.login === whitelistUser.login;
      });
    if (found.length === 0) {
      //console.log("adding.. ", whitelistUser.login);
      searchedUsers.push(whitelistUser);
    }
  });
  return searchedUsers;
}
sayanee commented 8 years ago

Does this help? https://api.github.com/search/users?q=type:org+location:Singapore

:heart_eyes: yeah we found it!! Awesome will query it with your API query now. Dynamic API query is always better for magical discovery than static.

winston commented 8 years ago

:bow:

winston commented 8 years ago

I am actually interested to see which are the local companies that are actively giving back to open source (whatever language it is). They deserve a medal. :trophy:

sayanee commented 8 years ago

til thanks to @winston that there are 543 organisations contributing to open source! We must totally add them. Thank you so much!!

sayanee commented 8 years ago

LOL Yes more medals and chocolates :candy:

notthetup commented 8 years ago

:shipit:

cheeaun commented 8 years ago

:chocolate_bar:

sayanee commented 8 years ago

Before:

before

After:

after

cheeaun commented 8 years ago

:clap: :heart_eyes:

sayanee commented 8 years ago

:chocolate_bar: :ship: :shipit: :candy: :trophy: Shipped to production :tada:

image