Skip to content

Commit 563e0b6

Browse files
docs(ci): trim internal docstring in paper_image_sync
1 parent 8913471 commit 563e0b6

1 file changed

Lines changed: 3 additions & 20 deletions

File tree

scripts/paper_image_sync.py

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,7 @@
11
#!/usr/bin/env python3
2-
"""Synchronize/clean up images submitted with a paper PR.
3-
4-
This is designed to run in a pull_request_target workflow, *without checking out the PR code*.
5-
6-
Behavior:
7-
- Detect added image files in the PR under docs/src/public/images.
8-
- Download the image bytes from the PR head SHA via GitHub API.
9-
- Resize/compress to a standard size.
10-
- Create a branch + PR in the docs repository containing the processed images.
11-
- Comment on the original PR with the new image URLs and suggested edits.
12-
13-
If the PR branch is on the same repository (not a fork), we also attempt to:
14-
- checkout the PR branch,
15-
- delete the image files from PySR,
16-
- update docs/papers.yml image fields to use the absolute URL,
17-
- push the commit back to the PR branch.
18-
19-
Security notes:
20-
- Never executes PR-provided code.
21-
- Uses GitHub API to fetch only the specific image files and (optionally) papers.yml.
2+
"""CI helper for paper PRs: upload/normalize images and comment back with URLs.
3+
4+
Runs in pull_request_target; never executes PR-provided code.
225
"""
236

247
from __future__ import annotations

0 commit comments

Comments
 (0)