(ch *cmdutil.Helper, gitPath, subpath, remoteName string)
| 514 | } |
| 515 | |
| 516 | func repoInSyncFlow(ch *cmdutil.Helper, gitPath, subpath, remoteName string) (bool, error) { |
| 517 | st, err := gitutil.RunGitStatus(gitPath, subpath, remoteName, "") |
| 518 | if err != nil { |
| 519 | return false, err |
| 520 | } |
| 521 | |
| 522 | if !st.LocalChanges && st.LocalCommits == 0 { |
| 523 | return true, nil |
| 524 | } |
| 525 | |
| 526 | if st.LocalChanges { |
| 527 | ch.PrintfWarn("Some files have been locally modified. These changes will not be present in the deployed project.\n") |
| 528 | } |
| 529 | if st.LocalCommits > 0 { |
| 530 | ch.PrintfWarn("Local commits are not pushed to remote yet. These changes will not be present in the deployed project.\n") |
| 531 | } |
| 532 | if !ch.Interactive { |
| 533 | return false, fmt.Errorf("commit and push your changes to remote before deploying") |
| 534 | } |
| 535 | ok, err := cmdutil.YesNoPrompt("Do you want to continue", true) |
| 536 | return ok, err |
| 537 | } |
| 538 | |
| 539 | func projectNamePrompt(ctx context.Context, ch *cmdutil.Helper, orgName string) (string, error) { |
| 540 | questions := []*survey.Question{ |
no test coverage detected