civictechindex / CTI-website-frontend

Join a worldwide movement to catalog 
every open source 
civic tech project.
https://civictechindex.org
MIT License
30 stars 30 forks source link

Projects not showing up under individual org page for index contributors #1113

Open bruceplai opened 2 years ago

bruceplai commented 2 years ago

Dependency

Overview

For orgs that are tagged as index contributors in the Civic Tech Organizations page, when you click on some of them, no projects show up under the individual org page. As index contributors, they should have projects tagged with "civictechindex"

Action Items

fyliu commented 2 years ago

Just some info from a quick search on github.com.

  1. Code for Buffalo is the index contributor that returns no projects http://civictechindex.org/organization/code-for-buffalo
  2. Code For Buffalo does have a project with the "civictechindex" tag https://github.com/search?p=4&q=topic%3Acivictechindex&type=Repositories
  3. Code For Buffalo uses the tag "buffalo" in projects, rather than some variations like "hack-for-la" or "code-for-kc" Screenshot from 2022-01-07 21-45-21
  4. Here are the queries we're using to retrieve the organization's projects with "civictechindex". Notice we don't use "buffalo". Screenshot from 2022-01-07 21-42-57
  5. Here's a query that does return the correct result, but it uses the CodeForBuffalo github user (it works without the org:CodeForBuffalo that's also in this query) https://github.com/search?q=org%3ACodeForBuffalo+topic%3Acivictechindex+user%3ACodeForBuffalo
  6. There's a "github_user" field in the backend organization model that's available to use for this case. Or maybe just use the github_user instead of the organization tag variations. But I don't know if there are cases that require those.
ExperimentsInHonesty commented 2 years ago
  1. We do want to encourage the proper use of affiliation tags. So we have the following rules

    • We don't list someone under their org in the contributors section unless they use one of the various of the tags that we accept. For example, we would not accept Buffalo because other orgs might use that. We will accept code-for-buffalo, codeforbuffalo, code4buffalo.
  2. If people use codeforamerica or code-for-america or code4america but don't use their org affiliation tag how do we know that the repo is not a code for america project?

  3. We need a script that runs against the api to find everyone who uses the civictechindex tag but who does not have affiliation tag, or is missing a affiliation tag (e.g., code for buffalo uses codeforamerica and buffalo, so they would end up on the list of exceptions the script would write because we don't expect that codeforamerica has repos on contributors, so each entry needs to be manually verified).

    • Any new entry to the exceptions list should open a new issue, letting us know
    • repo name
    • repo url
    • topic tags
    • and instructions or opening an issue on their repo with advice on how to properly tag their repo
  4. We need to let them know during the tag generator that they need to use an affiliation tag in order to appear on the contibutors page. But not to appear on the search page

bruceplai commented 2 years ago

@cnk please see Bonnie's clarification of current affiliation tag issues above. Let me know if we need to discuss how to tackle them. Thanks

cnk commented 2 years ago

I think we need to clarify that "they need to use an affiliation tag" means "The organization needs their repositories tagged with a topic (that is GH's word for our 'tags') that is one of our recognized variations on their name".

I suspect several of our current 'contributors' will need to update their tagging - but it's hard to say if we don't have good data for the org tags. Before I modify our 'update_contributors' script with this new restriction, let's get the data import from #1036 done. Then the issues are likely to be useful / valid.

fyliu commented 2 years ago

This should be split into new issues

  1. [frontend current issue] This is exactly what the frontend has been doing. This hidden repo behavior was what triggered the current issue to be created.

  2. [frontend question] We can query the repo's organization to see whether it belongs to codeforbuffalo or codeforamerica. This is what the linked pull request is doing. If the user clicks to see Code For Buffalo's repos, it does a query for topic:civictechindex and org:CodeForBuffalo. I think this solution addresses the current issue correctly if we want to show the repos under the correct org.

  3. [backend new issue] This is what cnk is addressing above

  4. [frontend new issue] This is a frontend issue since it involves the tag generator. Run the queries in the frontend to display what's appropriate.

fyliu commented 2 years ago

Here's the expected behavior discussed at the 1/27 meeting: The backend script should NOT mark an affiliated org as index contributor unless it has a repo that contains BOTH 'civictechindex' and a proper org affiliation topic tag. So, in the case of Code for Buffalo, rather than having it show up as index contributor and have an empty page, we would not want to show the organization at all if the index contributor filter is on.

Question/clarification: For non-affiliated orgs, we require only that the 'civictechindex' topic tag be present for the org to be an index contributor?

bruceplai commented 2 years ago
  1. Progress - not much progress on front end since last update
  2. Blockers - need to make instructions more clear in tag generator for orgs to set their affiliation tags in their projects (Is there an issue for this?). Also awaiting data migration in #1036 and back end logic updates for flagging orgs as contributors.
  3. Availability - 2 days this week
  4. ETA - pending blockers