diff --git a/internal/multigitter/run.go b/internal/multigitter/run.go index 8f17b1f1..378a5917 100755 --- a/internal/multigitter/run.go +++ b/internal/multigitter/run.go @@ -59,7 +59,7 @@ type Runner struct { Fork bool // If set, create a fork and make the pull request from it ForkOwner string // The owner of the new fork. If empty, the fork should happen on the logged in user - ConflictStrategy ConflictStrategy // Defines what will happen if a branch does already exist + ConflictStrategy ConflictStrategy // Defines what will happen if a branch already exists Draft bool // If set, creates Pull Requests as draft @@ -73,7 +73,7 @@ type Runner struct { var errAborted = errors.New("run was never started because of aborted execution") var errRejected = errors.New("changes were not included since they were manually rejected") var errNoChange = errors.New("no data was changed") -var errBranchExist = errors.New("the new branch does already exist") +var errBranchExist = errors.New("the new branch already exists") type dryRunPullRequest struct { status scm.PullRequestStatus @@ -287,12 +287,12 @@ func (r *Runner) runSingleRepo(ctx context.Context, repo scm.Repository) (scm.Pu remoteName = "fork" } - // Determine if a branch already exist and (depending on the conflict strategy) skip making changes + // Determine if a branch already exists and (depending on the conflict strategy) skip making changes featureBranchExist := false if !r.SkipPullRequest { featureBranchExist, err = sourceController.BranchExist(remoteName, r.FeatureBranch) if err != nil { - return nil, errors.Wrap(err, "could not verify if branch already exist") + return nil, errors.Wrap(err, "could not verify if branch already exists") } else if featureBranchExist && r.ConflictStrategy == ConflictStrategySkip { return nil, errBranchExist } diff --git a/tests/table_test.go b/tests/table_test.go index a3b33682..4749a958 100644 --- a/tests/table_test.go +++ b/tests/table_test.go @@ -371,7 +371,7 @@ func TestTable(t *testing.T) { assert.Contains(t, runData.logOut, "Running on 2 repositories") assert.Contains(t, runData.logOut, "Cloning and running script") - assert.Equal(t, `The new branch does already exist: + assert.Equal(t, `The new branch already exists: owner/already-existing-branch Repositories with a successful run: owner/should-change #1