Skip to content

Commit

Permalink
Handle to/from URLs without .git suffix (#82)
Browse files Browse the repository at this point in the history
* Handle to/from URLs without .git suffix
  • Loading branch information
a-roberts authored May 20, 2020
1 parent b4b4464 commit ab2c8f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/avancement/service_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ func createPullRequest(ctx context.Context, fromURL, toURL, newBranchName, commi
}

u, _ := url.Parse(toURL)
// take out ".git" at the end
pr, _, err := client.PullRequests.Create(ctx, u.Path[1:len(u.Path)-4], prInput)
pathToUse := strings.TrimPrefix(strings.TrimSuffix(u.Path, ".git"), "/")
pr, _, err := client.PullRequests.Create(ctx, pathToUse, prInput)
return pr, err
}

Expand Down

0 comments on commit ab2c8f1

Please sign in to comment.