add new field for UploadCommitInfo struct
This commit is contained in:
parent
2d1a5e1402
commit
2b9f936d25
|
|
@ -2,13 +2,16 @@ package structs
|
|||
|
||||
// UploadCommitOption is to upload commit info to blockchain
|
||||
type UploadCommitOption struct {
|
||||
CommitHash string `json:"commit_hash"`
|
||||
RepoID string `json:"repo_id"`
|
||||
Author string `json:"author"`
|
||||
Email string `json:"email"`
|
||||
Time string `json:"time"`
|
||||
Content string `json:"content"`
|
||||
CommitDiff string `json:"commit_diff"`
|
||||
CommitHash string `json:"commit_hash"`
|
||||
RepoID string `json:"repo_id"`
|
||||
Author string `json:"author"`
|
||||
AuthorEmail string `json:"author_email"`
|
||||
Committer string `json:"committer"`
|
||||
CommitterEmail string `json:"committer_email"`
|
||||
AuthorTime string `json:"author_time"`
|
||||
CommitterTime string `json:"committer_time"`
|
||||
Content string `json:"content"`
|
||||
CommitDiff string `json:"commit_diff"`
|
||||
}
|
||||
|
||||
type ResponseCommit struct {
|
||||
|
|
|
|||
|
|
@ -11,13 +11,16 @@ type FiscoBcos struct {
|
|||
TokenBalance [][]interface{} `json:"token_balance"` // 用户初始Token分配
|
||||
|
||||
// repo commit 相关
|
||||
CommitHash string `json:"commit_hash"`
|
||||
RepoID string `json:"repo_id"`
|
||||
Author string `json:"author"`
|
||||
Email string `json:"email"`
|
||||
Time string `json:"time"`
|
||||
Content string `json:"content"`
|
||||
CommitDiff string `json:"commit_diff"`
|
||||
CommitHash string `json:"commit_hash"`
|
||||
RepoID string `json:"repo_id"`
|
||||
Author string `json:"author"`
|
||||
AuthorEmail string `json:"author_email"`
|
||||
Committer string `json:"committer"`
|
||||
CommitterEmail string `json:"committer_email"`
|
||||
AuthorTime string `json:"author_time"`
|
||||
CommitterTime string `json:"committer_time"`
|
||||
Content string `json:"content"`
|
||||
CommitDiff string `json:"commit_diff"`
|
||||
|
||||
// repo push 相关
|
||||
PushID string `json:"push_Id"`
|
||||
|
|
@ -27,6 +30,7 @@ type FiscoBcos struct {
|
|||
Branch string `json:"branch"`
|
||||
Size uint64 `json:"size"`
|
||||
CommitShas []string `json:"commit_shas"`
|
||||
Time string `json:"time"`
|
||||
// repo_id, username, time
|
||||
|
||||
// repo pull request 相关
|
||||
|
|
|
|||
|
|
@ -29,13 +29,16 @@ func HandleAllRoutes(ctx *macaron.Context, opt api.FiscoBcos, logger *log.Logger
|
|||
case "upload commit info":
|
||||
repo.UploadCommitInfo(ctx,
|
||||
api.UploadCommitOption{
|
||||
CommitHash: opt.CommitHash,
|
||||
RepoID: opt.RepoID,
|
||||
Author: opt.Author,
|
||||
Email: opt.Email,
|
||||
Time: opt.Time,
|
||||
Content: opt.Content,
|
||||
CommitDiff: opt.CommitDiff,
|
||||
CommitHash: opt.CommitHash,
|
||||
RepoID: opt.RepoID,
|
||||
Author: opt.Author,
|
||||
AuthorEmail: opt.AuthorEmail,
|
||||
Committer: opt.Committer,
|
||||
CommitterEmail: opt.CommitterEmail,
|
||||
AuthorTime: opt.AuthorTime,
|
||||
CommitterTime: opt.CommitterTime,
|
||||
Content: opt.Content,
|
||||
CommitDiff: opt.CommitDiff,
|
||||
},
|
||||
logger)
|
||||
case "query commit info":
|
||||
|
|
|
|||
Loading…
Reference in New Issue