From 32fe9aebf749982dd1b03bcd8e22a53665a44b05 Mon Sep 17 00:00:00 2001 From: Bruno Meneguele Date: Tue, 10 Aug 2021 19:38:10 -0300 Subject: [PATCH] pipeline: add ProjectID to pipeline structure The "project_id" information is returned from the pipeline API endpoint since GitLab 13 (not sure the minor version), but go-gitlab Pipeline and PipelineInfo wasn't storing it. Add it to both structures. Signed-off-by: Bruno Meneguele --- pipelines.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipelines.go b/pipelines.go index aedcefd6c..fe61ac30c 100644 --- a/pipelines.go +++ b/pipelines.go @@ -44,6 +44,7 @@ type PipelineVariable struct { // GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html type Pipeline struct { ID int `json:"id"` + ProjectID int `json:"project_id"` Status string `json:"status"` Ref string `json:"ref"` SHA string `json:"sha"` @@ -131,6 +132,7 @@ func (p PipelineTestReport) String() string { // on other assets, like Commit. type PipelineInfo struct { ID int `json:"id"` + ProjectID int `json:"project_id"` Status string `json:"status"` Ref string `json:"ref"` SHA string `json:"sha"`