mirror of
https://github.com/ditkrg/project-version-check.git
synced 2026-01-22 22:06:42 +00:00
Add more logs
Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com>
This commit is contained in:
parent
ae2dbd7484
commit
556815239c
6
index.js
6
index.js
@ -82,7 +82,7 @@ async function commitChanges(filePath, file) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const baseTreeSha = branchResponse.data.commit.sha;
|
const baseTreeSha = branchResponse.data.commit.sha;
|
||||||
console.log(file)
|
console.log(typeof file, file)
|
||||||
// Create a new blob with the updated content
|
// Create a new blob with the updated content
|
||||||
const blobResponse = await axios.post(
|
const blobResponse = await axios.post(
|
||||||
`https://api.github.com/repos/${owner}/${repo}/git/blobs`,
|
`https://api.github.com/repos/${owner}/${repo}/git/blobs`,
|
||||||
@ -98,6 +98,7 @@ async function commitChanges(filePath, file) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log('Blob Created')
|
||||||
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(
|
||||||
@ -121,6 +122,7 @@ async function commitChanges(filePath, file) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log('Tree Created')
|
||||||
const newTreeSha = treeResponse.data.sha;
|
const newTreeSha = treeResponse.data.sha;
|
||||||
|
|
||||||
// Create a new commit
|
// Create a new commit
|
||||||
@ -139,6 +141,7 @@ async function commitChanges(filePath, file) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
console.log('Commit Created')
|
||||||
const newCommitSha = commitResponse.data.sha;
|
const newCommitSha = commitResponse.data.sha;
|
||||||
|
|
||||||
// Update the branch reference
|
// Update the branch reference
|
||||||
@ -154,6 +157,7 @@ async function commitChanges(filePath, file) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
console.log('Branch Updated')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error);
|
core.setFailed(error);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user