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

Function normalizeUserId

backend/plugins/q_dev/tasks/s3_logging_extractor.go:436–441  ·  view source on GitHub ↗

normalizeUserId strips the "d-{directoryId}." prefix from Identity Center user IDs so that logging user IDs match the short UUID format used in user-report CSVs.

(userId string)

Source from the content-addressed store, hash-verified

434// normalizeUserId strips the "d-{directoryId}." prefix from Identity Center user IDs
435// so that logging user IDs match the short UUID format used in user-report CSVs.
436func normalizeUserId(userId string) string {
437 if idx := strings.LastIndex(userId, "."); idx != -1 && strings.HasPrefix(userId, "d-") {
438 return userId[idx+1:]
439 }
440 return userId
441}
442
443var ExtractQDevLoggingDataMeta = plugin.SubTaskMeta{
444 Name: "extractQDevLoggingData",

Callers 4

parseChatRecordFunction · 0.85
parseCompletionRecordFunction · 0.85
createUserReportDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected