Skip to content

Screenshot URLs expire on private repos (raw.githubusercontent.com token) #49

@mdinic

Description

@mdinic
Image

Problem

When BugDrop is used on a private repository, the screenshot URLs embedded in issues break after a few hours.

BugDrop commits screenshots to .bugdrop/screenshots/ via the GitHub Contents API and uses the download_url from the response as the image link in the issue body. For private repos, this generates a raw.githubusercontent.com URL with a temporary ?token=... parameter that expires.

Once the token expires, the screenshot returns a 404 and the issue loses its visual context.

Steps to reproduce

  1. Install BugDrop on a private GitHub repository
  2. Submit a bug report with a screenshot
  3. Confirm the screenshot displays in the created issue
  4. Wait a few hours and revisit the issue
  5. The screenshot image is broken (404)

Expected behavior

Screenshots should remain visible in issues indefinitely.

Suggested fix

Instead of committing the image to the repo and linking via download_url, use GitHub's issue attachment upload mechanism which generates permanent user-attachments URLs. This would also avoid accumulating screenshot files in the repository over time.

Environment

  • Private GitHub repository
  • BugDrop widget v1 (bugdrop.neonwatty.workers.dev/widget.v1.js)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions