Restore GitHub Screenshots
Older BugPin versions embedded temporary GitHub download URLs that can expire while the files still exist. This procedure restores access to screenshots and attachments in existing open GitHub issues.
Upgrade to BugPin v1.2.4 or later before running this command. The original v1.2.3 repair produced clickable image links. If you already ran that repair, run the updated command again after upgrading to restore inline images. New and synced issues use durable image URLs with ?raw=1.
The command uses your existing active GitHub integrations and the reports linked to them. It reads the BugPin database without modifying it. The configured GitHub token needs Contents: Read and Issues: Read and write permissions on the repository; existing upload permissions already include Contents access.
Preview the repair
For Docker Compose installations, run from the directory containing your Compose file:
docker compose exec bugpin bun run repair-github-links
For Bun installations, run from the BugPin repository root using the same DATA_DIR as your server:
bun run repair-github-links
The default is a dry run. It reports integration IDs, issue numbers, replacement counts, skipped issues, and failures. It does not update GitHub or create backups. To limit either command to one integration, append --integration <id> using an ID shown in the preview.
If your Bun installation uses a custom data directory, supply it explicitly when needed:
DATA_DIR=/path/to/bugpin-data bun run repair-github-links
Apply the repair
Review the preview, then choose a quiet period with no report syncing or manual issue edits. The command checks for concurrent changes immediately before each update, but GitHub does not provide an atomic body comparison for this operation.
For Docker Compose:
docker compose exec bugpin bun run repair-github-links --apply
For Bun:
bun run repair-github-links --apply
The command repairs temporary download URLs and plain repository image links produced by the earlier repair, limited to the linked report and configured repository. Screenshots and image attachments use inline image Markdown with durable repository URLs and ?raw=1. Other attachments remain clickable links. Other text, titles, labels, assignees, and issue states are preserved. Closed issues, already repaired links, and reports whose stored issue URL does not match the configured repository are skipped. Temporary download URLs are resolved against the repository's current default branch, where the files must still exist. Existing repository links retain their branch or commit reference. Viewers need access to the repository to view private images.
The command processes issues sequentially and prints a final summary with updated, wouldUpdate, skipped, failed, and stopped fields. Authentication, permission, or rate-limit errors stop the run. Other failures are reported per issue. An incomplete run exits with a nonzero status. Check the reported operation and permissions, wait for any GitHub rate limit to reset, and rerun the command. Successfully repaired links are skipped on subsequent runs.
Backups and recovery
Before each attempted update, the command saves the issue URL, original body, proposed replacement body, and original update timestamp under:
DATA_DIR/backups/github-link-repair-<timestamp>-<run-id>/
For the supplied Docker setup, this is /data/backups/ inside the persistent data volume. Backup directories have mode 0700 and files have mode 0600. They contain private issue content and may include old signed URLs, so keep them private. The command never prints tokens or signed URLs.
If an update needs to be undone, open the corresponding backup and compare the issue's current description with replacementBody. If they still match, restore originalBody through GitHub's issue editor. If someone has edited the issue since the repair, reconcile the content manually instead of overwriting those edits. Keep backups until you have verified the repaired links, then remove them according to your retention policy.
This repair only covers issues still linked to reports in this BugPin installation. Deleted reports, removed integrations, unrelated links, and closed issues are not backfilled.