Skip to content

Commit

Permalink
fix: update error message to fix grammar (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
martincostello authored Apr 11, 2023
1 parent b250c9b commit 5a4c990
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions internal/multigitter/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion tests/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a4c990

Please sign in to comment.