Webhook icon
OutputValues icon
Parallel icon
Request icon
Script icon
Docker icon
ChatCompletion icon
Assert icon
Switch icon
Write icon

Open-Source Issue Readiness & Contribution Planner

Assess one GitHub issue with repository context, a deterministic readiness score, and implementation and testing plans in a structured JSON report.

Categories
AICoreInfrastructure

Assess one GitHub issue before coding. Parallel GET requests collect the issue, first ten comments, repository metadata, README, and related issue/PR references. One Python task decodes and trims context; OpenAI returns schema-constrained analysis. Native Kestra tasks parse/check the result, add its component scores, classify readiness with Switch, and save a structured JSON contribution plan.

Prerequisites and secrets

  • Kestra with Core, Python Script/Docker runner, and OpenAI plugins; a Docker-capable worker for python:3.12-slim and access to GitHub, OpenAI, and the image registry. Python uses only the standard library; no pip dependencies are installed.
  • GITHUB_TOKEN: fine-grained token for the target repository with read-only Contents, Issues, Pull requests, and Metadata permissions.
  • OPENAI_API_KEY: access to gpt-4o-mini with structured output support.
  • GITHUB_WEBHOOK_KEY: long random secret protecting the webhook URL.

Inputs and setup

  • repository: required STRING, default kestra-io/kestra, in owner/repo format.
  • issue_number: required INT, minimum 1, no default; PR numbers are rejected.
  • max_related_results: required INT, default 5, range 1-10. Configure the secrets, import the flow, and execute manually with a real issue. Alternatively POST JSON such as {"repository":"kestra-io/kestra","issue_number":123} to https://<kestra>/api/v1/<tenant>/executions/webhook/company.team/open-source-issue-readiness-contribution-planner/<key>. Replace the example issue and secret key. The custom webhook payload maps to flow inputs only for webhook runs; manual inputs are unchanged. The response returns execution metadata immediately, not the finished report.

Scores and outputs

Components: scope clarity 0-25, repository context 0-20, testing clarity 0-20, dependency clarity 0-20, acceptance clarity 0-15. JSON Schema enforces integer ranges; native assertions reject missing/out-of-range scores rather than clamping. Kestra sums them: 80-100 is READY, 50-79 NEEDS_CLARIFICATION, 0-49 BLOCKED. The model cannot supply the total or status. Component judgments may vary between runs; arithmetic and classification are deterministic. Complexity is separate. Flow outputs are readiness_status, readiness_score, assessment (JSON), and report (JSON file URI, {{ outputs.write_report.uri }} inside the flow). assessment.analysis contains the five-component score breakdown, complexity, summary, likely areas, blockers, questions, implementation steps, and testing plan. The report also includes issue identity, related work, and context limitations.

Limits and failure behavior

Context caps: issue body 8,000 characters, README 6,000, each comment/related body 1,000. Search looks for the issue number in issue/PR bodies, keeps at most max_related_results, and is heuristic, not exhaustive linkage or duplicate detection. Contribution guides, source files, CI configuration, and later comments are not read. Invalid inputs, required GitHub request failures, authentication/rate-limit errors, invalid JSON, and failed assertions stop execution without a readiness report. README 404 means missing evidence; empty issue bodies/comments/search results are handled explicitly. The AI schema supplies field/type/list constraints.

Security

GitHub access is GET-only; no repository/issue mutation or automatic comments. Context is untrusted data, never executable Python. The selected text is sent to OpenAI and retained in Kestra outputs; use approved repositories and keep the webhook URL secret. API costs/rate limits apply. A readiness score is advisory: verify proposed code areas/tests and coordinate with maintainers, especially for closed or assigned issues and archived repositories. These concerns do not override score thresholds.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.