Repository: jesseduffield/lazygit (language: go)

Issue:
Open PR doesn't work with BitBucket and custom SSH username
**Describe the bug**
BitBucket allows to use a different SSH username than the traditional `git` (i.e. `my-username@bitbucket.org` instead of `git@bitbucket.org`). It is useful for working with multiple SSH keys (personal and professional). It is nicely described [here](https://bitbucket.org/blog/better-support-multiple-ssh-keys).

However lazygit uses [the default regex](https://github.com/jesseduffield/lazygit/blob/bcc04664982f78fe919654f06a348e1ac25e364a/pkg/commands/hosting_service/definitions.go#L7) `^git@.*:(?P<owner>.*)/(?P<repo>.*?)(?:\.git)?$` for parsing BitBucket repo details that allows only the `git` username.

It would probably be enough to change the `regexStrings` inside `bitbucketServiceDef`to a more general regex like `^.*@.*:(?P<owner>.*)/(?P<repo>.*?)(?:\.git)?$`. Should I create a pull request?


**To Reproduce**
Steps to reproduce the behavior:
1. Use the `my-username@bitbucket.org` remote.
2. Select a branch.
3. Press `o`
4. See the error `Failed to parse repo information from url`

**Expected behavior**
It should open a new PR in the browser.

**Desktop (please complete the following information):**
 - OS: macOS
 - Lazygit Version 0.33

Thank you for such an amazing tool! ❤️ 



Discussion / hints:
@xxdavid that makes sense. Yes, please do make a PR! I'll be happy to review

Fix patch:
diff --git a/pkg/commands/hosting_service/definitions.go b/pkg/commands/hosting_service/definitions.go
index 04d496aa81d..c53ee050778 100644
--- a/pkg/commands/hosting_service/definitions.go
+++ b/pkg/commands/hosting_service/definitions.go
@@ -24,8 +24,11 @@ var bitbucketServiceDef = ServiceDefinition{
 	pullRequestURLIntoDefaultBranch: "/pull-requests/new?source={{.From}}&t=1",
 	pullRequestURLIntoTargetBranch:  "/pull-requests/new?source={{.From}}&dest={{.To}}&t=1",
 	commitURL:                       "/commits/{{.CommitSha}}",
-	regexStrings:                    defaultUrlRegexStrings,
-	repoURLTemplate:                 defaultRepoURLTemplate,
+	regexStrings: []string{
+		`^(?:https?|ssh)://.*/(?P<owner>.*)/(?P<repo>.*?)(?:\.git)?$`,
+		`^.*@.*:(?P<owner>.*)/(?P<repo>.*?)(?:\.git)?$`,
+	},
+	repoURLTemplate: defaultRepoURLTemplate,
 }
 
 var gitLabServiceDef = ServiceDefinition{


Test patch:
diff --git a/pkg/commands/hosting_service/hosting_service_test.go b/pkg/commands/hosting_service/hosting_service_test.go
index 0c926117d41..b92daa98d54 100644
--- a/pkg/commands/hosting_service/hosting_service_test.go
+++ b/pkg/commands/hosting_service/hosting_service_test.go
@@ -115,6 +115,15 @@ func TestGetPullRequestURL(t *testing.T) {
 				assert.Equal(t, "https://gitlab.com/peter/public/calculator/merge_requests/new?merge_request[source_branch]=feature%2Fcommit-ui&merge_request[target_branch]=epic%2Fui", url)
 			},
 		},
+		{
+			testName:  "Opens a link to new pull request on bitbucket with a custom SSH username",
+			from:      "feature/profile-page",
+			remoteUrl: "john@bitbucket.org:johndoe/social_network.git",
+			test: func(url string, err error) {
+				assert.NoError(t, err)
+				assert.Equal(t, "https://bitbucket.org/johndoe/social_network/pull-requests/new?source=feature%2Fprofile-page&t=1", url)
+			},
+		},
 		{
 			testName:  "Opens a link to new pull request on Azure DevOps (SSH)",
 			from:      "feature/new",