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: use tslog for logging #58

Merged
merged 2 commits into from
Aug 1, 2023
Merged

feat: use tslog for logging #58

merged 2 commits into from
Aug 1, 2023

Conversation

gowoons
Copy link
Collaborator

@gowoons gowoons commented Aug 1, 2023

Closes #55

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

LOGAF Level 2 - /home/runner/work/code-review-gpt/code-review-gpt/src/test/index.ts

The openAIApiKey is imported directly from the config file. This could potentially expose the API key. Consider using environment variables to store sensitive information like API keys. For example, you can use process.env.OPEN_AI_API_KEY to access the API key from the environment variables.


LOGAF Level 3 - /home/runner/work/code-review-gpt/code-review-gpt/src/test/run/runTest.ts

  1. The runTest function is quite large and does a lot of things. Consider breaking it down into smaller, more manageable functions. This will improve readability and maintainability of the code.
  2. Error handling is missing for the askAI and similaritySearchWithScore function calls. Consider adding try-catch blocks to handle potential errors from these function calls.

LOGAF Level 1 - /home/runner/work/code-review-gpt/code-review-gpt/src/common/model/AIModel.ts

API Key Exposed: The apiKey is being passed to the AIModel constructor and stored in an instance variable. This could potentially expose the API key. Consider using environment variables to handle API keys.


🔑🔒, 📚💡, 🚫🔥🐛


Powered by Code Review GPT

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

Test results summary:

✅ [PASS] - Test case: Bad variable name
✅ [PASS] - Test case: Exposed secret
✅ [PASS] - Test case: Too many nested loops
✅ [PASS] - Test case: Unawaited Promise

SUMMARY: ✅ PASS: 4 - ⚠️ WARN: 0 - ❌ FAIL: 0


Tests Powered by Code Review GPT

@mattzcarey
Copy link
Owner

Some good comments from review tool

@gowoons gowoons merged commit 49f7016 into main Aug 1, 2023
2 checks passed
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.

[Logging] AADev I have moved all logges to tslog
2 participants