The slow 'first pass' was one sequential 'gh pr view' per open PR (~one
network round-trip each), so it is I/O-bound. Fetch them concurrently with
asyncio.create_subprocess_exec, bounded by a semaphore (default 10,
override via PR_FILE_MAP_CONCURRENCY) to stay polite to the GitHub API.
Output is unchanged and deterministic (results keyed back in PR order);
errors still fail fast with the same messages.
* pr_file_map.py: add ignore_pull_request list, progress passes, dated title
- Add module-level ignore_pull_request: list[int]; get_open_prs() filters
those PR numbers out (e.g. [123, 456, 789] skips #123, #456, #789).
- Drop the redundant DIRECTORY.md comment above DIRECTORY_FILE (the module
docstring and render_directory_section already explain it).
- Fold the generation datetime into the H1 title:
'# Open Pull Request File Map: 16 Sep 2026 at 21:45 UTC'.
- Show progress on stderr via other/cheap_progress.py's progress() for the
'First pass' (fetch each PR's files) and 'Second pass' (classify files).
* Change ignore_pull_request from list to set
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
2026-09-17 15:58:43 +02:00
Christian Claussandpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* pr_file_map.py: Use a human-readable date format
Use a human-readable date format.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Move DIRECTORY.md to its own section in pr_file_map.py
DIRECTORY.md is auto-generated and touched by nearly every open PR, so it
dominated the 'possible merge conflicts' list and distracted maintainers.
Pull it out into a dedicated section at the very bottom of the report that
separates PRs whose only overlap is DIRECTORY.md (safe to 'accept both' in
the GitHub UI) from PRs that also collide on real source files.
Also render the Script path relative to the git root instead of an absolute
machine-specific path.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Add a 'files touched by more than one open PR' section (sorted with the
most-contested files first) so overlapping PRs -- the likely merge-conflict
hot spots -- are visible at a glance when deciding what to land.
Also report two distinct file totals: 'file touches' (every PR x file pair)
and 'distinct files touched'. Only the distinct total equals existing +
missing, which fixes the earlier single count that double-counted files
edited by multiple PRs.
* fix:bucket count type
* fixed TypeError
* Refine docstring and adjust return statement
Updated docstring for partition_liked_list method to clarify behavior. Changed return statement from None to None for consistency.
* Add script to map open PRs to modified files
This script lists all open pull requests in the current directory's git repository and maps each file touched by any open PR to its corresponding PR numbers. It outputs the results in GitHub-flavored Markdown format.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add noqa comments for subprocess calls
Add noqa comments to suppress specific linting warnings.
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>