bitcointranscripts / transcription-review-front-end

https://review.btctranscripts.com
3 stars 7 forks source link

fix: error creating new file on previous implementation for existing files #257

Closed 0tuedon closed 8 months ago

0tuedon commented 8 months ago

Ensures cross-compactibilty with previous implementation, we observed that for existing files with the old implementation the SHA wasn't passed when making a request, This PR ensures the SHA is being passed if the file exists and if it doesn't it makes that push.

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
transcription-review-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 25, 2024 5:45pm
Emmanuel-Develops commented 8 months ago

Ensures cross-compactibilty with previous implementation, we observed that for existing files with the old implementation the SHA wasn't passed when making a request, This PR ensures the SHA is being passed if the file exists and if it doesn't it makes that push.

ACK! For extra clarity, we didn't need to pass the SHA (in the old implementation) because the transcripts were always new transcripts (not existing in the repo as they all came from tstbtc). This specific one already existed in the repo (staging) and didn't have a transcriptUrl (old implementation). GH will throw an error if you try to create a file if the same file already exists except you pass a reference (sha) of the existing file (then its seen as an update). The new implementation already accounts for this and always references the existing file