github-tools / github-tools/github

writeFile function fails when response status header is 304 unmodified

Open
#493 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.8k
Forks
809
PR merge metrics
No merged PRs in 30d

Description

The response object in the getSha returned promise fails on here `commit.sha = response.data.sha;`
The response.data is null, the status header of the response object is '304 Unmodified'
The writeFile function fails before the PUT requests are created.

https://github.com/github-tools/github/blob/24223f7a51ba935f1c86ffd552dac20e8f3e359d/lib/Repository.js#L732

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in lib/Repository.js at the linked writeFile code, tracing the getSha promise and the response handling around commit.sha = response.data.sha. Confirm the expected behavior for a 304 response and verify that writeFile no longer fails before creating its PUT requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.