# 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, 0 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 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 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

Download the OpenAPI definition: https://api.apify.com/v2/actors/1V9iBQKgqoEFgqAfl/builds/MGUxTEqAxAb3fImtK/openapi.json
