63 lines
3.0 KiB
Go
63 lines
3.0 KiB
Go
package structs
|
|
|
|
import (
|
|
"time"
|
|
|
|
gitea_api "code.gitea.io/gitea/modules/structs"
|
|
"code.gitea.io/gitea/services/gitdiff"
|
|
)
|
|
|
|
type PullRequest struct {
|
|
ID int64 `json:"id"`
|
|
URL string `json:"url"`
|
|
Index int64 `json:"number"`
|
|
Poster *gitea_api.User `json:"user"`
|
|
Title string `json:"title"`
|
|
Body string `json:"body"`
|
|
Labels []*gitea_api.Label `json:"labels"`
|
|
Milestone *gitea_api.Milestone `json:"milestone"`
|
|
Assignee *gitea_api.User `json:"assignee"`
|
|
Assignees []*gitea_api.User `json:"assignees"`
|
|
State gitea_api.StateType `json:"state"`
|
|
IsLocked bool `json:"is_locked"`
|
|
Comments int `json:"comments"`
|
|
HTMLURL string `json:"html_url"`
|
|
DiffURL string `json:"diff_url"`
|
|
PatchURL string `json:"patch_url"`
|
|
Mergeable bool `json:"mergeable"`
|
|
HasMerged bool `json:"merged"`
|
|
Merged *time.Time `json:"merged_at"`
|
|
MergedCommitID *string `json:"merge_commit_sha"`
|
|
MergedBy *gitea_api.User `json:"merged_by"`
|
|
AllowMaintainerEdit bool `json:"allow_maintainer_edit"`
|
|
Base *gitea_api.PRBranchInfo `json:"base"`
|
|
Head *gitea_api.PRBranchInfo `json:"head"`
|
|
MergeBase string `json:"merge_base"`
|
|
Deadline *time.Time `json:"due_date"`
|
|
Created *time.Time `json:"created_at"`
|
|
Updated *time.Time `json:"updated_at"`
|
|
Closed *time.Time `json:"closed_at"`
|
|
CommitNum int `json:"commit_num"`
|
|
ChangedFiles int `json:"changed_files"`
|
|
}
|
|
|
|
type ChangedFile struct {
|
|
Filename string `json:"filename"`
|
|
OldName string `json:"old_name"`
|
|
Index int `json:"index"`
|
|
Type gitdiff.DiffFileType `json:"type"`
|
|
IsBin bool `json:"is_bin"`
|
|
IsCreated bool `json:"is_created"`
|
|
IsDeleted bool `json:"is_deleted"`
|
|
IsLFSFile bool `json:"is_lfs_file"`
|
|
IsRenamed bool `json:"is_renamed"`
|
|
IsSubmodule bool `json:"is_submodule"`
|
|
Additions int `json:"additions"`
|
|
Deletions int `json:"deletions"`
|
|
Changes int `json:"changes"`
|
|
Sha string `json:"sha"`
|
|
HTMLURL string `json:"html_url,omitempty"`
|
|
ContentsURL string `json:"contents_url,omitempty"`
|
|
RawURL string `json:"raw_url,omitempty"`
|
|
}
|