From 4e59847322975a25ade9aefc3288c21f82f2b945 Mon Sep 17 00:00:00 2001 From: yecaowulei <31679891+yecaowulei@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:46:39 +0800 Subject: [PATCH 1/3] Add Extended_trailers to snippets struct --- commits.go | 1 + 1 file changed, 1 insertion(+) diff --git a/commits.go b/commits.go index a714f6fef..9109bab37 100644 --- a/commits.go +++ b/commits.go @@ -52,6 +52,7 @@ type Commit struct { LastPipeline *PipelineInfo `json:"last_pipeline"` ProjectID int `json:"project_id"` Trailers map[string]string `json:"trailers"` + Extended_trailers map[string]string `json:"extended_trailers"` WebURL string `json:"web_url"` } From b34cc11d9b051db815bd8e519c19e9fa387cd2c9 Mon Sep 17 00:00:00 2001 From: yecaowulei <31679891+yecaowulei@users.noreply.github.com> Date: Tue, 18 Jun 2024 15:41:24 +0800 Subject: [PATCH 2/3] Add ExtendedTrailers to snippets struct --- commits.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commits.go b/commits.go index 9109bab37..0024b06f7 100644 --- a/commits.go +++ b/commits.go @@ -52,7 +52,7 @@ type Commit struct { LastPipeline *PipelineInfo `json:"last_pipeline"` ProjectID int `json:"project_id"` Trailers map[string]string `json:"trailers"` - Extended_trailers map[string]string `json:"extended_trailers"` + ExtendedTrailers map[string]string `json:"extended_trailers"` WebURL string `json:"web_url"` } From 6bc030a6574ed2fcac4f14cfa73bb0d445cb6125 Mon Sep 17 00:00:00 2001 From: yecaowulei <31679891+yecaowulei@users.noreply.github.com> Date: Tue, 18 Jun 2024 15:55:31 +0800 Subject: [PATCH 3/3] format code --- commits.go | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/commits.go b/commits.go index 0024b06f7..c1a9ef3d6 100644 --- a/commits.go +++ b/commits.go @@ -35,25 +35,25 @@ type CommitsService struct { // // GitLab API docs: https://docs.gitlab.com/ee/api/commits.html type Commit struct { - ID string `json:"id"` - ShortID string `json:"short_id"` - Title string `json:"title"` - AuthorName string `json:"author_name"` - AuthorEmail string `json:"author_email"` - AuthoredDate *time.Time `json:"authored_date"` - CommitterName string `json:"committer_name"` - CommitterEmail string `json:"committer_email"` - CommittedDate *time.Time `json:"committed_date"` - CreatedAt *time.Time `json:"created_at"` - Message string `json:"message"` - ParentIDs []string `json:"parent_ids"` - Stats *CommitStats `json:"stats"` - Status *BuildStateValue `json:"status"` - LastPipeline *PipelineInfo `json:"last_pipeline"` - ProjectID int `json:"project_id"` - Trailers map[string]string `json:"trailers"` + ID string `json:"id"` + ShortID string `json:"short_id"` + Title string `json:"title"` + AuthorName string `json:"author_name"` + AuthorEmail string `json:"author_email"` + AuthoredDate *time.Time `json:"authored_date"` + CommitterName string `json:"committer_name"` + CommitterEmail string `json:"committer_email"` + CommittedDate *time.Time `json:"committed_date"` + CreatedAt *time.Time `json:"created_at"` + Message string `json:"message"` + ParentIDs []string `json:"parent_ids"` + Stats *CommitStats `json:"stats"` + Status *BuildStateValue `json:"status"` + LastPipeline *PipelineInfo `json:"last_pipeline"` + ProjectID int `json:"project_id"` + Trailers map[string]string `json:"trailers"` ExtendedTrailers map[string]string `json:"extended_trailers"` - WebURL string `json:"web_url"` + WebURL string `json:"web_url"` } // CommitStats represents the number of added and deleted files in a commit.