Files
atlantis/vendor/github.com/lkysow/go-gitlab/examples/pipelines.go
Luke Kysow fa43febf60 Gitlab (#190)
Gitlab initial implementation
2017-11-16 13:22:28 -08:00

22 lines
378 B
Go

package main
import (
"log"
"github.com/xanzy/go-gitlab"
)
func pipelineExample() {
git := gitlab.NewClient(nil, "yourtokengoeshere")
git.SetBaseURL("https://gitlab.com/api/v4")
pipelines, _, err := git.Pipelines.ListProjectPipelines(2743054)
if err != nil {
log.Fatal(err)
}
for _, pipeline := range pipelines {
log.Printf("Found pipeline: %v", pipeline)
}
}