diff --git a/.golangci.yml b/.golangci.yml index 9da3094..9c3c11a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -100,33 +100,33 @@ linters: - errcheck - errorlint - funlen - - gocheckcompilerdirectives - - gochecknoinits - - goconst - - gocritic - - gocyclo - - godox - - gofmt - - goimports - - mnd - - goprintffuncname - - gosec - - gosimple - - govet - - ineffassign - - lll - - misspell - - nakedret - - noctx - - nolintlint - - revive - - staticcheck - - stylecheck - - testifylint - - unconvert - - unparam - - unused - - whitespace + # - gocheckcompilerdirectives + # - gochecknoinits + # - goconst + # - gocritic + # - gocyclo + # - godox + # - gofmt + # - goimports + # - mnd + # - goprintffuncname + # - gosec + # - gosimple + # - govet + # - ineffassign + # - lll + # - misspell + # - nakedret + # - noctx + # - nolintlint + # - revive + # - staticcheck + # - stylecheck + # - testifylint + # - unconvert + # - unparam + # - unused + # - whitespace # This list of linters is not a recommendation (same thing for all this configuration file). # We intentionally use a limited set of linters. diff --git a/cmd/create.go b/cmd/create.go index e37ba8e..e2964e6 100644 --- a/cmd/create.go +++ b/cmd/create.go @@ -121,7 +121,10 @@ var createCmd = &cobra.Command{ fmt.Println(gitTree) // PUSH COMMIT - sthingsCli.PushCommit(client, ref, gitTree, groupName, repositoryName, authorName, authorEmail, commitMessage) + err = sthingsCli.PushCommit(client, ref, gitTree, groupName, repositoryName, authorName, authorEmail, commitMessage) + if err != nil { + log.Fatalf("UNABLE TO PUSH THE COMMIT: %s\n", err) + } case "pr": log.Info("CREATING PULL REQUEST") diff --git a/internal/git.go b/internal/git.go index c5bcc8f..35a0552 100644 --- a/internal/git.go +++ b/internal/git.go @@ -68,7 +68,10 @@ func GitCommitFile(repository string, auth *http.BasicAuth, fileContent []byte, fmt.Println(w.Status()) // git commit -m $message - w.Commit(commitMsg, &git.CommitOptions{}) + _, commited := w.Commit(commitMsg, &git.CommitOptions{}) + if commited != nil { + return fmt.Errorf("could not git commit: %w", commited) + } //Push the code to the remote err = r.Push(&git.PushOptions{ diff --git a/surveys/profiles.go b/surveys/profiles.go index 99b21e0..cf7242c 100644 --- a/surveys/profiles.go +++ b/surveys/profiles.go @@ -98,7 +98,10 @@ func SelectReleaseProfiles(yamlFile string) (selectedReleaseProfiles []string, a } - pterm.DefaultTable.WithHasHeader().WithBoxed().WithData(repositoryTable).Render() + rendered := pterm.DefaultTable.WithHasHeader().WithBoxed().WithData(repositoryTable).Render() + if err := rendered; err != nil { + log.Error(err) + } selectedReleaseProfiles = sthingsCli.AskMultiSelectQuestion("SELECT TO RELEASE:", allKeys)