diff --git a/collector_base.go b/collector_base.go index 40dd686..0c79031 100644 --- a/collector_base.go +++ b/collector_base.go @@ -4,6 +4,7 @@ import ( "time" log "github.com/sirupsen/logrus" + devopsClient "github.com/webdevops/azure-devops-exporter/azure-devops-client" ) diff --git a/collector_processor_project.go b/collector_processor_project.go index 687467f..2f9b3d4 100644 --- a/collector_processor_project.go +++ b/collector_processor_project.go @@ -4,6 +4,7 @@ import ( "context" log "github.com/sirupsen/logrus" + devopsClient "github.com/webdevops/azure-devops-exporter/azure-devops-client" ) diff --git a/collector_project.go b/collector_project.go index 6896dda..66e3186 100644 --- a/collector_project.go +++ b/collector_project.go @@ -5,6 +5,7 @@ import ( "sync" log "github.com/sirupsen/logrus" + devopsClient "github.com/webdevops/azure-devops-exporter/azure-devops-client" ) diff --git a/metrics_build.go b/metrics_build.go index 3b349c5..eb6a76c 100644 --- a/metrics_build.go +++ b/metrics_build.go @@ -307,7 +307,7 @@ func (m *MetricsCollectorBuild) collectBuildsTimeline(ctx context.Context, logge for _, build := range list.List { timelineRecordList, _ := AzureDevopsClient.ListBuildTimeline(project.Id, int64ToString(build.Id)) for _, timelineRecord := range timelineRecordList.List { - recordType := timelineRecord.RecordType; + recordType := timelineRecord.RecordType switch strings.ToLower(recordType) { case "stage": buildStageMetric.Add(prometheus.Labels{ diff --git a/metrics_stats.go b/metrics_stats.go index c9f52a1..9d7baee 100644 --- a/metrics_stats.go +++ b/metrics_stats.go @@ -6,6 +6,7 @@ import ( "github.com/prometheus/client_golang/prometheus" log "github.com/sirupsen/logrus" + devopsClient "github.com/webdevops/azure-devops-exporter/azure-devops-client" )