From 0212e16159769bee035c75c7f404743ce4733720 Mon Sep 17 00:00:00 2001 From: georgecao Date: Tue, 21 Apr 2020 17:30:20 +0800 Subject: [PATCH] modify json format file for pr commit file list --- gitee/model_pull_request_files.go | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/gitee/model_pull_request_files.go b/gitee/model_pull_request_files.go index 538698f..1f1dd6f 100644 --- a/gitee/model_pull_request_files.go +++ b/gitee/model_pull_request_files.go @@ -9,14 +9,26 @@ package gitee +type PRFilePath struct { + Diff string `json:"diff,omitempty"` + Newpath string `json:"new_path,omitempty"` + Oldpath string `json:"old_path,omitempty"` + Amode string `json:"a_mode,omitempty"` + Bmode string `json:"b_mode,omitempty"` + Newfile bool `json:"new_file,omitempty"` + Renamefile bool `json:"renamed_file,omitempty"` + Deletefile bool `json:"deleted_file,omitempty"` + Toolarge bool `json:"too_large,omitempty"` +} + // Pull Request Commit文件列表。最多显示300条diff type PullRequestFiles struct { - Sha string `json:"sha,omitempty"` - Filename string `json:"filename,omitempty"` - Status string `json:"status,omitempty"` - Additions string `json:"additions,omitempty"` - Deletions string `json:"deletions,omitempty"` - BlobUrl string `json:"blob_url,omitempty"` - RawUrl string `json:"raw_url,omitempty"` - Patch string `json:"patch,omitempty"` + Sha string `json:"sha,omitempty"` + Filename string `json:"filename,omitempty"` + Status string `json:"status,omitempty"` + Additions string `json:"additions,omitempty"` + Deletions string `json:"deletions,omitempty"` + BlobUrl string `json:"blob_url,omitempty"` + RawUrl string `json:"raw_url,omitempty"` + Patch PRFilePath `json:"patch,omitempty"` } -- Gitee