feat: correctly implement bitbucket & add OpenAIAdapter
This commit is contained in:
44
internal/gitadapters/bitbucket/model.go
Normal file
44
internal/gitadapters/bitbucket/model.go
Normal file
@@ -0,0 +1,44 @@
|
||||
package bitbucket
|
||||
|
||||
type Anchor struct {
|
||||
Path string `json:"path"`
|
||||
Line int `json:"line"`
|
||||
LineType string `json:"lineType,omitempty"`
|
||||
FileType string `json:"fileType"`
|
||||
FromHash string `json:"fromHash,omitempty"`
|
||||
ToHash string `json:"toHash,omitempty"`
|
||||
DiffType string `json:"diffType,omitempty"`
|
||||
}
|
||||
|
||||
type Comment struct {
|
||||
Content string `json:"text"`
|
||||
Anchor Anchor `json:"anchor"`
|
||||
}
|
||||
|
||||
type PullRequest struct {
|
||||
ID int64 `json:"id"`
|
||||
Version int `json:"version"`
|
||||
Title string `json:"title"`
|
||||
State string `json:"state"`
|
||||
Open bool `json:"open"`
|
||||
Closed bool `json:"closed"`
|
||||
FromRef Ref `json:"fromRef"`
|
||||
ToRef Ref `json:"toRef"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
type Ref struct {
|
||||
ID string `json:"id"`
|
||||
DisplayID string `json:"displayId"`
|
||||
LatestCommit string `json:"latestCommit"`
|
||||
Repository Repository `json:"repository"`
|
||||
}
|
||||
|
||||
type Repository struct {
|
||||
Slug string `json:"slug"`
|
||||
Project Project `json:"project"`
|
||||
}
|
||||
|
||||
type Project struct {
|
||||
Key string `json:"key"`
|
||||
}
|
||||
Reference in New Issue
Block a user