# GitHub Issue Insights (`focuzd/github-issue-insights`) Actor

GitHub Issue Insights is an Apify Actor that transforms GitHub issues into clear, structured, and multilingual insights.

- **URL**: https://apify.com/focuzd/github-issue-insights.md
- **Developed by:** [Anubhav Kokane](https://apify.com/focuzd) (community)
- **Categories:** AI, Automation
- **Stats:** 1 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🐞 GitHub Issue Insights

### 🚀 Overview

**GitHub Issue Insights** is an Apify Actor that transforms GitHub issues into clear, structured, and multilingual insights.

🎯 Who Is This For?

- **Contributors** looking for actionable issues (including Good First Issues) in their native language.
- **Maintainers** who want quick clarity on decisions, gaps, and next steps
- **Global Teams** bridging language barriers in open-source collaboration.
- **Project Managers** needing quick summaries of complex issues.

***

### ✨ Features

- **📥 Reliable Issue Fetching:** Uses GitHub API to retrieve issue title, description, comments, and linked Pull Requests.

- **🎭 Role-Based Analysis:** Tailors insights specifically for **Contributors** (technical depth) or **Maintainers** (project impact).

- **🧠 Context-Aware AI Analysis:** Leveraging **Google Gemini**, it analyzes the issue *along with* the repository's `README.md` and `CONTRIBUTING.md` to extract:
  - Issue category (Bug / Feature / Improvement)
  - Severity level
  - Technical context (language, framework) with confidence scores
  - Contributor difficulty & required skills
  - Decisions made, unresolved gaps, and open questions
  - Clear, actionable next steps

- **🌍 Multilingual Insights:** Using **Lingo.dev**
  - Human-readable fields are translated using Lingo.dev
  - Technical metadata, keys, URLs, and labels remain unchanged
  - Supports languages like Spanish, French, Hindi, and more

- **✅ Structured Output:**
  - Returns a well-defined JSON schema
  - Designed for automation, dashboards, and further processing
  - Safe defaults with explicit inference disclaimers

***

### 🛠️ Input Parameters

| Field | Type | Description | Required | Default |
| :--- | :--- | :--- | :--- | :--- |
| `issue_url` | String | Full URL of a public GitHub issue | ✅ | - |
| `target_language` | String | ISO language code (`en`, `es`, `fr`, `hi`, etc.) | ✅ | `en` |
| `target_audience` | String | Analysis perspective: `contributor` or `maintainer`. | ✅ | `contributor` |
| `include_linked_prs`| Boolean| Include detailed status of PRs linked to the issue. | ❌ | `false` |
| `output_format` | String | Desired format: `json` or `markdown` (currently outputs structured JSON). | ✅ | `json` |
| `gemini_api_key` | String | API key from [Google AI Studio](https://aistudio.google.com/) | ✅ | - |
| `lingo_api_key` | String | API key from [Lingo.dev](https://lingo.dev/) | ✅ | - |
| `github_pat` | String | GitHub Personal Access Token (for private repos or higher rate limits). | ❌ | - |

***

### 📦 Output Example

Below is a shortened example of the structured output (translated to Spanish):

```json
{
  "issue_data": {
    "state": "open",
    "assignees": [],
    "linked_pull_requests": []
  },
  "target_audience": "contributor",
  "issue_analysis": {
    "type": "Bug",
    "severity": "High",
    "labels": ["bug", "urgent"]
  },
  "tech_context": {
    "language": "JavaScript",
    "framework": "React",
    "confidence": 0.95
  },
  "summary": {
    "issue": "El usuario reporta un fallo al hacer clic en el botón de guardar...",
    "discussion_sentiment": "Frustrado pero constructivo",
    "discussion": "Varios desarrolladores han confirmado el error en la versión 2.1..."
  },
  "contributor_info": {
    "good_first_issue": true,
    "difficulty": "Low",
    "skills": ["React", "CSS"]
  },
  "decisions_and_gaps": {
    "decisions": ["Se decidió revertir el commit anterior."],
    "gaps": ["Faltan pruebas unitarias para este componente."],
    "open_questions": ["¿Afecta esto a la versión móvil?"]
  },
  "next_steps": [
    "Reproducir el error en el entorno local.",
    "Crear un caso de prueba fallido."
  ],
  "language": "es",
  "data_sources": {
      "issue_description": true,
      "comments": true,
      "repository_files": ["README.md", "CONTRIBUTING.md"]
  }
}
```

***

### ⚙️ How It Works

1. **Fetch:** Parses the issue URL and retrieves issue data, comments, and repository context (`README.md`, `CONTRIBUTING.md`) using the GitHub API.
2. **Analyze:** Sends the consolidated context to **Google Gemini**, prompting it to extract structured insights tailored to the selected `target_audience`.
3. **Translate:** Translates only human-readable fields using **Lingo.dev**, preserving technical accuracy.
4. **Deliver:** Stores the final structured output in the Apify dataset.

***

### 📝 Notes

- **Public repositories** work out-of-the-box.
- **Private repositories** are supported if you provide a `github_pat`.
- Analysis quality depends on the clarity of the issue and discussion.
- Repository files (`README.md`, `CONTRIBUTING.md`) are read to provide better context to the AI.
- Technical context is inferred and includes **confidence scores**.
- Each output explicitly includes `data_sources` and `inference_notice` for transparency.

# Actor input Schema

## `issue_url` (type: `string`):

The full URL of the public GitHub issue you want to analyze (e.g., https://github.com/facebook/react/issues/12345).

## `target_language` (type: `string`):

ISO 639-1 language code for the analysis output (e.g., 'es' for Spanish, 'hi' for Hindi, 'fr' for French, 'de' for German).

## `target_audience` (type: `string`):

Who is this analysis for? Select 'Contributor' for implementation details or 'Maintainer' for architectural oversight.

## `include_linked_prs` (type: `boolean`):

Whether to include linked pull requests in the analysis.

## `gemini_api_key` (type: `string`):

Required for AI analysis. You can get a free API key from Google AI Studio (https://aistudio.google.com/).

## `lingo_api_key` (type: `string`):

Required for high-quality technical translation. Generate your token at https://lingo.dev/.

## `github_pat` (type: `string`):

(Optional)Used for higher rate limits in API calls.

## Actor input object example

```json
{
  "issue_url": "https://github.com/apify/apify-sdk-js/issues/2372",
  "target_language": "en",
  "target_audience": "contributor",
  "include_linked_prs": false
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "issue_url": "https://github.com/apify/apify-sdk-js/issues/2372",
    "target_language": "en"
};

// Run the Actor and wait for it to finish
const run = await client.actor("focuzd/github-issue-insights").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "issue_url": "https://github.com/apify/apify-sdk-js/issues/2372",
    "target_language": "en",
}

# Run the Actor and wait for it to finish
run = client.actor("focuzd/github-issue-insights").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "issue_url": "https://github.com/apify/apify-sdk-js/issues/2372",
  "target_language": "en"
}' |
apify call focuzd/github-issue-insights --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,focuzd/github-issue-insights"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/vFCIG2R509g1NcooW/builds/ZwgYXiT0fQ1aRriMu/openapi.json
