GSA / code-gov-web

DEPRECATED 🛑- Federal Source Code policy implementation.
Other
407 stars 108 forks source link

Browse Projects repository count is incorrect - includes Exempted repos. #682

Closed RicardoAReyes closed 6 years ago

RicardoAReyes commented 6 years ago

The Browser Projects repository count is incorrect. The total count includes exempted repositories which is incorrect. exempted projects should not count towards the total because only OpenSource and GovernmentWideReuse repos are exposed to the public on Code.gov.

URL: https://code.gov/#!/browse-projects

screen shot 2018-10-12 at 7 59 17 am

How to replicate:

  1. Visit Browse Projects URL: https://code.gov/#!/browse-projects Notice that the repository count total, 5237 (Oct 12, 2018).
  2. Under the Usage Type select Open Source. Notice the repository count on the footer of the page, 3759.
  3. Deselect Open Source under the Usage Type, and then select Government-Wide Reuse. Notice the repository count on the footer of the page, 1139.
  4. Adding the Open Source + Government-Wide Reuse totals = 4898.

repo-count

Expected Result: The repository total count should only add the Open Source and Government-Wide Reuse repos.

GenevieveFlynn commented 6 years ago

We(Me and @samuelgassman7) investigated the front end and discovered that the API was not filtering correctly meaning that it does not filter by usageType and it returns all of the repositories that have been indexed by the API.

screen shot 2018-10-13 at 2 47 07 pm

https://api.code.gov/repos?permissions.usageType=opensource&permissions.usageType=governmentwidereuse githubissue

RicardoAReyes commented 6 years ago

Confirmed that the issue is an API problem with @froi