GitHub | Issues, PRs, Discussions & Releases Exporter

piknockyou
2026-01-17T10:07:31Z

Export full GitHub issues, PRs, discussions, and release notes to Markdown, HTML, or ZIP — includes all comments, reviews, diffs, and timelines. Single-page or batch export with pause/resume.

☕ If you find this tool helpful & would like to support its maintenance, please consider leaving a tip on:

https://ko-fi.com/piknockyou

Thank you! :-)

🖼 For a quick impression of this script, refer to the screenshots at the bottom.

GitHub | Issues, PRs, Discussions & Releases Exporter

The all-in-one GitHub exporter. Download release notes, generate issue/PR/discussion indexes, and export full issue, pull request, and discussion threads as Markdown — all from a single panel. Batch export entire repositories with selective picking, pause/resume support, and ZIP downloads. Perfect for LLM context, offline reference, archival, and project documentation.

Why You Need This

Working with GitHub at scale is painful:

No native bulk export: GitHub has no way to save release notes, full issue threads, PR reviews, or discussion conversations as documents

Pagination everywhere: Releases, issues, PRs, and discussions are spread across dozens of pages requiring endless clicking

Copy-paste loses everything: Manual copying breaks formatting, drops metadata, loses review comments, misses timeline events, and skips reactions

Scattered context: An issue's full story lives across the body, comments, timeline, cross-references, linked commits, and related PRs — all in different API endpoints

LLM-unfriendly: Feeding a full project history or detailed issue context to an AI assistant means hours of manual assembly

API complexity: A single PR export can require 10+ different API calls (issue data, PR details, reviews, review comments, commits, files, checks, branch rules, timeline, GraphQL enrichment)

This script talks directly to GitHub's REST and GraphQL APIs to fetch everything — release notes with full asset details, complete indexes of issues/PRs/discussions, and full thread exports with every comment, review, diff, poll, and timeline event — then packages it into clean, self-contained Markdown files.

Key Features

📥 Full Thread Export (Issues · PRs · Discussions)

Export any single issue, pull request, or discussion page as a complete, structured Markdown document.

For Issues:

Full body and all comments with author attribution

Labels, assignees, milestone, timestamps, reactions

Issue type, closed-by info, lock reason

Dependencies (blocked-by / blocking)

Sub-issues listing

Pinned comment

Minimized (hidden) comments detected via GraphQL and marked

For Pull Requests:

Everything from issues, plus:

Merge status, branch info (head → base), diff stats

Requested reviewers (users and teams)

Full review verdicts (approved, changes requested, commented, dismissed)

Inline review comments with diff hunks, grouped by file and thread

Review thread state (resolved/unresolved/outdated) via GraphQL

Merge requirements and branch protection rules

CI check runs and commit statuses

PR commits list

Changed files with optional full diff patches

Auto-merge status

For Discussions:

Full body and all comments with nested replies

Category info (General, Q&A, Ideas, etc.)

Answer highlighting for Q&A discussions

Poll questions with vote counts and percentages (via GraphQL)

Upvote counts (via GraphQL)

Minimized comments detected via GraphQL

Discussion-specific timeline events (via GraphQL)

Shared across all types:

Cross-references section: related PRs, linked issues, duplicates, referenced commits

Verbose timeline audit log (optional): label changes, renames, close/reopen, assignments, milestones, review requests, force-pushes, merges

Commit detail fetching for referenced commits (optional)

Collapsible long comments with configurable threshold

Preview mode: renders Markdown as styled HTML in a new tab with table of contents, copy button, and raw/rendered toggle

📦 Release Notes & Changelogs

API-powered fetching: Pulls all releases directly from GitHub's REST API

Full asset details: Download counts, file sizes, SHA256 digests, upload dates, auto-classified file types (Installer, macOS, Linux, Archive, Signature, Checksum, Attestation, Mobile, Source)

Rendered release notes: Markdown bodies rendered to formatted HTML using the marked library

Smart auto-linking: Automatically links #123 issue references, @username mentions, full commit SHAs, and cross-repo references within release notes

Reaction data: Emoji reactions (👍👎😄🎉😕❤️🚀👀) displayed on each release

Contributor extraction: Contributors mentioned via @mentions shown with avatars

Pre-release and draft badges: Visual indicators matching GitHub's native styling

Flexible filtering: Filter by tag glob (v1.*), tag range (v1.0.0..v2.0.0), date range (2024-01..2025-06), single year (2009), single month (2009-06), or exact tag

Single release export: On /releases/tag/ pages, export just that one release

ZIP download: One Markdown file per release, plus combined files

📋 Issues, Pull Requests & Discussions Index

Unified listing: Complete numbered index of every issue, PR, and discussion in one file

Selective export: Choose any combination via checkboxes

Range filtering: Target specific items (e.g., 1-500, 1,5,10-50) instead of fetching everything

Smart API routing: REST for issues/PRs, GraphQL for discussions; efficient GraphQL batch queries when range + token are set; direct REST lookup for small ranges without token

Status tracking: Open/closed/not planned/merged/answered with color coding

Label display: All labels shown for each item

📥 Batch Full-Content Export

Export the complete content of dozens or hundreds of issues, PRs, and discussions in one operation:

Selective picking: Interactive picker with checkboxes to choose exactly which items to export

Quick-select buttons: All, None, Invert, Issues only, PRs only, Discussions only

State filters: Filter picker by Open, Closed, Merged, Answered

Search/filter: Type to narrow the item list by title or number

Auto-indexing: If no index exists, batch export automatically runs one first

Pause/resume: Stop at any time and continue later from exactly where you left off

Rate limit resilience: Automatically pauses on rate limit, shows reset time, resumes with one click

Partial downloads: Download what you have so far even mid-export

Two output formats:

Single MD: One combined Markdown file with all items separated by dividers

ZIP: Individual .md files per item, plus a combined file and an _index.md with links

🔑 Authentication & Rate Limits

Token management: Save a GitHub Personal Access Token for higher rate limits (60 → 5,000 requests/hour) and full feature access

Persistent storage: Token and all preferences saved across sessions

Dual rate limit tracking: Separate REST (core) and GraphQL pool monitoring with real-time display

Visual indicators: Green/yellow/red dot showing API quota status

Graceful degradation: Works without a token for public repos (issues, PRs, releases); token needed for discussions and GraphQL enrichment features

🖥️ Modern Panel UI

Collapsible floating panel: Clean interface anchored at bottom-right, stays out of your way

Resizable: Drag the left edge to make the panel wider; width persists across sessions

Context-aware: Shows relevant sections based on current page (thread export on issue/PR/discussion pages, single release export on release tag pages)

3-button pattern: Consistent Start/Pause/Reset controls across all sections

Light/dark theme: Toggle with preference persistence

Debug logging: Optional per-section log viewer with copy and clear buttons

Custom tooltips: Every button and control has descriptive tooltips; section headers have detailed help tooltips with step-by-step instructions

SPA-aware: Handles GitHub's Turbo navigation seamlessly — no page refresh needed when switching repos

Help documentation: Built-in help window with full usage guide

⚙️ Granular Export Settings

Over 50 configurable flags organized by category:

Category | Controls
Content | Header, labels, assignees, milestone, timestamps, reactions, author info, comment IDs, minimized comments
Issue | Type, closed-by, lock reason, dependencies, sub-issues, pinned comment
Pull Request | Merge status, branch info, diff stats, requested reviewers, merge requirements, checks & status, reviews, review comments, thread state (GQL), group by thread, PR commits, changed files, file diffs
Discussion | Category, answer, poll, upvotes, comment replies, timeline (GQL)
References | Cross-references, same-repo refs, cross-repo refs, issues, PRs, duplicates, commits, commit detail fetching
Timeline | Cross-references, commit refs, title changes, label changes, closed/reopened, reviews, commits, merges, branch events, review requests, duplicates, project v2, subscribe events, mentioned events
Formatting | Collapsible long comments with configurable threshold

Settings are shared between single-page and batch export, and persist across sessions.

What Gets Exported

For Each Issue Thread

✅ Title, state (open/closed/completed/not planned), author, timestamps

✅ Labels, assignees, milestone

✅ Issue type (bug, feature, task) if set

✅ Closed-by user, lock reason

✅ Dependencies (blocked-by / blocking issues)

✅ Sub-issues listing

✅ Pinned comment

✅ Full body (Markdown preserved)

✅ All comments with author, timestamps, reactions

✅ Minimized comments flagged with reason

✅ Cross-references: related PRs, linked issues, duplicates, commits

✅ Timeline events: renames, label changes, assignments, milestones, close/reopen

For Each Pull Request Thread

✅ Everything from issues, plus:

✅ Merge status, merged-by user, merge date

✅ Branch info (head → base)

✅ Diff stats (+additions / -deletions / files changed)

✅ Requested reviewers (users and teams)

✅ Review verdicts (approved, changes requested, commented, dismissed)

✅ Inline review comments with diff context, grouped by file

✅ Review thread resolved/unresolved/outdated state

✅ Merge requirements and branch protection rules

✅ CI check runs and commit statuses

✅ PR commit list

✅ Changed files list with status and optional patches

✅ Auto-merge configuration

For Each Discussion Thread

✅ Title, state (open/closed), author, timestamps

✅ Category with emoji and Q&A indicator

✅ Full body with reactions

✅ All comments with nested replies

✅ Answer comment highlighted (Q&A discussions)

✅ Poll: question, options, vote counts, percentages

✅ Upvote count

✅ Minimized comments flagged

✅ Timeline events (labels, close/reopen, pin, rename, category change, cross-references)

For Each Release

✅ Release title and tag name

✅ Author with avatar, publication date

✅ Draft and pre-release flags

✅ Full release notes (rendered from Markdown)

✅ Auto-linked references (#issues, @users, SHAs, cross-repo)

✅ Emoji reactions with counts

✅ Contributors section

✅ Complete asset list: filenames, auto-detected type, file sizes, download counts, SHA256 digests, upload dates

✅ Source code archive links (zip, tar.gz)

For the Index

✅ Number, title, and direct link for each item

✅ Type classification (Issue / Pull Request / Discussion)

✅ Status (Open / Closed / Not Planned / Merged / Answered)

✅ Creation date and all labels

ℹ️ This is a metadata-only index — full content requires the thread export or batch export

Usage

Quick Start

1. Navigate to any page of a GitHub repository

2. Click the "📋 Repo Exporter" button (or "📥 Export" on thread pages) in the bottom-right corner

3. The control panel opens with sections relevant to the current page

Exporting a Single Thread

1. Navigate to any issue, PR, or discussion page
2. Click "📥 Export" to open the panel
3. Adjust settings if needed (⚙️ Export Settings)
4. Click "📥 Export to Markdown" → downloads .md file
   — or —
   Click "👁️ Preview in New Tab" → opens rendered HTML

Exporting Release Notes

1. Open the panel → Release Notes section
2. (Optional) Enter a filter: v1.*, 2024-01..2025-06, etc.
3. Click "Start"
   ↓
4. Script fetches all releases via API (shows progress)
   ↓
5. Choose output:
   🔗 HTML — open in new tab
   💾 HTML — download file
   💾 MD  — download Markdown
   📦 ZIP — one file per release

Generating an Index

1. Open the panel → Issues · PRs · Discussions section
2. Check which types (Issues ✓, PRs ✓, Discussions ✓)
3. (Optional) Set a range: "1-500"
4. Click "Start"
   ↓
5. Choose output:
   🔗 HTML — open in new tab
   💾 HTML — download file
   💾 MD  — download Markdown

Batch Full-Content Export

1. Run the index first (discovers all items)
   — or —
   Click "Export Selected" and it auto-indexes
   ↓
2. Select items in the picker (checkboxes, quick-select, state filters)
   ↓
3. Click "📥 Export Selected"
   ↓
4. Script exports each item (5-15 API calls each), showing progress
   ↓
5. If rate limited → auto-pauses → click "Resume" after reset
   ↓
6. Download:
   💾 Single MD — one combined file
   📦 ZIP — individual files + index + combined

Installation

Requirements

Violentmonkey (recommended), Tampermonkey, or Greasemonkey

Steps

1. Install a userscript manager

2. Install this script

3. Visit any GitHub repository

4. The floating button appears automatically in the bottom-right corner

Optional: GitHub Token

For full feature access and higher rate limits:

1. Go to GitHub Settings → Tokens

2. Create a classic token with public_repo scope

3. Paste it into the 🔑 Token section in the panel

What the token enables:

Rate limit: 60 → 5,000 requests/hour

Discussion exports (GraphQL is auth-only)

Review thread resolved/outdated state

Poll data, upvote counts

Minimized comment detection

Discussion timeline events

Technical Details

How It Works

Thread Export (Issues/PRs/Discussions):

The script orchestrates multiple API calls to assemble complete data:

1. Issue/PR data: GET /repos/{owner}/{repo}/issues/{number} + /pulls/{number} for PR details

2. Comments: GET /repos/{owner}/{repo}/issues/{number}/comments (paginated)

3. Timeline: GET /repos/{owner}/{repo}/issues/{number}/timeline (paginated)

4. PR-specific: Reviews, review comments, commits, files, requested reviewers, branch rules, combined status, check runs — each a separate endpoint

5. GraphQL enrichment: Comment minimized state, review thread resolved/outdated state, discussion polls/upvotes/answer ID, discussion timeline

6. Markdown generation: All data assembled into structured Markdown with configurable sections

A typical issue export uses 3–5 API calls. A fully-featured PR export can use 10–15+.

Release Export:

1. Calls GET /repos/{owner}/{repo}/releases?per_page=100 with pagination

2. Renders Markdown bodies to HTML via the marked library

3. Auto-links issue refs, mentions, and SHAs

4. Classifies assets by file extension

5. Generates self-contained HTML and clean Markdown output

Index:

1. REST API for issues/PRs: GET /repos/{owner}/{repo}/issues?state=all (paginated)

2. GraphQL batch queries when range + token are set (50 items per request)

3. GraphQL cursor-based pagination for discussions

4. Direct REST lookup for small ranges without token (≤50 items)

Batch Export:

1. Uses the index to know which items exist

2. For each selected item, runs the full thread export pipeline

3. Assembles results into a single combined file or ZIP archive

Rate Limit Handling:

1. Monitors X-RateLimit-Remaining and X-RateLimit-Reset headers on every request

2. Tracks REST (core) and GraphQL pools separately

3. On HTTP 403 with zero remaining: pauses and saves exact position

4. Resume picks up from the exact item/page where it stopped

Architecture

API-first: All data comes from GitHub's REST and GraphQL APIs — no brittle DOM scraping

Modular design: ReleasesModule, RepoIndexModule, ThreadExportModule, and MdGen are independent modules with clean interfaces

Single API client: All HTTP goes through API.request() with automatic rate limit tracking, timeout handling, and abort signal support

SPA-aware navigation: Listens for Turbo events, popstate, and MutationObserver for URL changes

Persistent state: Token, preferences, and export settings stored via GM_getValue/GM_setValue

External dependencies: marked (v17.0.1) for Markdown rendering, JSZip (v3.9.1) for ZIP generation — both loaded via CDN

Trusted Types support: Compatible with strict Content Security Policy environments

Error resilience: Network errors surface clearly, rate limits pause gracefully, partial exports are always downloadable

FAQ

Q: Does this work with private repositories? A: Yes, if you provide a GitHub token with appropriate permissions (repo scope for private repos, public_repo for public only).

Q: Why do I need a token for Discussions? A: GitHub's Discussions data is only available through the GraphQL API, which requires authentication. Issues, PRs, and releases work without a token (at lower rate limits).

Q: How many API calls does a single export use? A: It depends on the item and your settings. A basic issue: ~3 calls. A PR with reviews, comments, commits, files, and checks: 10–15+ calls. A discussion with GraphQL enrichment: ~3–5 calls. Each comment page (100 comments) is one additional call.

Q: What happens if I get rate limited? A: The script pauses automatically and shows when the limit resets. Click "Resume" to continue exactly where you left off. With a token, you get 5,000 requests/hour instead of 60.

Q: Can I export just a subset of items? A: Yes, multiple ways: (1) Range filter in the index section (e.g., 1-500), (2) Selective checkboxes in the batch picker, (3) Quick-select buttons for issues/PRs/discussions, (4) State filters for open/closed/merged/answered.

Q: What's the difference between the Index and Batch Export? A: The Index is a lightweight listing — titles, status, and links only (fast, low API usage). Batch Export downloads the full content of each selected item — body, all comments, reviews, diffs, timeline, everything (thorough, higher API usage).

Q: Can I export releases AND issues at the same time? A: The sections operate independently. Start a release export and an index/batch export separately — they each have their own progress tracking and controls.

Q: Does the preview mode require an internet connection? A: No. The preview HTML is fully self-contained with embedded CSS. Downloaded files also work completely offline.

Q: Can I customize which sections appear in the export? A: Yes. The ⚙️ Export Settings panel has 50+ checkboxes organized by category. Every section (reviews, timeline, references, checks, etc.) can be toggled independently. Settings persist across sessions.

Q: What about very large repositories with thousands of issues? A: The script handles pagination automatically and uses efficient batch queries where possible. For very large repos, use a token (5,000 requests/hour) and consider exporting in chunks using range filters. Pause/resume ensures no progress is lost.

Q: Does this work on GitHub Enterprise? A: Currently only github.com. Enterprise support could be added by modifying the @match pattern and API base URL.

Known Limitations

Rate limiting: Large exports may exhaust API limits, especially without a token (60 requests/hour). Use a token for 5,000/hour. The script pauses and resumes automatically.

Discussions require a token: The GraphQL API used for discussions is authenticated-only.

Asset files not downloaded: Release exports contain asset metadata (names, sizes, checksums, download URLs) — the actual binary files are not downloaded.

Memory usage: Batch exports of thousands of items may consume significant browser memory. Use ZIP download to keep memory manageable.

Review comment pagination: Review threads with 100+ inline comments on a single PR may not capture all nested replies (GraphQL returns first 100 per thread).

Markdown rendering: Release notes and preview mode use the marked library. Complex or non-standard Markdown may render slightly differently than on GitHub.

No file content export: Changed files in PRs show filenames and optional diffs, but not the full file contents.

Permissions Explained

Permission | Purpose
@match *://github.com/*/* | Activates on all GitHub repository pages
@grant GM_openInTab | Opens HTML preview in a new browser tab
@grant GM_getValue / GM_setValue / GM_deleteValue | Persists your token, preferences, and export settings across sessions
@grant GM_addStyle | Injects panel CSS
@require marked | Markdown-to-HTML rendering for release notes and preview mode
@require JSZip | ZIP file generation for batch and release exports
@run-at document-idle | Waits for page to fully load before initializing