Datasets:
pull_request.guid stringlengths 13 142 | len int64 273 1,000k | render stringlengths 273 1,000k | lang_distr_json stringlengths 17 12k | expected_pairs int64 1 30 | successful_content_pairs int64 1 30 | cleaned_pairs int64 1 30 | all_pairs_resolved bool 2
classes | all_pairs_have_content bool 2
classes |
|---|---|---|---|---|---|---|---|---|
0xProject/protocol/pull/247 | 13,675 | <pr>Title: fix: Deploy FQT for KyberDmm/Mstable
username_0: ## Description
## Testing instructions
## Types of changes
## Checklist:
- [ ] Prefix PR title with `[WIP]` if necessary.
- [ ] Add tests to cover changes as needed.
- [ ] Update documentation as needed.
- [ ]... | [["TypeScript", "packages/asset-swapper/src/utils/market_operation_utils/constants.ts", 4334], ["JSON", "packages/contract-addresses/addresses.json", 5088]] | 2 | 2 | 2 | true | true |
0xhokusai/hokusai-stoplight-docs/pull/39 | 4,356 | <pr>Title: Feat/add burn
username_0: ## 関連リンク(Slack, Notion)や GitHub Issue
https://github.com/0xhokusai/hokusai-get-started/pull/11
## やったこと
add nft-burn
## まだなこと
burnページへ説明追加<pr_status>opened<repo_name>0xhokusai/hokusai-stoplight-docs<pr_base><pr_file>docs/en/get-started.md<pr_base_code>To burn an NFT, you... | [["Markdown", "docs/en/get-started.md", 620], ["Markdown", "docs/ja/get-started.md", 1163]] | 1 | 1 | 1 | true | true |
18F/doi-extractives-data/pull/1076 | 20,625 | <pr>Title: Fixes percent toggle on firefox
username_0: Fixes #1072 Now working on firefox too!
This wasn't easy, but I got it!
Ready for review
* GDP
* Exports<pr_status>opened<repo_name>18F/doi-extractives-data<pr_base><pr_file>_explore/economic-impact/exports.html<pr_base_code> <h1 data-toggler="filters... | [["HTML", "_explore/economic-impact/exports.html", 1888], ["HTML", "_explore/economic-impact/gdp.html", 5789], ["SCSS", "_sass/blocks/explore/_filters.scss", 1305]] | 2 | 2 | 2 | true | true |
18F/forecast/pull/60 | 208,397 | "<pr>Title: ability to add a few different agencies\nusername_0: Since the data provided is so diffe(...TRUNCATED) | "[[\"Python\", \"forecast-admin/forecast/opportunities/management/commands/load_opportunities.py\", (...TRUNCATED) | 2 | 2 | 2 | true | true |
3v-workspace/DataOcean/pull/313 | 72,883 | "<pr>Title: [DO-2930]No preloader in PEP detailed view page and sanctions when pr…\nusername_0: (...TRUNCATED) | "[[\"JavaScript\", \"src/components/nav/Menu.jsx\", 6124], [\"JavaScript\", \"src/components/pages/d(...TRUNCATED) | 1 | 1 | 1 | true | true |
42AGV/ft_transcendence/pull/288 | 2,559 | "<pr>Title: #216 - Return an instance and not a plain js object\nusername_0: I've made this comment (...TRUNCATED) | "[[\"TypeScript\", \"transcendence-app/src/user/dto/user.dto.ts\", 106], [\"TypeScript\", \"transcen(...TRUNCATED) | 1 | 1 | 1 | true | true |
4dn-dcic/fourfront/pull/1439 | 7,885 | "<pr>Title: Update some master inserts\nusername_0: Added tags mixin to user Item to allow a means t(...TRUNCATED) | "[[\"TOML\", \"pyproject.toml\", 229], [\"JSON\", \"src/encoded/tests/data/master-inserts/lab.json\"(...TRUNCATED) | 3 | 3 | 3 | true | true |
5xRuby-12th-RubyJoy/RubyJoy/pull/315 | 4,854 | "<pr>Title: issue/281 訂單狀態修改為中文顯示 \nusername_0: <img width=\"1418\" alt=\"截(...TRUNCATED) | [["orders.html.erb", "app/views/stores/orders.html.erb", 2898]] | 1 | 1 | 1 | true | true |
6rotoms/kimosabe/pull/53 | 28,966 | "<pr>Title: Add search pagesize\nusername_0: \r\nAdd pageSize to game search endpoints following spe(...TRUNCATED) | "[[\"Java\", \"api/src/main/java/kimosabe/api/controller/ExceptionController.java\", 3903], [\"Java\(...TRUNCATED) | 1 | 1 | 1 | true | true |
7dJx1qP/stash-userscripts/pull/1 | 8,509 | "<pr>Title: Fix issue when path has encoded URI elements.\nusername_0: I noticed a minor issue where(...TRUNCATED) | "[[\"Markdown\", \"README.md\", 1727], [\"JavaScript\", \"dist/public/Stash Open Media Player.user.j(...TRUNCATED) | 1 | 1 | 1 | true | true |
GitHub Pull Requests (Repository-Subsampled)
Each row is one GitHub pull request, rendered as a single text document that combines the pull request's narrative and discussion with selected context from its code changes. The corpus is intended for pretraining code language models and for research on code changes and developer discussion.
This variant applies repository-aware subsampling to reduce the weight of repositories with many pull requests. A larger companion variant contains the same cleaned and rendered rows without that step. License and opt-out filtering were not applied, so read Licensing before use.
Dataset facts
| Unit | One pull request per row (IDs unique within this variant) |
| Rows | 8,737,423 |
| Split | train only |
| Compressed size | ~77.8 GB (72 Parquet files, Zstandard level 9) |
Schema
| Column | Type | Description |
|---|---|---|
pull_request.guid |
string | Identifier in the form owner/repo/pull/number. |
render |
string | Rendered document: pull-request narrative and discussion plus selected code-change context. |
len |
int64 | Length of render in Unicode characters (Python len), not bytes or tokens. |
lang_distr_json |
string | JSON-encoded heuristic language annotations: language (may be null), file/path key, and base-content character count. Not a verified language label for the pull request. |
expected_pairs |
int64 | Number of commit pairs in the retrieval plan. |
successful_content_pairs |
int64 | Content-bearing pairs retrieved, before pair-quality filtering. |
cleaned_pairs |
int64 | Pairs that survived cleaning. |
all_pairs_resolved |
bool | Every planned pair ended as ok (content retrieved) or no_text_changes. |
all_pairs_have_content |
bool | Every planned pair ended as ok. Does not mean every original file, revision, or cleaned pair appears in render. |
Loading the data
Streaming is recommended given the size.
from datasets import load_dataset
ds = load_dataset("jordangong/the-stack-v2-pr", split="train", streaming=True)
for row in ds.take(3):
print(row["pull_request.guid"], row["len"])
print(row["render"][:1000])
# Optional: keep rows whose planned commit pairs were all retrieved with content.
complete = ds.filter(lambda row: row["all_pairs_have_content"])
That filter reflects retrieval coverage only. It is not evidence of quality, licensing status, or safety.
How the data was built
Pull-request histories were reconstructed from GHArchive events. File content for each pull request's planned base/head commit pairs was then retrieved from the corresponding Git repositories. The data was cleaned and rendered with an adapted version of the pull-request pipeline from BigCode's The Stack v2. Filters cover file quality, changed ranges, a language blacklist, pull-request history rules, and rendered size. Rendering selects discussion and code context within fixed bounds. Historical review comments whose code hunks could not be mapped may be omitted.
A planned pair with no text changes counts as resolved without content. Other pairs may remain unresolved because history was unavailable, access or transport failed, or retrieval hit resource or policy limits. In this variant, 8,703,861 rows have all_pairs_resolved = true and 8,679,121 have all_pairs_have_content = true.
Repository-aware subsampling
Each rendered pull request was kept with probability p(n). Here n is the number of its repository's stat-eligible histories, meaning grouped histories that satisfied the pull-request history eligibility rules, counted across all such histories and not only those that reached rendering:
- p(n) = 0.8007 − 0.0007·n for 1 ≤ n ≤ 1000
- p(n) = 100 / n for n > 1000
Probabilities therefore depend on the global eligible count, not on how many rows a repository has in this dataset. Draws are independent and deterministic per pull-request ID (seed 42). Results are reproducible, but there are no exact per-repository quotas, and this is not uniform sampling by repository.
Licensing
The upstream pipeline includes license filtering and opt-out filtering. Neither was applied here because the required input data was unavailable. This release does not establish a dataset-wide license for redistribution or training, and it does not inherit the licensing or opt-out assurances of The Stack v2. It should not be described as permissively licensed or opt-out compliant. The code and text come from public GitHub repositories, and the rights of their original authors and licensors still apply. You are responsible for determining whether your intended use is permitted.
Limitations and responsible use
- Partial, biased coverage. A row is not a full repository snapshot or a complete record of the pull request. History, files, and code changes may be missing. Retrieval and filtering shape which pull requests appear, and large or inaccessible histories may be underrepresented.
- Heuristic annotations. Language labels come from filename and content heuristics (including Pygments) and are imperfect. Some files are unlabeled. Generated and vendored files were not identified or excluded.
- Privacy and safety. A legacy username-replacement step was applied, but this is not comprehensive anonymization. No full audit for personal information, secrets, or security issues was done. Rows may contain personal data, credentials, offensive text, or vulnerable or malicious code. Do not execute content from this dataset.
- No decontamination or deduplication. Content may overlap with public benchmarks or repeat across pull requests.
- Not evaluation or instruction data. Only a
trainsplit is provided. If you need held-out data, build repository-disjoint splits. Rows are rendered documents, not curated question/answer or chat examples. No model-performance results are reported.
Related variant and attribution
This dataset is a subset of the pre-subsampling variant, and both went through the same cleaning and rendering. Do not concatenate them as independent data, because doing so duplicates pull requests.
The processing code is adapted from BigCode's The Stack v2 pull-request and issue pipeline. This is an independently processed release, not an official BigCode dataset.
- Downloads last month
- 1,439