-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmessages.go
More file actions
46 lines (43 loc) · 2 KB
/
Copy pathmessages.go
File metadata and controls
46 lines (43 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package main
import "fmt"
const (
MsgFetchingContext = "✈️ xplane: Gathering project context..."
MsgGenericCommand = " - \ue795 Running generic command '%s' ...\n"
MsgGetCodeStats = " - \ueb03 Analyzing code stats..."
MsgGetLeakedSecrets = " - \uf43d Detecting potentially leaked secrets..."
MsgCheckingGitStatus = " - \ue65d Checking local git status..."
MsgFetchingGitLog = " - \ue65d Fetching recent git log..."
MsgFetchingGitDiff = " - \ue65d Fetching uncommitted diff..."
MsgFetchingGithubRemoteInfo = " - \uF09B Fetching info from GitHub: %s"
MsgFetchingGitlabRemoteInfo = " - \ue65c Fetching info from GitLab: %s"
MsgAnalyzingContext = "\uee0d xplane: Context has changed, analyzing with %s provider using '%s'...\n\n\n"
MsgKnowledgeInitialized = "\ue28c Initialized project knowledge file at .xplane/KNOWLEDGE.md"
MsgKnowledgeUpdated = "\ue28c Project knowledge updated."
)
func buildRemoteInfoMsg(providerName string, commandName string) string {
switch providerName {
case "github":
if commandName == "release" {
return fmt.Sprintf(MsgFetchingGithubRemoteInfo, "Getting latest release...")
}
if commandName == "github_prs" {
return fmt.Sprintf(MsgFetchingGithubRemoteInfo, "Getting open PRs...")
}
if commandName == "git_branch_status" {
return fmt.Sprintf(MsgFetchingGithubRemoteInfo, "Comparing current branch to upstream...")
}
case "gitlab":
if commandName == "release" {
return fmt.Sprintf(MsgFetchingGitlabRemoteInfo, "Getting latest release...")
}
if commandName == "gitlab_mrs" {
return fmt.Sprintf(MsgFetchingGitlabRemoteInfo, "Getting open MRs...")
}
if commandName == "git_branch_status" {
return fmt.Sprintf(MsgFetchingGitlabRemoteInfo, "Comparing current branch to upstream...")
}
default:
return fmt.Sprintf("Unexpected command: %s", commandName)
}
return fmt.Sprintf("Unexpected git provider: %s", providerName)
}