MCPcopy Index your code
hub / github.com/bytebase/bytebase / getVCSUser

Function getVCSUser

action/command/vcs_user.go:23–34  ·  view source on GitHub ↗
(platform world.JobPlatform)

Source from the content-addressed store, hash-verified

21var gitLabBotUserNameRE = regexp.MustCompile(`^(project|group)_\d+_bot_[a-z0-9]+$`)
22
23func getVCSUser(platform world.JobPlatform) *v1pb.VCSUser {
24 switch platform {
25 case world.GitHub:
26 return getGitHubVCSUser()
27 case world.GitLab:
28 return getGitLabVCSUser()
29 case world.Bitbucket:
30 return getBitbucketVCSUser()
31 default:
32 return nil
33 }
34}
35
36func getGitHubVCSUser() *v1pb.VCSUser {
37 eventName := os.Getenv("GITHUB_EVENT_NAME")

Calls 3

getGitHubVCSUserFunction · 0.85
getGitLabVCSUserFunction · 0.85
getBitbucketVCSUserFunction · 0.85