Zum Inhalt springen
Search the hub

← All suppliers

Workplace

GitHub

Dev platform: repo/PR/issue/workflow meta — API load, PII and delivery measures; no source-code dump.

Templates only — grain, filters, custom fields and ownership are firm-specific.

Copy formulas into the KPI Definition Card, then adapt grain and filters.

Example

PRs merged

How many pull requests were merged in the period?

COUNT(*) FROM pull_request WHERE merged_at IS NOT NULL AND merged_at IN period
Grain
Merged pull request
Fields
PullRequest.merged_at, PullRequest.state, PullRequest.user.login, Repository.full_name
Dimensions
org, repo, author, state

merged_at set = merged; count closed-without-merge separately.

Adapt: Optionally exclude bot authors (dependabot).

Example

PRs opened

How many pull requests were opened in the period?

COUNT(*) FROM pull_request WHERE created_at IN period
Grain
Opened pull request
Fields
PullRequest.created_at, PullRequest.user.login, Repository.full_name
Dimensions
org, repo, author, state

created_at; clarify draft PRs (draft=true) in the definition.

Adapt: Only default_branch-target PRs as delivery proxy.

Issues opened

How many issues were opened in the period?

COUNT(*) FROM issue WHERE created_at IN period AND pull_request IS NULL
Grain
Opened issue
Fields
Issue.created_at, Issue.state, Repository.full_name
Dimensions
org, repo, author, state

GitHub Issues API may mix PRs — filter pull_request field.

Adapt: Bug vs feature via labels as extra dim.

Workflow failures

How many workflow runs failed in the period?

COUNT(*) FROM workflow_run WHERE conclusion = 'failure' AND created_at IN period
Grain
Failed workflow run
Fields
WorkflowRun.conclusion, WorkflowRun.name, WorkflowRun.created_at, Repository.full_name
Dimensions
org, repo, workflow, state

conclusion=failure; cancelled/timed_out separately.

Adapt: Failure rate = failures / completed runs.

Active repos

How many repos had push/PR activity in the period?

COUNT(DISTINCT repository.id) WHERE pushed_at IN period OR pr.created_at IN period
Grain
Repository with activity
Fields
Repository.id, Repository.full_name, Repository.pushed_at, PullRequest.created_at
Dimensions
org, repo

Activity via pushed_at and/or PR/issue events — lock definition.

Adapt: Optionally exclude archived=false and forks.

Formula overview

Same formulas as a table — copy into KPI cards or SQL drafts.

Label Formula Grain Fields
PRs merged COUNT(*) FROM pull_request WHERE merged_at IS NOT NULL AND merged_at IN period Merged pull request PullRequest.merged_at, PullRequest.state, PullRequest.user.login, Repository.full_name
PRs opened COUNT(*) FROM pull_request WHERE created_at IN period Opened pull request PullRequest.created_at, PullRequest.user.login, Repository.full_name
Issues opened COUNT(*) FROM issue WHERE created_at IN period AND pull_request IS NULL Opened issue Issue.created_at, Issue.state, Repository.full_name
Workflow failures COUNT(*) FROM workflow_run WHERE conclusion = 'failure' AND created_at IN period Failed workflow run WorkflowRun.conclusion, WorkflowRun.name, WorkflowRun.created_at, Repository.full_name
Active repos COUNT(DISTINCT repository.id) WHERE pushed_at IN period OR pr.created_at IN period Repository with activity Repository.id, Repository.full_name, Repository.pushed_at, PullRequest.created_at

Tour