Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Commit 522622c

Browse files
committed
Adding more messages to verbose mode
1 parent 712d9c0 commit 522622c

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

cmd/hiring_send.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ func RunCreateTestRepo(ctx context.Context, candidate string, testRepo string, r
7171
target := fmt.Sprintf("%s-%s", candidate, testRepo)
7272

7373
creator := repo.NewGithub(githubClient)
74-
75-
logger.Info("Creating repository...")
74+
logger.Infof("Creating repository %s/%s...", org, target)
7675
_, err = creator.CreateRepo(ctx, org, &github.Repository{
7776
Name: github.String(target),
7877
Private: github.Bool(true),
@@ -84,7 +83,7 @@ func RunCreateTestRepo(ctx context.Context, candidate string, testRepo string, r
8483
return errwrap.Wrapf("could not create github repo for candidate: {{err}}", err)
8584
}
8685

87-
logger.Info("Adding collaborators to repository...")
86+
logger.Infof("Adding %s as collaborator to %s/%s", candidate, org, target)
8887
collaboratorsOpts := []*config.Collaborator{
8988
&config.Collaborator{
9089
Username: candidate,
@@ -106,12 +105,16 @@ func RunCreateTestRepo(ctx context.Context, candidate string, testRepo string, r
106105
return errwrap.Wrapf("error cloning to repository: {{err}}", err)
107106
}
108107

108+
logger.Debugf("Repository %s/%s cloned", org, testRepo)
109+
109110
logger.Info("Changing remote...")
110111
remote, err := r.Remote(git.DefaultRemoteName)
111112
if err != nil {
112113
return errwrap.Wrapf("error changing remote for repository: {{err}}", err)
113114
}
114115

116+
logger.Debugf("Remote on %s/%s changed to %s", org, testRepo, git.DefaultRemoteName)
117+
115118
logger.Info("Pushing changes...")
116119
remote.Config().URLs = []string{fmt.Sprintf("https://%[email protected]/%s/%s", cfg.GithubTestOrg.Token, org, target)}
117120
err = remote.Push(&git.PushOptions{

cmd/repo_create.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package cmd
33
import (
44
"context"
55
"errors"
6+
"strconv"
67

78
"github.com/hellofresh/github-cli/pkg/zappr"
89

@@ -86,6 +87,15 @@ func RunCreateRepo(ctx context.Context, repoName string, opts *CreateRepoOptions
8687
return errors.New("please provide an organization")
8788
}
8889

90+
logger.Debug("Create options:")
91+
logger.Debugf("\tConfigure PullApprove? %s", strconv.FormatBool(opts.HasPullApprove))
92+
logger.Debugf("\tConfigure Zappr? %s", strconv.FormatBool(opts.HasZappr))
93+
logger.Debugf("\tConfigure GitHub teams? %s", strconv.FormatBool(opts.HasTeams))
94+
logger.Debugf("\tConfigure collaborators? %s", strconv.FormatBool(opts.HasCollaborators))
95+
logger.Debugf("\tAdd labels to repository? %s", strconv.FormatBool(opts.HasLabels))
96+
logger.Debugf("\tAdd webhooks to repository? %s", strconv.FormatBool(opts.HasWebhooks))
97+
logger.Debugf("\tConfigure branch protection? %s", strconv.FormatBool(opts.HasBranchProtections))
98+
8999
description := opts.Description
90100
githubOpts := &repo.GithubRepoOpts{
91101
PullApprove: &repo.PullApproveOpts{
@@ -104,7 +114,7 @@ func RunCreateRepo(ctx context.Context, repoName string, opts *CreateRepoOptions
104114

105115
creator := repo.NewGithub(githubClient)
106116

107-
logger.Info("Creating repository...")
117+
logger.Infof("Creating repository %s/%s...", org, repoName)
108118
ghRepo, err := creator.CreateRepo(ctx, org, &github.Repository{
109119
Name: github.String(repoName),
110120
Description: github.String(description),

0 commit comments

Comments
 (0)