.agents/skills/android-ui-visual-review/references/github-publishing.md
Follow this only after the user explicitly opts into a GitHub comment.
The comment should contain:
Do not include:
Scan the body locally for machine paths and selectors before posting. Use ../assets/pr-comment-template.md as the starting structure, replacing every uppercase placeholder and adding one table per comparison state.
Native gh pr comment accepts Markdown but not binary files. This skill bundles
an uploader that uses gh api to place images on a PR-scoped custom Git ref:
python3 \
.agents/skills/android-ui-visual-review/scripts/upload_pr_images.py \
--repo OWNER/REPO \
--pr NUMBER \
<ordered PNG files>
The helper:
refs/uploads/issues/<NUMBER>, outside refs/heads/*This is a GitHub repository write even though it does not create a visible branch. The user's approval to publish the screenshots authorizes this PR-scoped storage. If repository policy rejects custom refs, use an authenticated GitHub web attachment composer or ask the user for an approved image host. Do not fall back to a source branch without separate authorization.
Use --dry-run first when validating new inputs:
python3 \
.agents/skills/android-ui-visual-review/scripts/upload_pr_images.py \
--dry-run \
--repo OWNER/REPO \
--pr NUMBER \
<ordered PNG files>
Build the final Markdown body with the returned URLs. Keep before and after in the same table row. Put extra after-state details, such as an expanded menu, in a separate labeled table.
Post once:
gh pr comment NUMBER \
--repo OWNER/REPO \
--body-file "<validated-comment.md>"
Record the returned comment URL.
Read the comment back using gh api or gh pr view. Verify:
If the posting command's outcome is ambiguous, query for the marker before retrying. Do not create duplicate comments.
Report the comment URL to the user. Leave the PR-scoped image ref in place while the comment depends on it; deleting the ref can eventually break the images.