New to Kestra?
Use blueprints to kickstart your first workflows.
Search GitHub repositories across an organization with Kestra, convert results to JSON, and log the most starred repo. Automate GitHub data collection in YAML.
id: github-search
namespace: company.team
tasks:
- id: top_kestra_repos
type: io.kestra.plugin.github.repositories.Search
query: "org:kestra-io"
visibility: PUBLIC
sort: STARS
order: DESC
- id: to_json
type: io.kestra.plugin.serdes.json.IonToJson
from: "{{ outputs.top_kestra_repos.uri }}"
- id: log_json
type: io.kestra.plugin.core.log.Log
message: "{{ read(outputs.to_json.uri) | jq('.name') | first }}"
Pull a live snapshot of a GitHub organization's repositories without writing a custom API client. This blueprint queries the GitHub Search API for every public repo in an org, sorts them by star count, converts the results into clean JSON, and logs the name of the most popular project. It solves the common problem of turning ad hoc gh CLI calls and scratch scripts into a repeatable, observable workflow you can schedule, audit, and extend.
top_kestra_repos task (io.kestra.plugin.github.repositories.Search) runs the query org:kestra-io with visibility: PUBLIC, sort: STARS, and order: DESC, returning repositories ranked from most to least starred.to_json task (io.kestra.plugin.serdes.json.IonToJson) converts the Ion output stored at outputs.top_kestra_repos.uri into standard JSON for easy parsing.log_json task (io.kestra.plugin.core.log.Log) reads the JSON, applies jq('.name'), takes the first entry, and logs the name of the top repository.The GitHub API has no built-in scheduler, retry logic, or run history. Kestra adds declarative YAML, event and schedule triggers, automatic retries on rate limits or transient failures, full execution lineage, and outputs that pass cleanly between tasks. You get a durable, observable record of every search instead of a one-off command in your terminal.
This blueprint targets public repositories and requires no secrets or authentication. To raise rate limits or query private repos, add a GitHub token via the plugin's authentication properties.
query value to your own org, for example org:your-org.to_json output to view the full ranked list.io.kestra.plugin.core.trigger.Schedule trigger to refresh daily.