Appendix: RepoSense with GitHub Actions

You can use GitHub Actions (together with other GitHub tools) to automate the generating and publishing of RepoSense reports.

Setting up

The instructions below assume you are using GitHub pages to host your report.

Step 1 Fork the publish-RepoSense repository using this link. Optionally, you can rename the fork to match your RepoSense report e.g., project-code-dashboard.

Step 2 Activate GitHub Actions on the forked repository:

  1. Go to the Actions page of your fork of the publish-RepoSense repo.
  2. Click on the green button that says I understand my workflows, go ahead and enable them to enable GitHub Actions on your new repository.

Step 3 Update report configuration:

In your fork, edit run.sh (and if applicable, repo-config.csv, author-config.csv, group-config.csv) to customize the command line parameters or repositories to be analyzed.

Step 4 View the generated report:

To access your regenerated RepoSense report, go to the settings of your fork in GitHub, under GitHub Pages section, look for Your site is published at [LINK]. It should look something like https://[YOUR_GITHUB_ID].github.io/publish-RepoSense. GitHub Setting

There is also a published GitHub Action (reposense-action) that can be used to generate and publish RepoSense reports. It is especially convenient for users who wish to skip the forking and setting up of a separate repository. For more information, refer to the usage description.

Updating the report

Manual:

  • You can trigger GitHub to re-generate and re-deploy the report by pushing an empty commit to your fork.
  • Currently, the GitHub Actions UI does not support the manual execution of workflows.

Automated: GitHub actions can be set to run periodically.

  1. Edit the .github/workflows/main.yml and uncomment the schedule: section.
  2. You may change the expression after cron: to a schedule of your choice. Read more about cron syntax here.
  3. Commit your changes.