An actions-powered dashboard to get an overview of your organization's open source repository health.
The dashboard provides a quick overview of your organization's public repositories. It fetches data from the GitHub API using actions and displays it in a github pages site. The dashboard provides the following information about your repositories:
- License information
- Issue and PR counts
- Metrics around response times for issues and PRs
Check out the live demo here.
You will need to fork this repository into your org. Alternatively, you can clone this repository and push it to your org.
Since we use the GitHub API and actions to generate the data, you will need to enable actions for the repository. You can do this by going to the Actions
tab in the repository and enabling actions.
You will need to set a secret in the repository settings. The secret is a GitHub token that has admin read access to the organization. You can create a token by going to Settings
-> Developer settings
-> Personal access tokens
and creating a new token with the following scopes.
- read:org
- read:repo
- read:project
Note
To fetch collaborator counts, you need to provide a token that is an admin of the organization.
The secret should be named GRAPHQL_TOKEN
. You can set this for your repository in Settings
-> Secrets and variables
-> Actions
.
We use the PEPY API to fetch package download data. In order to fetch this data you will need an API key from PEPY.
You can set this key in the repository secrets as PEPY_API_KEY
.
There is a config.yml
located in the root of the project that contains the configuration for the project. The configuration is as follows:
---
# The GitHub organization name
organization: 'github-community-projects'
# An ISO 8601 date string representing the date to start fetching data from
since: '2024-02-22'
# Path of the github pages site. i.e. github-community-projects.github.io/org-metrics-dashboard
# This will typically be "/{REPOSITORY_NAME}" if you are hosting on GitHub pages
basePath: '/org-metrics-dashboard'
organization
: The name of the organization you want to fetch data from.since
: The date to start fetching data from. This is useful if you want to fetch data from a specific date.basePath
: Important. This is the path where the site will be hosted. If you are hosting the site on GitHub pages, you will need to set this to the repository name for links and assets to work correctly.
This project is split into two parts:
- app: the code for the frontend
- backend: the code for the backend and fetcher
Both are written in TypeScript. We use npm workspaces to manage the dependencies between the two projects.
- Node.js 20.X or later
- npm
You will need a .env
file in the root of the project:
cp .env.example .env
The GRAPHQL_TOKEN
token requires the following scopes:
- read:org
- read:repo
- read:project
Note
To fetch collaborator counts, you need to provide a token that is an admin of the organization.
The PEPY_API_KEY
must be set in the .env
file to fetch package download data.
npm i
This will kick off both the fetcher and the app.
npm run dev
If you wish to run the backend only:
npm run dev:backend
If you wish to run the app only:
Note that you need to provide a valid
data.json
file in theapp/src/data
directory in order to render the app.
npm run dev:app
This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.
Check out the CODEOWNERS file to see who to contact for code changes.
If you need support using this project or have questions about it, please open an issue in this repository and we'd be happy to help. Requests made directly to GitHub staff or the support team will be redirected here to open an issue. GitHub SLA's and support/services contracts do not apply to this repository.
Looking for more resources for your open source program office (OSPO)? Check out the github-ospo
repo for a variety of tools designed to support your needs.