From 8d082d9bf8cc6112776573eea81ee33ccc8990bf Mon Sep 17 00:00:00 2001 From: Shakar <5h4k4r.b4kr@gmail.com> Date: Mon, 18 Sep 2023 15:27:10 +0300 Subject: [PATCH] Update `Accept` header in tree request Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com> --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 6f7c398..a4c5298 100644 --- a/index.js +++ b/index.js @@ -107,7 +107,6 @@ async function commitChanges(filePath) { console.log('blobResponse: ' + blobResponse.data) const newBlobSha = blobResponse.data.sha; - // Create a new tree with the updated blob const treeResponse = await axios.post( `https://api.github.com/repos/${owner}/${repo}/git/trees`, @@ -124,7 +123,7 @@ async function commitChanges(filePath) { }, { headers: { - 'Accept': 'application/vnd.github.v3+json', + 'Accept': 'application/vnd.github+json', 'Authorization': `Bearer ${githubToken}`, }, }