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

Function convertApiRepoToScope

backend/plugins/github/impl/impl.go:333–345  ·  view source on GitHub ↗
(repo *tasks.GithubApiRepo, connectionId uint64)

Source from the content-addressed store, hash-verified

331}
332
333func convertApiRepoToScope(repo *tasks.GithubApiRepo, connectionId uint64) *models.GithubRepo {
334 var scope models.GithubRepo
335 scope.ConnectionId = connectionId
336 scope.GithubId = repo.GithubId
337 scope.CreatedDate = repo.CreatedAt.ToNullableTime()
338 scope.Language = repo.Language
339 scope.Description = repo.Description
340 scope.HTMLUrl = repo.HTMLUrl
341 scope.Name = repo.Name
342 scope.FullName = repo.FullName
343 scope.CloneUrl = repo.CloneUrl
344 return &scope
345}
346
347func replaceAcessTokenInUrl(gitURL, newCredential string) (string, errors.Error) {
348 atIndex := strings.Index(gitURL, "@")

Callers 1

EnrichOptionsFunction · 0.85

Calls 1

ToNullableTimeMethod · 0.45

Tested by

no test coverage detected