Skip to content
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

feat: update var names #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: update var names #17

wants to merge 1 commit into from

Conversation

zoncrd
Copy link
Collaborator

@zoncrd zoncrd commented Aug 10, 2023

No description provided.

@@ -3,7 +3,7 @@ import { Reviewer } from './reviewer';
import { Options as Config } from './options';
import { cliCanRun } from './utils';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name 'o' is not descriptive. Consider using a more descriptive name for the type, such as 'CliOptions'.

@@ -20,7 +20,7 @@ type CliOptions = {
.requiredOption('-r, --repository <string>', 'Repository name to review')
.requiredOption('-o, --owner <string>', 'Repository owner')
.addOption(new Option('-m, --model <string>', 'OpenAI GPT model to use').choices(['gpt-3.5-turbo', 'gpt-4']).makeOptionMandatory(true))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name 'o' is not descriptive. Consider using a more descriptive name for the type, such as 'CliOptions'.

@@ -3,16 +3,16 @@ export const SUPPORTED_ACTIONS = ['opened', 'labeled'];
export const SUPPORTED_FILE_EXTENSIONS = ['.js', '.ts', '.py', '.java'];

export class Options {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable names 'openai_Api_Key' and 'openai_Api_Base_Url' do not follow the camelCase naming convention typically used in JavaScript. Consider renaming them to 'openaiApiKey' and 'openaiApiBaseUrl' respectively.

@@ -29,7 +29,7 @@ export class Reviewer {

constructor(options: Options) {
this.options = options;
const model = createOpenAILanguageModel(options.openaiApiKey, options.openaiModel);
const model = createOpenAILanguageModel(options.openai_Api_Key, options.openaiModel);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name 'openai_Api_Key' does not follow the camelCase naming convention. Consider renaming it to 'openaiApiKey'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant