What is Repo Health Job?

The repo health job is a script written to parse all the repositories of given organizations by running the repo health checks on each repository. It generates the summary yaml file against each repository after running the mentioned checks on the repository.
The job also has an additional feature of combining all the yaml files into a single csv file to generate a repo health dashboard and push the data to a specific google spread sheet which makes it easier to monitor and review the changes at any time.

What is it used for?

Right now, 2U has setup a scheduled workflow build using the provided template workflow which is triggered daily and updates the repo health dashboard with the updated data about all the edx and openedx repositories.
The repo health dashboard is currently being used by the tech-arch-bom team to plan and upgrade the repositories across organizations.

Why did we move from Jenkins to GitHub Actions?

Previously, the repo health job was running as a scheduled Jenkins job but for making it easier for Axim and other community organizations to use the job for their respective organizations and repositories, it has been moved to GitHub Action workflows.

How does the job currently work?

Right now, different components of the repo health job workflow are working as following:

  1. The reusable repo health job workflow is present inside the openedx/.github repo and it can be referenced from any repo by any organization using the provided template.

  2. The reusable workflow triggers the bash script to run the repo health checks which is present in the openedx/edx-repo-health repository. The script executes all the repo_health_checks present in the repo on all the repositories of the given organizations.

How can you setup the repo health job for your organization?

To setup the repo health job to run against your organization, you need to follow the steps mentioned below:

Setup the scheduled workflow
Setup the repo health secrets
Provide the needed arguments to the schedule workflow

How to customize checks for your needs?

edx_repo_health_branch parameter can be used to test custom changes of the script on the repositories. This can be helpful when you

By default, the build run triggered against a custom branch other than master doesn’t commits changes to the repository. If you want your changes to be committed to the target repo after running against the custom branch, you’ll need to update the branch comparison condition from master to custom-branch.