Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions docs/analytics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import ContributorMetricsCharts from "@site/src/components/analytics/Contributor

<CountmeAnalyticsCharts />

## Contributor Metrics

<ContributorMetricsCharts />

## Methodology, Privacy & Opt-Out

### Counting Methodology
Expand Down Expand Up @@ -59,19 +63,13 @@ brew analytics off

See the [Homebrew analytics documentation](https://docs.brew.sh/Analytics) for additional details.

## Contributor Metrics

### Contributor Metrics

<ContributorMetricsCharts />

### Contributor Metrics Methodology

Contributor analytics adopt a CNCF DevStats and LFX-derived methodology:

- **4 summary metrics and 3 trend charts:** Tracking monthly active human contributors, first-time contributors, pull request merge rate, and median turnaround time alongside historical trends for contributor cohorts, activity breakdowns, and PR velocity.
- **Public GitHub dataset with automated bot and AI agent filtering:** Metrics are derived from public GitHub activity while strictly filtering automated bots, dependency managers, and autonomous AI agents to ensure counts represent real human open-source participation.
- **Activity Streams on Tier-1 repositories:** Activity streams track the 9 tier-1 repositories on a shared domain to provide clear visibility into development velocity across code and builds, code reviews, issues, and documentation.
- **4 summary metrics and 3 trend charts:** Tracking monthly active human contributors (merged PR authors), first-time contributors, pull request merge rate, and human throughput alongside historical trends for contributor cohorts, activity breakdowns, and PR velocity.
- **Public GitHub dataset with automated bot and AI agent filtering:** Metrics are derived from public GitHub activity across the entire `projectbluefin` organization while strictly filtering automated bots, dependency managers, and autonomous AI agents to ensure counts represent real human open-source participation.
- **Organization-wide activity streams:** Activity streams track merged pull requests and issues across all public repositories in `projectbluefin` on a shared domain.
- **Community forum discussions:** Community discussions are hosted at [ublue-os/bluefin](https://github.com/ublue-os/bluefin/discussions).

For real-time development and organizational velocity metrics across all 15 factory repositories, see the [Factory metrics view](/factory/metrics).
Expand Down
6 changes: 3 additions & 3 deletions scripts/contributor-charts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ test("renders full contributor analytics metrics and charts", () => {
assert.ok(html.includes("93%")); // Latest merge rate (2026-09)
assert.ok(html.includes("290")); // Latest human merged PRs (2026-09)
assert.ok(html.includes("Active Human Contributors Trend"));
assert.ok(html.includes("Human Contribution Types Breakdown"));
assert.ok(html.includes("Contribution Activity Streams"));
assert.ok(
html.includes("PR Velocity &amp; Merge Rate") ||
html.includes("PR Velocity & Merge Rate"),
Expand All @@ -240,12 +240,12 @@ test("renders full contributor analytics metrics and charts", () => {
);
assert.ok(
html.includes(
"Activity breakdown by contribution stream across Tier-1 repositories",
"Monthly activity breakdown by contribution stream across projectbluefin",
),
);
assert.ok(
html.includes(
"Pull request opening velocity, merges, and median turnaround time",
"Monthly pull request velocity and merge efficiency across projectbluefin",
),
);
});
Expand Down
75 changes: 17 additions & 58 deletions src/components/analytics/ContributorMetricsCharts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,7 @@ export default function ContributorMetricsCharts({
trigger: "axis",
},
legend: {
data: [
"Code & Builds",
"Code Reviews",
"Issues & Triage",
"Documentation",
],
data: ["Merged PRs", "Issues & Triage"],
right: 8,
top: 6,
textStyle: { fontSize: 12 },
Expand All @@ -341,43 +336,22 @@ export default function ContributorMetricsCharts({
},
series: [
{
name: "Code & Builds",
name: "Merged PRs",
type: "line",
lineStyle: { color: cat[0] ?? "#4285f4", width: 2 },
itemStyle: { color: cat[0] ?? "#4285f4" },
data: gapSafe(codeBuildsSeries),
},
{
name: "Code Reviews",
type: "line",
lineStyle: { color: cat[1] ?? "#22306b", width: 2 },
itemStyle: { color: cat[1] ?? "#22306b" },
data: gapSafe(codeReviewsSeries),
},
{
name: "Issues & Triage",
type: "line",
lineStyle: { color: cat[2] ?? "#5c7bd1", width: 2 },
itemStyle: { color: cat[2] ?? "#5c7bd1" },
data: gapSafe(issuesTriageSeries),
},
{
name: "Documentation",
type: "line",
lineStyle: { color: cat[3] ?? "#3f5aa4", width: 2 },
itemStyle: { color: cat[3] ?? "#3f5aa4" },
data: gapSafe(docsSeries),
},
],
};
}, [
theme,
monthLabels,
codeBuildsSeries,
codeReviewsSeries,
issuesTriageSeries,
docsSeries,
]);
}, [theme, monthLabels, codeBuildsSeries, issuesTriageSeries]);

// Series for Chart 3: PR Velocity & Merge Rate (Opened vs Merged, median days to merge)
const prsOpenedSeries = useMemo(() => {
Expand Down Expand Up @@ -414,12 +388,12 @@ export default function ContributorMetricsCharts({
trigger: "axis",
},
legend: {
data: ["PRs Opened", "PRs Merged", "Median Days to Merge"],
data: ["PRs Opened", "PRs Merged"],
right: 8,
top: 6,
textStyle: { fontSize: 12 },
},
grid: { left: 48, right: 48, top: 40, bottom: 32, containLabel: true },
grid: { left: 48, right: 24, top: 40, bottom: 32, containLabel: true },
xAxis: {
type: "category",
data: monthLabels,
Expand All @@ -432,11 +406,6 @@ export default function ContributorMetricsCharts({
minInterval: 1,
splitLine: { show: true },
},
{
type: "value",
name: "Days",
splitLine: { show: false },
},
],
series: [
{
Expand All @@ -453,17 +422,9 @@ export default function ContributorMetricsCharts({
itemStyle: { color: cat[2] ?? "#5c7bd1" },
data: gapSafe(prsMergedSeries),
},
{
name: "Median Days to Merge",
type: "line",
yAxisIndex: 1,
lineStyle: { color: cat[4] ?? "#89a3f0", width: 2, type: "dashed" },
itemStyle: { color: cat[4] ?? "#89a3f0" },
data: gapSafe(medianDaysSeries),
},
],
};
}, [theme, monthLabels, prsOpenedSeries, prsMergedSeries, medianDaysSeries]);
}, [theme, monthLabels, prsOpenedSeries, prsMergedSeries]);

const currentMonthLabel = latestMeasuredMonth?.month ?? "current";

Expand Down Expand Up @@ -559,31 +520,29 @@ export default function ContributorMetricsCharts({
<section className={styles.chartCard}>
<div className={styles.chartHeader}>
<Heading as="h3" className={styles.chartHeading}>
Human Contribution Types Breakdown
Contribution Activity Streams
</Heading>
<p className={styles.currentValue}>
<strong>
{(
latestMeasuredMonth?.streams?.codeBuilds ??
latestMeasuredMonth?.streams?.humanPrs ??
0
).toLocaleString("en-US")}
{(latestMeasuredMonth?.streams?.humanPrs ?? 0).toLocaleString(
"en-US",
)}
</strong>{" "}
code contributions · {currentMonthLabel}
human merged PRs · {currentMonthLabel}
</p>
</div>
<EChart
option={chart2Option}
title="Human Contribution Types Breakdown"
title="Contribution Activity Streams"
summary={
latestMeasuredMonth
? `Human activity breakdown for ${currentMonthLabel} across Code & Builds, Code Reviews, Issues & Triage, and Documentation.`
? `Activity volume for ${currentMonthLabel} across Merged PRs and Issues.`
: "accumulating data"
}
points={chart2PointsCount}
minPoints={3}
height={300}
tableCaption="Activity breakdown by contribution stream across Tier-1 repositories"
tableCaption="Monthly activity breakdown by contribution stream across projectbluefin"
/>
</section>

Expand All @@ -602,14 +561,14 @@ export default function ContributorMetricsCharts({
option={chart3Option}
title="PR Velocity & Merge Rate"
summary={
mergeRate !== null
? `${mergeRate}% PR merge rate in ${currentMonthLabel}.`
latestMeasuredMonth
? `Pull request throughput for ${currentMonthLabel}: ${latestMeasuredMonth.streams?.prsOpened ?? 0} opened, ${latestMeasuredMonth.streams?.prsMerged ?? 0} merged.`
: "accumulating data"
}
points={chart3PointsCount}
minPoints={3}
height={300}
tableCaption="Pull request opening velocity, merges, and median turnaround time"
tableCaption="Monthly pull request velocity and merge efficiency across projectbluefin"
/>
</section>
</div>
Expand Down
Loading