# GitHub Repo Weekly Summary (Claude) (`tjgarcia0427/repo-weekly-summary`) Actor

Pulls the last N days of commits, merged PRs, and closed issues from a GitHub repo and generates a structured Markdown summary. Bilingual (English/French). Optional auto-post to Slack or Discord. Powered by Anthropic Claude with prompt caching.

- **URL**: https://apify.com/tjgarcia0427/repo-weekly-summary.md
- **Developed by:** [Tristan Garcia](https://apify.com/tjgarcia0427) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $200.00 / 1,000 summary completeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Repo Weekly Summary

Generates a Markdown narrative summary of any GitHub repo's last N days
of activity — commits, merged PRs, closed issues — bilingual (English /
French). Optionally posts the summary to Slack or Discord via webhook.
Powered by Anthropic Claude with prompt caching.

### What it does

1. Takes a repo name (`owner/name`) and a lookback window
2. Pulls the last N days of commits, closed issues, and merged PRs from
   GitHub's REST API
3. Deduplicates merge commits, drops PRs from the `/issues` endpoint,
   filters to the exact time window
4. Hands the cleaned data to Claude for a narrative summary with 4
   sections (Overview, Highlights, By the numbers, What to watch)
5. Pushes the structured record to the default dataset
6. (Optional) Posts the rendered Markdown to a Slack or Discord webhook

### Input

```jsonc
{
  "repo": "pallets/click",                         // required, owner/name
  "days": 7,                                        // 1-90
  "language": "en",                                 // en | fr
  "anthropicApiKey": "sk-ant-...",                  // optional; falls back to heuristic if absent
  "model": "claude-sonnet-4-20250514",
  "githubToken": "ghp_...",                         // optional; raises rate limits, enables private repos
  "destination": "dataset",                          // dataset | slack | discord
  "slackWebhookUrl": "https://hooks.slack.com/...",  // required if destination=slack
  "discordWebhookUrl": "https://discord.com/..."     // required if destination=discord
}
````

### Output

Dataset record:

```json
{
  "repo": "pallets/click",
  "since": "2026-05-04T22:50:00+00:00",
  "until": "2026-05-11T22:50:00+00:00",
  "language": "en",
  "mode": "llm",
  "counts": {"commits": 18, "merged_prs": 7, "closed_issues": 3},
  "markdown": "**Weekly summary — pallets/click**\n_Week of 2026-05-04 to 2026-05-11_\n\n### Overview\n…"
}
```

### Typical use cases

- **Engineering manager weekly digest** — schedule the Actor every
  Friday at 5pm, destination=slack, watch your team's progress land in
  the channel automatically.
- **OSS maintainer release notes** — run on demand for any tag-to-tag
  window, paste the Markdown into a release.
- **Investor / stakeholder update** — bilingual (FR) is useful for
  European stakeholders.
- **Personal accountability** — run on your own repo every week to
  see what you actually shipped.

### Pricing

Pay-Per-Event: charged once per completed summary, regardless of
how many commits/issues/PRs are summarized. Specifics on the Actor's
Store page.

(Developer note: SDK fires `Actor.charge('summary-completed')` once per
run. Configure the unit price in
Console → Actor → Publication → Pricing.)

### What about the n8n version?

There's also an open-source n8n workflow with the same logic, available
at `github.com/claude-builders-bounty/claude-builders-bounty/pull/799`.
This Apify Actor is for users who don't want to run n8n themselves —
zero infrastructure, just click Run.

### Scheduling

In the Apify Console, open this Actor → **Schedules tab** → **Create
new schedule**. Set a cron expression (`0 17 * * 5` = Fridays at 5pm)
and the same input you'd use for an on-demand run. Apify runs it on
their compute, you pay only the Pay-Per-Event charge per run.

# Actor input Schema

## `repo` (type: `string`):

The repo to summarize, e.g. pallets/click. Public repos work without a token.

## `days` (type: `integer`):

How many days back to scan. 7 is the typical weekly cadence.

## `language` (type: `string`):

Language for the rendered summary. en = English, fr = French.

## `anthropicApiKey` (type: `string`):

Required for the LLM-narrative summary. Leave blank to fall back to a deterministic heuristic summary (no API cost).

## `model` (type: `string`):

Anthropic model ID to use when an API key is set. Only consulted in LLM/hybrid modes.

## `githubToken` (type: `string`):

Optional PAT for higher rate limits or private repos. Public repos work without one.

## `destination` (type: `string`):

dataset = just push to Apify dataset (default). slack/discord = also POST to the configured webhook.

## `slackWebhookUrl` (type: `string`):

Required if destination=slack.

## `discordWebhookUrl` (type: `string`):

Required if destination=discord. Discord truncates messages over 2000 chars; the Actor handles that for you.

## Actor input object example

```json
{
  "repo": "pallets/click",
  "days": 7,
  "language": "en",
  "model": "claude-sonnet-4-20250514",
  "destination": "dataset"
}
```

# 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 = {
    "repo": "pallets/click"
};

// Run the Actor and wait for it to finish
const run = await client.actor("tjgarcia0427/repo-weekly-summary").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 = { "repo": "pallets/click" }

# Run the Actor and wait for it to finish
run = client.actor("tjgarcia0427/repo-weekly-summary").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "repo": "pallets/click"
}' |
apify call tjgarcia0427/repo-weekly-summary --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=tjgarcia0427/repo-weekly-summary",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GitHub Repo Weekly Summary (Claude)",
        "description": "Pulls the last N days of commits, merged PRs, and closed issues from a GitHub repo and generates a structured Markdown summary. Bilingual (English/French). Optional auto-post to Slack or Discord. Powered by Anthropic Claude with prompt caching.",
        "version": "0.1",
        "x-build-id": "MGUxTEqAxAb3fImtK"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/tjgarcia0427~repo-weekly-summary/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-tjgarcia0427-repo-weekly-summary",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/tjgarcia0427~repo-weekly-summary/runs": {
            "post": {
                "operationId": "runs-sync-tjgarcia0427-repo-weekly-summary",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/tjgarcia0427~repo-weekly-summary/run-sync": {
            "post": {
                "operationId": "run-sync-tjgarcia0427-repo-weekly-summary",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "repo"
                ],
                "properties": {
                    "repo": {
                        "title": "GitHub repo (owner/name)",
                        "pattern": "^[^/]+/[^/]+$",
                        "type": "string",
                        "description": "The repo to summarize, e.g. pallets/click. Public repos work without a token."
                    },
                    "days": {
                        "title": "Lookback window (days)",
                        "minimum": 1,
                        "maximum": 90,
                        "type": "integer",
                        "description": "How many days back to scan. 7 is the typical weekly cadence.",
                        "default": 7
                    },
                    "language": {
                        "title": "Output language",
                        "enum": [
                            "en",
                            "fr"
                        ],
                        "type": "string",
                        "description": "Language for the rendered summary. en = English, fr = French.",
                        "default": "en"
                    },
                    "anthropicApiKey": {
                        "title": "Anthropic API key (optional)",
                        "type": "string",
                        "description": "Required for the LLM-narrative summary. Leave blank to fall back to a deterministic heuristic summary (no API cost)."
                    },
                    "model": {
                        "title": "Claude model",
                        "enum": [
                            "claude-sonnet-4-20250514",
                            "claude-opus-4-20250514",
                            "claude-haiku-4-5-20251001"
                        ],
                        "type": "string",
                        "description": "Anthropic model ID to use when an API key is set. Only consulted in LLM/hybrid modes.",
                        "default": "claude-sonnet-4-20250514"
                    },
                    "githubToken": {
                        "title": "GitHub token (optional)",
                        "type": "string",
                        "description": "Optional PAT for higher rate limits or private repos. Public repos work without one."
                    },
                    "destination": {
                        "title": "Where to deliver the summary",
                        "enum": [
                            "dataset",
                            "slack",
                            "discord"
                        ],
                        "type": "string",
                        "description": "dataset = just push to Apify dataset (default). slack/discord = also POST to the configured webhook.",
                        "default": "dataset"
                    },
                    "slackWebhookUrl": {
                        "title": "Slack webhook URL (optional)",
                        "type": "string",
                        "description": "Required if destination=slack."
                    },
                    "discordWebhookUrl": {
                        "title": "Discord webhook URL (optional)",
                        "type": "string",
                        "description": "Required if destination=discord. Discord truncates messages over 2000 chars; the Actor handles that for you."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
