From 95144c5f69a4a17dc8af35a8c93f792c3211afdc Mon Sep 17 00:00:00 2001 From: Roman Mohr Date: Fri, 12 Jan 2024 19:03:36 +0000 Subject: [PATCH] Implement parents_data in RevisionInfo Introduced in https://gerrit-review.git.corp.google.com/c/gerrit/+/376877. Signed-off-by: Roman Mohr --- changes.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/changes.go b/changes.go index 976387d..c20f490 100644 --- a/changes.go +++ b/changes.go @@ -487,6 +487,17 @@ type MergeInput struct { AllowConflicts bool `json:"allow_conflicts,omitempty"` } +// The ParentInfo entity contains information about the parent commit of a patch-set. +type ParentInfo struct { + BranchName string `json:"branch_name,omitempty"` + CommitID string `json:"commit_id,omitempty"` + IsMergedInTargetBranch bool `json:"is_merged_in_target_branch"` + ChangeID string `json:"change_id,omitempty"` + ChangeNumber int `json:"change_number,omitempty"` + PatchSetNumber int `json:"patch_set_number,omitempty"` + ChangeStatus string `json:"change_status,omitempty"` +} + // RevisionInfo entity contains information about a patch set. type RevisionInfo struct { Kind RevisionKind `json:"kind,omitempty"` @@ -501,6 +512,7 @@ type RevisionInfo struct { Actions map[string]ActionInfo `json:"actions,omitempty"` Reviewed bool `json:"reviewed,omitempty"` MessageWithFooter string `json:"messageWithFooter,omitempty"` + ParentsData []ParentInfo `json:"parents_data,omitempty"` } // CommentInfo entity contains information about an inline comment.