mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-06 18:58:41 +00:00
22 lines
378 B
Go
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)
|
|
}
|
|
}
|