redhat-developer / redhat-developer/rhdh-plugins
Extend the scorecard github module with some new metrics
Open
@imykhno is already working on this.
Since Jun 19, 2026.
enhancement
feature
triaged
workspace/scorecard
- Dominant language
- TypeScript
- Stars
- 48
- Forks
- 120
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 337
Description
Scorecard is a backstage plugin and the GitHub module for scorecard lives in folder workspaces/scorecard/plugins/scorecard-backend-module-github. For the new metrics only code changes in this folder should be neccessary.
The GitHub module creates already this metric:
- Currently Open PRs already exist.
Add this metrics for Issues/PRs:
- Currently Open issues. This is the number of open issues (not PR) at the time the metric is calculated.
- Opened issues. This is the number of opened issues in the last 7 days.
- Opened PRs. This is the number of opened PRs in the last 7 days.
- Closed issues. This is the number of opened issues in the last 7 days.
- Closed PRs. This is the number of opened PRs in the last 7 days.
All these metrics for PRs:
- Time to Review is the time that PRs takes from creation (PR create time) until the first pullrequestreview was added, independend if the pullrequestreview status. This metric should fetch all PRs (open and closed) that was updated in the last 7 days. PRs without any pullrequestreview should be ignored.
- Time to Approve is the time that PRs takes from creation (PR create time) until the first pullrequestreview has the status approved. This metric should fetch all PRs (open and closed) that was updated in the last 7 days. PRs without any pullrequestreview should be ignored.
- Time to Merge is the time that PRs takes from creation to merged. This metric should fetch all merged PRs that was updated in the last 7 days. Closed PRs without merge should be ignored.
- First time CI status pass rate for the last 7 days and the last 24 hours. This metrics should check the CI status for PRs that was opened in the last 7 days or last 24 hours. It was succesful when all CI statuses was green for the last commit of the first push to a PR.
And this metrics for GitHub Actions:
- Number of started actions in the last 7 days.
- Number of successfully finished actions in the last 7 days. Ignore actions that are pending, running, canceled, etc.
- Number of failed actions in the last 7 days. Ignore actions that are pending, running, canceled, etc.
- Two metrics for Ratio of successful vs successful+failed actions, once for the last 7 days and one for the last 24 hours. Ignore actions that are pending, running, canceled, etc.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.