Skip to content

Commit

Permalink
patch: Add merge requests block to project export config
Browse files Browse the repository at this point in the history
  • Loading branch information
cluttrdev committed Jun 21, 2024
1 parent 58f3b84 commit 1302c71
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 4 additions & 0 deletions configs/gitlab-exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ project_defaults:
# If enabled, this may significantly increase the export time since it
# requires fetching entire job logs to parse for embedded metrics.
enabled: true

mergerequests:
# Whether or not to export merge request data
enabled: true

catch_up:
# Whether to export data from past pipelines at startup.
Expand Down
13 changes: 9 additions & 4 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ type ProjectSettings struct {
}

type ProjectExport struct {
Sections ProjectExportSections `default:"{}" yaml:"sections"`
TestReports ProjectExportTestReports `default:"{}" yaml:"testreports"`
Traces ProjectExportTraces `default:"{}" yaml:"traces"`
Metrics ProjectExportMetrics `default:"{}" yaml:"metrics"`
Sections ProjectExportSections `default:"{}" yaml:"sections"`
TestReports ProjectExportTestReports `default:"{}" yaml:"testreports"`
Traces ProjectExportTraces `default:"{}" yaml:"traces"`
Metrics ProjectExportMetrics `default:"{}" yaml:"metrics"`
MergeRequests ProjectExportMergeRequests `default:"{}" yaml:"mergerequests"`
}

type ProjectExportSections struct {
Expand All @@ -73,6 +74,10 @@ type ProjectExportMetrics struct {
Enabled bool `default:"true" yaml:"enabled"`
}

type ProjectExportMergeRequests struct {
Enabled bool `default:"true" yaml:"enabled"`
}

type ProjectCatchUp struct {
Enabled bool `default:"false" yaml:"enabled"`
UpdatedAfter string `default:"" yaml:"updated_after"`
Expand Down

0 comments on commit 1302c71

Please sign in to comment.