MCPcopy Index your code
hub / github.com/apache/devlake / detectUserReportFormat

Function detectUserReportFormat

backend/plugins/q_dev/tasks/s3_data_extractor.go:173–181  ·  view source on GitHub ↗

detectUserReportFormat checks CSV headers to determine if this is the new user_report format

(headers []string)

Source from the content-addressed store, hash-verified

171
172// detectUserReportFormat checks CSV headers to determine if this is the new user_report format
173func detectUserReportFormat(headers []string) bool {
174 for _, h := range headers {
175 trimmed := strings.TrimSpace(h)
176 if trimmed == "Client_Type" || trimmed == "Credits_Used" {
177 return true
178 }
179 }
180 return false
181}
182
183// createUserReportData creates a QDevUserReport from a new-format CSV record
184func createUserReportData(logger interface {

Callers 2

processCSVDataFunction · 0.85

Calls

no outgoing calls

Tested by 1