-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,6 +215,14 @@ async function createFile(octokit, owner, repo, branchName, path, content, messa | |
|
||
let contents; | ||
|
||
// Log the content and its type | ||
console.log('Content:', content); | ||
console.log('Type of content:', typeof content); | ||
|
||
// Optionally, you can check if the content is a valid base64 string | ||
const isBase64 = Buffer.from(content, 'base64').toString('base64') === content; | ||
console.log('Is content a valid base64 string?', isBase64); | ||
|
||
try { | ||
// Check if the file already exists | ||
contents = await octokit.request('GET /repos/{owner}/{repo}/contents/{path}', { | ||
|
@@ -241,7 +249,7 @@ async function createFile(octokit, owner, repo, branchName, path, content, messa | |
branch: branchName, | ||
message: message, | ||
committer: { | ||
name: 'Metadata Updater fir FAIRsoft', | ||
name: 'Metadata Updater for FAIRsoft', | ||
email: '[email protected]' | ||
}, | ||
content: content // The new file content, using Base64 encoding. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters