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
18 changes: 17 additions & 1 deletion services/libs/tinybird/pipes/organizations_filtered.pipe
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
DESCRIPTION >
Provides filters for organizations
Provides filters for organizations.
Only returns organizations that have at least one code contribution (commits, PRs, code
reviews), matching what the organization page dashboard actually renders. Organizations
with only non-code activity — or that were deleted in CDP but are still stale in Tinybird —
are excluded so search never links to an empty org dashboard.

NODE organizations_code_contributors
DESCRIPTION >
Distinct organizations that have at least one code contribution activity, sourced from the
precomputed org-page timeseries (already filtered to isCodeContribution activity types).

SQL >
SELECT DISTINCT organizationId
FROM org_page_activities_timeseries_copy_ds
WHERE organizationId != ''

NODE organizations_filtered_0
SQL >
Expand All @@ -11,6 +25,8 @@ SQL >
organizations_populated_slug.slug AS slug,
organizations_populated_slug.contributionCount AS contributionCount
FROM organizations_populated_slug
INNER JOIN organizations_code_contributors
ON organizations_populated_slug.id = organizations_code_contributors.organizationId
where
1 = 1
{% if defined(slug) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ DESCRIPTION >
- Performs search across four entity types using shared `search` parameter and returns up to configurable results per type.
- Combines results from `collections_filtered`, `insightsProjects_filtered`, `activityRepositories_filtered`, and `organizations_filtered` pipes.
- Filters out inactive projects (with 0 organizations and 0 contributors) to ensure relevant search results.
- Filters out organizations with no code contributions (via `organizations_filtered`) so search never links to an empty org dashboard.
- Orders results by relevance: collections by project count, projects by contributor count, repositories alphabetically, organizations by contribution count.
- Primary use case: powering global search functionality and autocomplete dropdowns across the platform.
- Parameters:
Expand Down
Loading