Skip to content

Commit a7912cd

Browse files
authored
Rename package avancement to promotion (#99)
Also remove unnecessary TODO statement.
1 parent dde5769 commit a7912cd

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

pkg/cmd/promote.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"log"
77

88
"github.com/mitchellh/go-homedir"
9-
"github.com/rhd-gitops-example/services/pkg/avancement"
109
"github.com/rhd-gitops-example/services/pkg/git"
10+
"github.com/rhd-gitops-example/services/pkg/promotion"
1111
"github.com/spf13/cobra"
1212
"github.com/spf13/viper"
1313
"github.com/tcnksm/go-gitconfig"
@@ -128,7 +128,7 @@ func promoteAction(c *cobra.Command, args []string) error {
128128
if err != nil {
129129
return fmt.Errorf("unable to establish credentials: %w", err)
130130
}
131-
return avancement.New(cacheDir, author, avancement.WithDebug(debug), avancement.WithInsecureSkipVerify(insecureSkipVerify), avancement.WithRepoType(repoType)).Promote(service, fromRepo, toRepo, newBranchName, msg, keepCache)
131+
return promotion.New(cacheDir, author, promotion.WithDebug(debug), promotion.WithInsecureSkipVerify(insecureSkipVerify), promotion.WithRepoType(repoType)).Promote(service, fromRepo, toRepo, newBranchName, msg, keepCache)
132132
}
133133

134134
func newAuthor() (*git.Author, error) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package avancement
1+
package promotion
22

33
import (
44
"fmt"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package avancement
1+
package promotion
22

33
import (
44
"testing"
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package avancement
1+
package promotion
22

33
import (
44
"context"
@@ -246,7 +246,6 @@ func (s *ServiceManager) cloneRepo(repoURL, branch string) (git.Repo, error) {
246246
func createPullRequest(ctx context.Context, fromURL, toURL, newBranchName, commitMsg string, client *scm.Client, fromLocal bool) (*scm.PullRequest, error) {
247247
prInput, err := makePullRequestInput(fromLocal, fromURL, toURL, newBranchName, commitMsg)
248248
if err != nil {
249-
// TODO: improve this error message
250249
return nil, err
251250
}
252251

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package avancement
1+
package promotion
22

33
import (
44
"errors"

0 commit comments

Comments
 (0)