MCPcopy Index your code
hub / github.com/rilldata/rill / repoInSyncFlow

Function repoInSyncFlow

cli/cmd/project/connect_github.go:516–537  ·  view source on GitHub ↗
(ch *cmdutil.Helper, gitPath, subpath, remoteName string)

Source from the content-addressed store, hash-verified

514}
515
516func 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
539func projectNamePrompt(ctx context.Context, ch *cmdutil.Helper, orgName string) (string, error) {
540 questions := []*survey.Question{

Callers 1

ConnectGithubFlowFunction · 0.85

Calls 4

RunGitStatusFunction · 0.92
YesNoPromptFunction · 0.92
PrintfWarnMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected