Skip to content

Commit

Permalink
pipeline: add ProjectID to pipeline structure
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bmeneg committed Aug 10, 2021
1 parent b746152 commit 32fe9ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pipelines.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand Down

0 comments on commit 32fe9ae

Please sign in to comment.