-
Notifications
You must be signed in to change notification settings - Fork 1
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: add gh repository #1
Changes from all commits
604e952
a8df929
db5df2d
588020c
df579aa
0574297
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This commit adds new dependencies to the project, which are not needed for this PR, consider removing unused libraries. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This commit adds a new dependency, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This commit adds new dependencies to the project, which are not needed for this PR, consider removing unused libraries. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
package codeassistant | ||
|
||
import "codebleu/internal/domain/gitrepo" | ||
import ( | ||
"codebleu/internal/domain/gitrepo" | ||
) | ||
|
||
type PullRequestReviewInput struct { | ||
PullRequest *gitrepo.PullRequest | ||
ReviewPrompt string | ||
PullRequest *gitrepo.PullRequest | ||
SystemInstruction string | ||
} | ||
|
||
type ReviewAndCommentPullRequestInput struct { | ||
PullRequestId string | ||
SystemInstruction string | ||
} | ||
|
||
type ReviewResult struct { | ||
Path string `json:"path"` | ||
Comment string `json:"comment_in_markdown"` | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package llm | ||
|
||
type PromptInput struct { | ||
SystemInstruction string | ||
Prompt string | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This commit adds a new case to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This commit adds a new |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This commit changes the type of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This commit adds a new file, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package github | ||
|
||
import ( | ||
"codebleu/internal/domain/gitrepo" | ||
"net/http" | ||
) | ||
|
||
type client struct { | ||
accessToken string | ||
owner string | ||
repoSlug string | ||
httpClient *http.Client | ||
} | ||
|
||
func NewClient( | ||
owner string, | ||
repoSlug string, | ||
accessToken string, | ||
) gitrepo.Repository { | ||
httpClient := &http.Client{} | ||
return &client{ | ||
owner: owner, | ||
repoSlug: repoSlug, | ||
accessToken: accessToken, | ||
httpClient: httpClient, | ||
} | ||
} |
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.
This commit adds a new dependency,
go.uber.org/goleak
, to the project. This dependency is used to detect potential memory leaks in Go code. You can find more information about it here: https://pkg.go.dev/go.uber.org/goleak. It is important to make sure that you are not introducing any new vulnerabilities by adding this dependency. You should review the source code of the dependency, as well as any associated documentation, to make sure that you are comfortable with the security implications of adding it. If you have any concerns, please ask the author of this commit for more information.