--- license: odc-by task_categories: - feature-extraction language: - en - mul pretty_name: OpenGitHub Issues size_categories: - 10M= 19: break ``` **Load a specific repo:** ```python # /// script # requires-python = ">=3.11" # dependencies = ["datasets"] # /// from datasets import load_dataset ds = load_dataset( "open-index/open-github-issues", "pull_requests", data_files="data/pull_requests/facebook/react/0.parquet", ) df = ds["train"].to_pandas() print(f"Loaded {len(df)} pull requests") print(f"Merged: {df['merged'].sum()} ({df['merged'].mean()*100:.1f}%)") print(f"\nTop 10 by lines changed:") df["total_lines"] = df["additions"] + df["deletions"] print(df.nlargest(10, "total_lines")[["number", "additions", "deletions", "total_lines"]].to_string(index=False)) ``` **Download files:** ```python # /// script # requires-python = ">=3.11" # dependencies = ["huggingface-hub"] # /// from huggingface_hub import snapshot_download # Download only issues snapshot_download( "open-index/open-github-issues", repo_type="dataset", local_dir="./open-github-issues/", allow_patterns="data/issues/**/*.parquet", ) print("Downloaded issues parquet files to ./open-github-issues/") ``` For faster downloads, install `pip install huggingface_hub[hf_transfer]` and set `HF_HUB_ENABLE_HF_TRANSFER=1`. ## Dataset structure ### `issues` Both issues and PRs live in this table (check `is_pull_request`). Join with `pull_requests` on `number` for PR-specific fields like merge status and diff stats. | Column | Type | Description | |---|---|---| | `number` | int32 | Issue/PR number (primary key) | | `node_id` | string | GitHub GraphQL node ID | | `is_pull_request` | bool | True if this is a PR | | `title` | string | Title | | `body` | string | Full body text in Markdown | | `state` | string | `open` or `closed` | | `state_reason` | string | `completed`, `not_planned`, or `reopened` | | `author` | string | Username of the creator | | `created_at` | timestamp | When opened | | `updated_at` | timestamp | Last activity | | `closed_at` | timestamp | When closed (null if open) | | `labels` | string (JSON) | Array of label names | | `assignees` | string (JSON) | Array of assignee usernames | | `milestone_title` | string | Milestone name | | `milestone_number` | int32 | Milestone number | | `reactions` | string (JSON) | Reaction counts (`{"+1": 5, "heart": 2}`) | | `comment_count` | int32 | Number of comments | | `locked` | bool | Whether the conversation is locked | | `lock_reason` | string | Lock reason | ### `pull_requests` PR-specific fields. Join with `issues` on `number` for title, body, labels, and other shared fields. | Column | Type | Description | |---|---|---| | `number` | int32 | PR number (matches `issues.number`) | | `merged` | bool | Whether the PR was merged | | `merged_at` | timestamp | When merged | | `merged_by` | string | Username who merged | | `merge_commit_sha` | string | Merge commit SHA | | `base_ref` | string | Target branch (e.g. `main`) | | `head_ref` | string | Source branch | | `head_sha` | string | Head commit SHA | | `additions` | int32 | Lines added | | `deletions` | int32 | Lines deleted | | `changed_files` | int32 | Number of files changed | | `draft` | bool | Whether the PR is a draft | | `maintainer_can_modify` | bool | Whether maintainers can push to the head branch | ### `comments` Conversation comments on issues and PRs. These are the threaded discussion comments, not inline code review comments (those are in `review_comments`). | Column | Type | Description | |---|---|---| | `id` | int64 | Comment ID (primary key) | | `issue_number` | int32 | Parent issue/PR number | | `author` | string | Username | | `body` | string | Comment body in Markdown | | `created_at` | timestamp | When posted | | `updated_at` | timestamp | Last edit | | `reactions` | string (JSON) | Reaction counts | | `author_association` | string | `OWNER`, `MEMBER`, `CONTRIBUTOR`, `NONE`, etc. | ### `review_comments` Inline code review comments on PR diffs. Each comment is attached to a specific file and line in the diff. | Column | Type | Description | |---|---|---| | `id` | int64 | Comment ID (primary key) | | `pr_number` | int32 | Parent PR number | | `review_id` | int64 | Parent review ID | | `author` | string | Reviewer username | | `body` | string | Comment body in Markdown | | `path` | string | File path in the diff | | `line` | int32 | Line number | | `side` | string | `LEFT` (old code) or `RIGHT` (new code) | | `diff_hunk` | string | Surrounding diff context | | `created_at` | timestamp | When posted | | `updated_at` | timestamp | Last edit | | `in_reply_to_id` | int64 | Parent comment ID (for threaded replies) | ### `reviews` PR review decisions. One row per review action on a PR. | Column | Type | Description | |---|---|---| | `id` | int64 | Review ID (primary key) | | `pr_number` | int32 | Parent PR number | | `author` | string | Reviewer username | | `state` | string | `APPROVED`, `CHANGES_REQUESTED`, `COMMENTED`, `DISMISSED` | | `body` | string | Review summary in Markdown | | `submitted_at` | timestamp | When submitted | | `commit_id` | string | Commit SHA that was reviewed | ### `timeline_events` The full lifecycle of every issue and PR. Every label change, assignment, cross-reference, merge, force-push, lock, and other state transition. | Column | Type | Description | |---|---|---| | `id` | string | Event ID (node_id or synthesized) | | `issue_number` | int32 | Parent issue/PR number | | `event_type` | string | Event type (see below) | | `actor` | string | Username who triggered the event | | `created_at` | timestamp | When it happened | | `database_id` | int64 | GitHub database ID for the event | | `label_name` | string | Label name (`labeled`, `unlabeled`) | | `label_color` | string | Label hex color | | `state_reason` | string | Close reason: `COMPLETED`, `NOT_PLANNED` (`closed`) | | `assignee_login` | string | Username assigned/unassigned (`assigned`, `unassigned`) | | `milestone_title` | string | Milestone name (`milestoned`, `demilestoned`) | | `title_from` | string | Previous title before rename (`renamed`) | | `title_to` | string | New title after rename (`renamed`) | | `ref_type` | string | Referenced item type: `Issue` or `PullRequest` (`cross-referenced`, `referenced`) | | `ref_number` | int32 | Referenced issue/PR number | | `ref_url` | string | URL of the referenced item | | `will_close` | bool | Whether the reference will close this issue | | `lock_reason` | string | Lock reason (`locked`) | | `data` | string (JSON) | Remaining event-specific payload (common fields stripped) | Event types: `labeled`, `unlabeled`, `closed`, `reopened`, `assigned`, `unassigned`, `milestoned`, `demilestoned`, `renamed`, `cross-referenced`, `referenced`, `locked`, `unlocked`, `pinned`, `merged`, `review_requested`, `head_ref_force_pushed`, `head_ref_deleted`, `ready_for_review`, `convert_to_draft`, and more. Common fields (`actor`, `created_at`, `database_id` and extracted columns above) are stored in dedicated columns and removed from `data` to reduce storage. The `data` field contains only remaining event-specific payload. See the [GitHub GraphQL timeline items documentation](https://docs.github.com/en/graphql/reference/unions#issuetimelineitems) for the full type catalog. ### `pr_files` Every file touched by each pull request, with per-file diff statistics. | Column | Type | Description | |---|---|---| | `pr_number` | int32 | Parent PR number | | `path` | string | File path | | `additions` | int32 | Lines added | | `deletions` | int32 | Lines deleted | | `status` | string | `added`, `removed`, `modified`, `renamed` | | `previous_filename` | string | Original path (for renames) | ### `commit_statuses` CI/CD status checks and GitHub Actions results for each commit. | Column | Type | Description | |---|---|---| | `sha` | string | Commit SHA | | `context` | string | Check name (e.g. `ci/circleci`, `check:build`) | | `state` | string | `success`, `failure`, `pending`, `error` | | `description` | string | Status description | | `target_url` | string | Link to CI details | | `created_at` | timestamp | When reported | ## Dataset statistics | Table | Rows | Description | |-------|-----:|-------------| | `issues` | 1.2M | Issues and pull requests (shared metadata) | | `pull_requests` | 700.6K | PR-specific fields (merge status, diffs, refs) | | `comments` | 6.8M | Conversation comments on issues and PRs | | `review_comments` | 1.8M | Inline code review comments on PR diffs | | `reviews` | 1.6M | PR review decisions | | `timeline_events` | 865.1K | Activity timeline (labels, closes, merges, assignments) | | `pr_files` | 8.5M | Files changed in each pull request | | `commit_statuses` | 164.0K | CI/CD status checks per commit | | **Total** | **21.6M** | | ## How it's built The sync pipeline uses both GitHub APIs. The [REST API](https://docs.github.com/en/rest) handles bulk listing: issues, comments, and review comments are fetched repo-wide with `since`-based incremental pagination and parallel page fetching across multiple tokens. The [GraphQL API](https://docs.github.com/en/graphql) handles per-item detail: one query grabs reviews, timeline events, file changes, and commit statuses in a single round trip, with automatic REST fallback for PRs with more than 100 files or reviews. Multiple GitHub Personal Access Tokens rotate round-robin to spread rate limit load. The pipeline is fully incremental and idempotent: re-running picks up only what changed since the last sync. Everything lands in per-repo [DuckDB](https://duckdb.org/) files first, then gets exported to Parquet with Zstd compression for publishing here. No filtering, deduplication, or content changes. Bot activity, automated PRs, CI noise, Dependabot upgrades, all of it is preserved, because that's how repos actually work. ## Known limitations - **Point-in-time snapshot.** Data reflects the state at the last sync, not real-time. Incremental updates capture everything that changed since the previous sync. - **Bot activity included.** Comments and PRs from bots (Dependabot, Renovate, GitHub Actions, etc.) are included without filtering. This is intentional. Filter on `author` if you want humans only. - **JSON columns.** `labels`, `assignees`, `reactions`, and `data` contain JSON strings. Use `json_extract()` in DuckDB or `json.loads()` in Python. - **Body text can be large.** Issue and comment bodies contain full Markdown, sometimes with embedded images. Project only the columns you need for memory-constrained workloads. - **Timeline data varies by event type.** The `data` field in `timeline_events` contains the raw event payload as JSON. The schema depends on `event_type`. ## Personal and sensitive information Usernames, user IDs, and author associations are included as they appear in the GitHub API. All data was already publicly accessible on GitHub. Email addresses do not appear in this dataset (they exist only in git commit objects, which are in the separate code archive, not here). No private repository data is present. ## License Released under the [Open Data Commons Attribution License (ODC-By) v1.0](https://opendatacommons.org/licenses/by/1-0/). The underlying data is sourced from GitHub's public API. [GitHub's Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service) apply to the original data. ## Thanks All the data here comes from [GitHub](https://github.com/)'s public [REST API](https://docs.github.com/en/rest) and [GraphQL API](https://docs.github.com/en/graphql). We are grateful to the open-source maintainers and contributors whose work is represented in these tables. - **[OpenGitHub](https://huggingface.co/datasets/open-index/open-github)**, our companion dataset covering the full GitHub event stream via [GH Archive](https://www.gharchive.org/) by [Ilya Grigorik](https://www.igvita.com/) - Built with [DuckDB](https://duckdb.org/) (Go driver), [Apache Parquet](https://parquet.apache.org/) (Zstd compression), published via [Hugging Face Hub](https://huggingface.co/) Questions, feedback, or issues? Open a discussion on the [Community tab](https://huggingface.co/datasets/open-index/open-github-issues/discussions).