Skip to content

Conversation

appleboy
Copy link
Owner

  • Add a new file cmd/review.go
  • Add package imports for github.com/appleboy/CodeGPT/git, github.com/appleboy/CodeGPT/openai, github.com/appleboy/CodeGPT/prompt, github.com/appleboy/CodeGPT/util, github.com/fatih/color, github.com/spf13/cobra, and github.com/spf13/viper
  • Add command line flags diff_unified, model, lang, exclude_list, and amend to reviewCmd
  • Move initialization of command line flags to init() function
  • Set up a git object with options, and call g.DiffFiles() to get the file diff data
  • Set up an openai client with options, and call client.Completion() with the file diff data to get the AI-generated code review summary
  • Add a new file `prompt/prompt.go

fix #45

- Add a new file `cmd/review.go`
- Add package imports for `github.com/appleboy/CodeGPT/git`, `github.com/appleboy/CodeGPT/openai`, `github.com/appleboy/CodeGPT/prompt`, `github.com/appleboy/CodeGPT/util`, `github.com/fatih/color`, `github.com/spf13/cobra`, and `github.com/spf13/viper`
- Add command line flags `diff_unified`, `model`, `lang`, `exclude_list`, and `amend` to `reviewCmd`
- Move initialization of command line flags to `init()` function
- Set up a `git` object with options, and call `g.DiffFiles()` to get the file diff data
- Set up an `openai` client with options, and call `client.Completion()` with the file diff data to get the AI-generated code review summary
- Add a new file `prompt/prompt.go

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
@appleboy appleboy added the enhancement New feature or request label Mar 25, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 25, 2023

Codecov Report

Merging #46 (4eb936a) into main (f4923a5) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@          Coverage Diff          @@
##            main     #46   +/-   ##
=====================================
  Coverage   6.25%   6.25%           
=====================================
  Files          2       2           
  Lines         48      48           
=====================================
  Hits           3       3           
  Misses        45      45           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

- Added an import statement to `cmd/review.go`

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
@appleboy appleboy merged commit 134cc79 into main Mar 25, 2023
@appleboy appleboy deleted the code branch March 25, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support do a brief code review
2 participants