Upload PR images with an issue-scoped token #103
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/ai-studio!103
Loading…
Reference in a new issue
No description provided.
Delete branch "tools/pr-images-issue-scope"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #102.
scripts/pr-images.mjsread and edited the PR body through/repos/{repo}/pulls/{n}. That endpoint needs theread:repositoryscope. A token with only the issue scope, which is whatdocs/agents/issue-tracker.mdasks for, failed with a 403. Forgejo's/repos/{repo}/issues/{n}endpoints also work on PRs, so the script now uses them to read and update the body. The attachment upload was already on the issue endpoint.Tests
bun test scriptspasses.image/png.