Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-9110 docs(contributing): document native screenshot uploads from forks (#10423)

沙雕的小鱼儿 boyfeiyuc8dc85559cf1
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 353bf9cd63..a1a7b8dd4b 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -134,11 +134,12 @@ attachments are appended. Native `gh --attach` does not deduplicate retries.
CLI uploads require **push access to the target repository** and a credential
accepted by GitHub's upload endpoint. Version 2.103.2 lets that endpoint decide
which GitHub App tokens can upload; it does not guarantee support for every App
-or an Actions `GITHUB_TOKEN`. Verify the actual agent/CI credential. Without
-push access, upload through the PR editor in GitHub's web interface. Contributors
-who must stay in the CLI should ask a maintainer in the PR to upload their files;
-opening a fork PR alone does not grant upload permission on the upstream repo.
-This helper targets GitHub.com, not GitHub Enterprise Server.
+or an Actions `GITHUB_TOKEN`. Verify the actual agent/CI credential. Contributors
+without upstream push access can use a public fork as described below, upload
+through the PR editor in GitHub's web interface, or ask a maintainer in the PR
+to upload their files. Opening a fork PR alone does not grant upload permission
+on the upstream repo. `scripts/pr-shots` targets GitHub.com, not GitHub
+Enterprise Server.
Supported files are PNG, JPEG, GIF, WebP, SVG, MP4, MOV, and WebM. Images are
limited to 10 MB; video limits are 10 MB on Free plans and 100 MB on paid plans.
@@ -161,6 +162,60 @@ timestamp on both versions instead. Hold a loading state with a controlled
local API response, rather than relying on a fixed sleep. Include a short
recording when the motion or sequence itself is the change under review.
+#### CLI uploads from an external contributor's fork
+
+With GitHub CLI 2.103.2+, you can upload to a public fork or evidence repository
+you control, then use its native attachment URLs in your upstream PR. Choose a
+repository where your credential has push access and an issue you can use for
+contribution evidence. Forks may need Issues enabled in their repository
+settings. Review every capture before publishing and use synthetic test data
+suitable for public access.
+
+Save `evidence.md` beside the images, with the source commit for each capture,
+viewport, theme, and reproduction steps. Include local image references where
+the images should appear, for example `![Before](./before.png)` and
+`![After](./after.png)`.
+
+Replace `OWNER/EVIDENCE-REPO` with your public repository and `1` with the
+evidence issue's number. Run this from the directory containing the files.
+
+```bash
+gh issue comment 1 --repo OWNER/EVIDENCE-REPO --body-file ./evidence.md \
+ --attach ./before.png --attach ./after.png
+```
+
+The command prints the new comment's URL. Replace `COMMENT-ID` below with the
+number after `#issuecomment-` in that URL and read back that exact comment. The
+saved body contains the uploaded image Markdown.
+
+```bash
+gh api repos/OWNER/EVIDENCE-REPO/issues/comments/COMMENT-ID \
+ --jq .body > ./uploaded-evidence.md
+```
+
+Copy the relevant image Markdown into the Screenshots section of your upstream
+PR body, retaining captions and capture metadata. Keep the canonical
+`https://github.com/user-attachments/assets/...` URLs returned by GitHub. Raw-file
+URLs follow repository file retention, and Actions artifacts have expiry dates.
+To update an existing PR, replace `123` with your PR number, read its current
+body, and edit `pr.md` to add the evidence. Retain its other sections and closing
+issue references when saving it.
+
+```bash
+gh pr view 123 --repo multica-ai/multica --json body --jq .body > ./pr.md
+# Edit pr.md to add the uploaded image Markdown under Screenshots.
+gh pr edit 123 --repo multica-ai/multica --body-file ./pr.md
+```
+
+Check the upstream PR's rendered images and verify the URLs open while signed
+out. Keep the public evidence repository, issue, and original captures available
+for review. These native attachment URLs are independent of a source branch.
+
+Native `gh --attach` has no content-hash retry tracking. If it exits nonzero,
+inspect its output and read back the exact comment before retrying. A partial
+upload can still post the comment with the successful attachments. Reuse those
+URLs and attach only missing files in a new comment on the same evidence issue.
+
## Development Model
Local development uses one shared PostgreSQL container and one database per checkout.