Skip to content

Commit

Permalink
Update/subcommands (#4)
Browse files Browse the repository at this point in the history
* Implementation of ask command

* Corrected error handling of Issue information retrieval

* Updated description of argument /command/

---------

Co-authored-by: PacificBelt30 <57101176+pacificbelt30@users.noreply.github.com>
  • Loading branch information
kechigon and pacificbelt30 authored Jul 12, 2024
1 parent d5c5fb8 commit 3f31352
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ func main() {
owner = flag.String("owner", "", "Repository owner")
issueNumber = flag.Int("issue", 0, "Issue number")
intent = flag.String("intent", "", "Question or intent for the 'ask' command")
command = flag.String("command", "", "Command to be executed by AI")
command = flag.String("command", "", `Command to be executed by AI
describe: Generate a detailed description of the Issue.
analyze: Perform a root cause analysis based on the contents of the Issue.
suggest: Provide suggestions for improvement based on the contents of the Issue.
ask: Answer free-text questions.`)
configFile = flag.String("config", "./internal/config/config.yaml", "Configuration file")
gh_token = flag.String("github-token", "", "GitHub token")
oai_key = flag.String("api-key", "", "OpenAI api key")
Expand Down Expand Up @@ -83,7 +87,7 @@ func main() {
if *command == "ask" {
if *intent == "" {
log.SetOutput(os.Stdout)
logger.Println("Error: intent is required for 'ask' command")
logger.Println("Error: intent is required for 'ask' command")
flag.PrintDefaults()
os.Exit(1)
}
Expand Down

0 comments on commit 3f31352

Please sign in to comment.