Parallel icon
Request icon
Write icon
Script icon
AIAgent icon
Log icon
SlackIncomingWebhook icon
Schedule icon
GoogleGemini icon

AI Daily GitHub Repo Healthcheck to Slack

Scheduled pipeline that pulls GitHub issues, PRs, and Actions runs in parallel, filters KPIs in Python, and posts a Gemini-written daily brief to Slack.

Categories
AI

Start every morning knowing exactly what happened in your repository. This Kestra blueprint calls three GitHub REST endpoints in parallel, merges the responses in internal storage, filters activity to a configurable time window with Python, and computes KPIs: new issues, closed issues, opened and merged pull requests, and failed workflow runs. An AI agent then turns those raw lists into a short, prioritized markdown brief with a "Plan of Attack" for the team, delivered to Slack before standup. The whole run is protected by retries on flaky HTTP calls, an execution SLA, and a Slack failure alert.

How it works

  1. The every_morning trigger (io.kestra.plugin.core.trigger.Schedule) runs the flow daily at 08:00.
  2. The run_parallel task (io.kestra.plugin.core.flow.Parallel) fires three io.kestra.plugin.core.http.Request calls at once: recent issues, pull requests, and Actions workflow runs for inputs.github_repo. Each request retries exponentially up to 3 attempts and is allowed to fail without killing the run.
  3. The concatenate_data task (io.kestra.plugin.core.storage.Write) merges the three response bodies into one JSON document in internal storage, defaulting any failed call to an empty array.
  4. The filter_prep_metrics task (io.kestra.plugin.scripts.python.Script) loads that file, keeps only items created or updated within inputs.window_hours, projects noisy API objects down to useful fields, and emits five KPI lists via Kestra.outputs.
  5. The ai_day_brief task (io.kestra.plugin.ai.agent.AIAgent) prompts gemini-3.5-flash-lite to write a markdown summary limited to the most pressing items, always citing issue and PR ids, followed by a proposed plan of attack.
  6. log_output records the brief and post_to_slack (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) delivers it. An errors branch alerts Slack on any failure, and a MAX_DURATION SLA cancels runs exceeding 10 minutes.

What you get

  • A daily, prioritized repo digest with concrete issue and PR references, not a raw activity dump.
  • Parallel API fan-out with per-request retries and graceful degradation when an endpoint fails.
  • Python-computed KPIs you can reuse in dashboards via flow outputs.
  • Built-in operational guardrails: SLA cancellation, failure alerting, and full logs of the model prompt.

Who it's for

  • Engineering leads who want a morning summary of open source or internal repo activity.
  • DevOps teams tracking CI health through failed workflow run trends.
  • Developer productivity teams piloting AI summaries on top of existing GitHub data.

Why orchestrate this with Kestra

A cron script hitting the GitHub API has no retry policy, no partial-failure story, and no place to put the AI step. Kestra composes the pipeline declaratively: Parallel fans out the HTTP calls, pluginDefaults applies a single retry and header policy to every request, internal storage passes the merged JSON to Python without temp-file hacks, and the AIAgent task makes the LLM call observable and retryable like any other task. SLA and errors handling turn a best-effort script into a monitored daily service.

Prerequisites

  • A public GitHub repository, or a token added to the request headers for private repos and higher rate limits.
  • A Slack incoming webhook URL for the destination channel.
  • A Google AI Studio API key with access to Gemini models.

Secrets

  • GEMINI_API_KEY: Google Gemini API key used by the AIAgent task.
  • SLACK_WEBHOOK: Slack incoming webhook URL for the brief and failure alerts.

Quick start

  1. Add the secrets above to your Kestra namespace.
  2. Set github_repo to your repository and adjust window_hours to your reporting window.
  3. Run the flow manually once and review the brief in the logs and in Slack.
  4. Leave the every_morning schedule on, or change the cron to match your standup time.

How to extend

  • Add an Authorization: Bearer header via pluginDefaults to raise GitHub rate limits and cover private repos.
  • Loop over multiple repositories with io.kestra.plugin.core.flow.ForEach and merge briefs into one org-wide digest.
  • Push the KPI lists to a warehouse table for trend dashboards alongside the Slack post.
  • Open a Jira or Linear ticket automatically when failed_runs exceeds a threshold.
  • Swap Gemini for OpenAI or Anthropic by changing the AIAgent provider block.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.