Schedule icon
Request icon
If icon
Write icon
Query icon
Log icon

Weekly GitHub Repository Stats Report with DuckDB

Fetch the most starred repositories of a GitHub user or organization, save the stats as CSV and summarize them per language with DuckDB.

Categories
CoreData

Track the popularity of any GitHub user or organization without a token, account or secret. This blueprint calls the public GitHub Search API for the most starred repositories of an owner, saves stars, forks and open issues into a CSV file and sums them per programming language with an in-memory DuckDB query.

How it works

  1. The weekly_schedule trigger (io.kestra.plugin.core.trigger.Schedule) runs the flow every Monday at 08:00 UTC.
  2. fetch_repositories (io.kestra.plugin.core.http.Request) calls the GitHub Search API for the owner and top inputs, with exponential retries.
  3. check_repositories_found (io.kestra.plugin.core.flow.If) continues only when the owner exists and has public repositories. Otherwise log_no_repositories logs a warning.
  4. save_csv (io.kestra.plugin.core.storage.Write) stores one row per repository as a CSV file in internal storage.
  5. summarize_languages (io.kestra.plugin.jdbc.duckdb.Query) reads the CSV in memory and sums stars, forks and open issues per language.
  6. log_report (io.kestra.plugin.core.log.Log) writes the ranking and the language summary into the execution log.

What you get

  • A weekly ranking of the most starred repositories in the execution log.
  • A per-language summary of stars, forks and open issues.
  • A CSV file with the statistics, downloadable from the save_csv task outputs.
  • A clear warning instead of a confusing failure when the owner name is wrong.

Who it's for

  • Open source maintainers who follow the growth of their projects.
  • Developer relations teams that compare organizations in the same space.
  • Anyone new to Kestra who wants an HTTP, DuckDB and conditional-branching example without any credentials.

Why orchestrate this with Kestra

A script with curl has no retries, no run history and no place to keep the CSV. Kestra gives the pipeline scheduling, retries, conditional branching, file outputs and a full execution history in one declarative flow.

Prerequisites

  • No secrets are required. The unauthenticated GitHub Search API allows 10 requests per minute per IP address, which is plenty for a weekly report.
  • The summarize_languages task needs the DuckDB plugin (io.kestra.plugin.jdbc.duckdb), which is included in the Kestra full image.

Inputs

  • owner (STRING, default kestra-io): GitHub user or organization name.
  • top (INT, default 10): number of most starred repositories, from 1 to 100.

Outputs

  • save_csv: CSV file with the statistics, available as {{ outputs.save_csv.uri }} in the task outputs.

Quick start

  1. Save the flow in your Kestra instance.
  2. Click Execute and set owner to the user or organization you want to follow.
  3. Open the execution logs to see the ranking and download the CSV from the save_csv task outputs.
  4. Leave the weekly_schedule trigger enabled, or set disabled: true to run the flow manually only.

How to extend

  • Add an Authorization header with a GitHub token secret to raise the API rate limit.
  • Send the ranking to Slack, Discord or email instead of only logging it.
  • Append each CSV to a warehouse table to build a star history.
  • Alert when a repository gains or loses more stars than a threshold since the previous week.

Links

Orchestrate with Kestra
Orchestrate DuckDB with Kestra
Share this Blueprint
See How

New to Kestra?

Use blueprints to kickstart your first workflows.