mirror of
https://github.com/ditkrg/project-version-check.git
synced 2026-01-23 06:16:41 +00:00
Update Accept header in tree request
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
This commit is contained in:
parent
12a487f9c5
commit
8d082d9bf8
3
index.js
3
index.js
@ -107,7 +107,6 @@ async function commitChanges(filePath) {
|
|||||||
console.log('blobResponse: ' + blobResponse.data)
|
console.log('blobResponse: ' + blobResponse.data)
|
||||||
|
|
||||||
const newBlobSha = blobResponse.data.sha;
|
const newBlobSha = blobResponse.data.sha;
|
||||||
|
|
||||||
// Create a new tree with the updated blob
|
// Create a new tree with the updated blob
|
||||||
const treeResponse = await axios.post(
|
const treeResponse = await axios.post(
|
||||||
`https://api.github.com/repos/${owner}/${repo}/git/trees`,
|
`https://api.github.com/repos/${owner}/${repo}/git/trees`,
|
||||||
@ -124,7 +123,7 @@ async function commitChanges(filePath) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
headers: {
|
headers: {
|
||||||
'Accept': 'application/vnd.github.v3+json',
|
'Accept': 'application/vnd.github+json',
|
||||||
'Authorization': `Bearer ${githubToken}`,
|
'Authorization': `Bearer ${githubToken}`,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user