ultimate-jekyll-manager 0.0.35 → 0.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -119,8 +119,6 @@ async function processTranslation() {
|
|
|
119
119
|
const openAIKey = await fetchOpenAIKey();
|
|
120
120
|
const ujOnly = process.env.UJ_TRANSLATION_ONLY;
|
|
121
121
|
|
|
122
|
-
// console.log('--openAIKey', openAIKey);
|
|
123
|
-
|
|
124
122
|
if (!openAIKey) {
|
|
125
123
|
return logger.error('❌ openAIKey not set. Translation requires OpenAI API key.');
|
|
126
124
|
}
|
|
@@ -687,7 +685,6 @@ async function pushTranslationBranch(updatedFiles) {
|
|
|
687
685
|
logger.log(`🎉 Finished pushing ${files.length} file(s) to '${TRANSLATION_BRANCH}'`);
|
|
688
686
|
}
|
|
689
687
|
|
|
690
|
-
|
|
691
688
|
async function fetchOpenAIKey() {
|
|
692
689
|
const url = 'https://api.itwcreativeworks.com/get-api-keys';
|
|
693
690
|
|
|
@@ -698,13 +695,17 @@ async function fetchOpenAIKey() {
|
|
|
698
695
|
headers: {
|
|
699
696
|
'Authorization': `Bearer ${process.env.GH_TOKEN}`,
|
|
700
697
|
},
|
|
701
|
-
|
|
698
|
+
query: {
|
|
702
699
|
authorizationKeyName: 'github',
|
|
703
700
|
}
|
|
704
701
|
});
|
|
705
702
|
|
|
703
|
+
// Log
|
|
704
|
+
logger.log('OpenAI API response:', response);
|
|
705
|
+
|
|
706
|
+
// Return
|
|
706
707
|
return response.openai.ultimate_jekyll.translation;
|
|
707
708
|
} catch (error) {
|
|
708
|
-
|
|
709
|
+
logger.error('Error:', error);
|
|
709
710
|
}
|
|
710
711
|
}
|