Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ryancyq/github-signed-commit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: conijnio/github-signed-commit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Feb 12, 2026

  1. fix: image commits leads to invalid images

    **Location:** `src/blob.ts`, line 28
    
    The code was reading files with UTF-8 text encoding:
    ```typescript
    fs.createReadStream(this.absolutePath, { encoding: 'utf8' })
    ```
    
    Images are **binary files** containing arbitrary byte values (0-255). The UTF-8 encoding option tells Node.js to:
    1. Interpret the binary data as UTF-8 text
    2. Drop any byte sequences that are not valid UTF-8
    
    This causes data loss because:
    - Valid UTF-8 sequences are 1-4 bytes depending on the character
    - Many byte combinations in binary files are invalid UTF-8 sequences
    - These invalid bytes are silently dropped by the UTF-8 decoder
    - The resulting file is corrupted (missing bytes)
    Nr18 committed Feb 12, 2026
    Configuration menu
    Copy the full SHA
    d2f2197 View commit details
    Browse the repository at this point in the history
  2. fix: prevent binary file corruption when encoding to base64

    The base64-encoder was converting base64 strings back to buffers before
    pushing them to the stream, which caused them to be re-encoded as UTF-8
    bytes. This corrupted binary files (images, PDFs, etc.) when they were
    committed and pushed to GitHub.
    
    Changes:
    - base64-encoder.ts: Push base64 strings directly instead of converting
      them back to buffers. This prevents the double-encoding that was
      corrupting binary data.
    - blob.ts: Remove UTF-8 encoding from file stream reading. Files are now
      read as raw buffers, which is necessary for the base64 encoder to work
      correctly with both text and binary files.
    
    The fix ensures that:
    - Binary files (PNG, JPG, PDF, etc.) are encoded without corruption
    - Text files continue to work correctly
    - The action properly base64 encodes file content for GitHub API
    
    Fixes image corruption when committing and pushing images to GitHub
    Nr18 committed Feb 12, 2026
    Configuration menu
    Copy the full SHA
    1374e43 View commit details
    Browse the repository at this point in the history
Loading