-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: gitlab support improvements #97
Conversation
gowoons
commented
Aug 7, 2023
- Fixing README to use --setupTarget when using configure instead of --ci
- Mask API key when setting up for gitlab
- Change gitlab PR template
Risk Level 2 - /home/runner/work/code-review-gpt/code-review-gpt/src/configure/index.ts The code is generally well-written and follows good practices. However, there are a few areas that could be improved for better error handling and code readability.
try {
execSync(`gh auth status || gh auth login`, { stdio: \"inherit\" });
execSync(`gh secret set OPENAI_API_KEY --body=${apiKey}`);
} catch (error) {
logger.error('Error executing command', error);
}
const promptForApiKey = async () => {
const inquirer = await import(\"inquirer\");
const { apiKey } = await inquirer.default.prompt([
{
type: \"input\",
name: \"apiKey\",
message: \"Please input your OpenAI API key:\",
mask: \"*\",
},
]);
return apiKey;
}; Then you can use this function in both const apiKey = await promptForApiKey(); 👍🔧🔂 Powered by Code Review GPT |
0838bde
to
3f7fa01
Compare
Test results summary:✅ [PASS] - Test case: Bad variable name SUMMARY: ✅ PASS: 4 - Tests Powered by Code Review GPT |
@@ -77,6 +77,7 @@ const configureGitLab = async () => { | |||
type: "input", | |||
name: "apiKey", | |||
message: "Please input your OpenAI API key:", | |||
mask: "*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niceee