Skip to content

Display languages for projects that have 2 or more repos #5160

@JessicaLucindaCheng

Description

@JessicaLucindaCheng

Dependency

Overview

We need to change the code for displaying the language data so that it can display languages for projects that have 2 or more repositories (repos).

Action Items

Developer

  • Understand how the website is currently getting languages data for projects 12
  • In the _projects/civic-tech-index.md 3, change additional-repo-ids from
    additional-repo-ids: '275296439'
    
    to
    additional-repo-ids:
      - 275296439
    
  • With the change you made above to additional-repo-ids, change the code to work with the 2 or more repos.
  • Check your code meets the Acceptance Criteria below
Acceptance Criteria
  • Code still works for any projects with only 1 repository (repo).
    • A project's markdown file that only has a non-empty identification field and no additional-repo-ids field.
    • A project's markdown file with a non-empty identification field and an empty additional-repo-ids field.
  • Code for any projects with 2 or more repos
    • Possible scenario: A project has 2 repos, so the project's markdown file has a non-empty identification field and the additional-repo-ids field has 1 repo listed.
    • Possible scenario: A project has 3 or more repos, so the project's markdown file has a non-empty identification field and an additional-repo-ids field with 2 or more repos listed.
  • When displaying languages for a project, the same languages are not listed multiple times. For example, if a project has HTML as a language in two repos, its list of languages when displayed on the website should only list HTML once.
  • On the Projects page 4,
    • The filters work properly
    • The languages and contents on the cards remain the same as on the live website
  • After all the code changes, check the Languages listed for the detailed Civic Tech Index project page matches the one on the live website 5
  • Also, check other project's detailed pages to make sure everything looks and works okay
  • Nothing is broken on the website due to your code changes

Merge Team

  • Once the pull request associated with this issue is merged, go to Rollout Plan: Change code to read data from multiple project repositories #6138 and
    • Check off this issue under the Dependency section
    • If all the issues in Phase 1 of the Dependency section are checked off, move each of the issues in Phase 2 of the Dependency section to the New Issue Approval column and apply a ready for prioritization label to each of those issues.

Resources/Instructions

Footnotes

  1. Wiki: How languages are added to the project variable

  2. Previous issue Allow for project "languages" to be pulled from multiple repositories #3805 and its pr Pulls languages from multiple repos #5037 that the work for this issue should be built upon. (Note: Due to code changes, please look at the actual files in the codebase for the most current code.) Also, look at Refactor secondRepoId for clarity #5231 for the refactor of variables and fields.

  3. _projects/civic-tech-index.md

  4. Projects page

  5. Civic Tech Index page

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Status

In progress (actively working)

Relationships

None yet

Development

No branches or pull requests

Issue actions