Commit graph

20 commits

Author SHA1 Message Date
Ilya Kiselev 990db1f676 Add 'copy branch URL to clipboard' feature
Adds a keybinding (default: 'y') in the branches panel to copy the
branch's URL on the hosting service to the clipboard.

Each supported hosting service has a dedicated URL template:
- GitHub:           /tree/<branch>
- GitLab:           /-/tree/<branch>
- Bitbucket:        /branch/<branch>
- Azure DevOps:     ?version=GB<branch>
- Bitbucket Server: /browse?at=<branch>
- Gitea/Codeberg:   /src/branch/<branch>

Closes #1959
2026-07-10 16:19:06 +03:00
Stefan Haller 692f56a61b Optimize regex compilations
Compile them only once at startup. I didn't measure if this makes a difference,
but it's easy to do, and now that we potentially need to check them more often,
it might be worth it.
2026-05-10 15:28:14 +02:00
Jesse Duffield 4cd72b09a2 Refactor hosting service to support repo name extraction
Extract parseRemoteUrl helper to avoid duplication between
getRepoURLFromRemoteURL and new getRepoNameFromRemoteURL.
Add repoNameTemplate to ServiceDefinition and GetRepoName() to
HostingServiceMgr. Add GetRepoInfoFromURL for callers that need
owner/repo without a full service lookup.
2026-03-31 15:48:28 +02:00
Yadi Abdalhalim 24e9197be2 feat: add Codeberg as a supported git hosting service
Codeberg is a Gitea-based git hosting service that uses the same URL
patterns for pull requests and commits. This adds native support so
users don't need to manually configure it.
2025-12-21 14:10:59 +01:00
Mikhail Akimov d6ff7f152d Fix to support creating merge requests for Gitlab/Github repositories cloned with an SSH config alias 2025-12-06 11:52:55 +01:00
hrzlgnm f729e2ca05
Update dead link for debugging regex to regex101.com 2025-11-07 16:00:22 +01:00
hrzlgnm d5c0d945f8
Open pull requests in browser with extra leading slashes removed
This allows for having extra slashes in git urls, for example to avoid
warnings with older bitbake fetcher implementations in yocto. Which
warns about a missing / in git urls
2025-11-07 16:00:14 +01:00
🚀 Niklas Arens a44af0685c fix(hosting_service): support Azure DevOps vs-ssh.visualstudio.com SSH remotes 2025-08-14 15:20:56 +02:00
Chris McDonnell c1ca1c8f99 URL encode gitlab brackets to make consistent with branch names
Some operating systems 'open' implementations do not like
when some special characters are unencoded, so they will
double-enconde the branch name, which we already encode.

This particularly matters since branch names with / are common
2025-03-12 09:04:04 +11:00
Wayne Bowie aad3dc42a7 Allow on prem Azure DevOps Server pull request 2025-01-02 15:10:02 +11:00
pikomonde 84333eebc3 renaming variable to CommitHash 2024-04-12 08:33:47 +02:00
Mazhar Zandsalimi 59379b45da Update gitlab commit URL to match new routing 2023-05-22 07:39:47 +03:30
Mazhar Zandsalimi 2d4ca2b54f Update gitlab merge request URL to match new routing 2023-05-21 13:21:34 +03:30
Noah Gao bf3dd79b7a feat: add gitea to hosting service 2023-04-18 16:16:09 +00:00
Andrew 298dae23e8 fix: generalize parsing of ssh git urls 2023-04-03 12:10:30 +10:00
Konstantin Mikhailov a67a08eeac Fix open commit in browser for some Gitlab repos 2022-08-24 11:23:02 +10:00
David Pavlík 4db22aec0e support custom SSH usernames on BitBucket, fixes #1890 2022-08-06 22:54:57 +02:00
TheBlob42 bcc0466498 feat: pull request support for bitbucket server 2022-04-11 17:17:40 +10:00
tiwood f0d0d45ba7 refactor: 💡 Use new approach introduced via #1637
fix: 🐛 The root URI for Azure DevOps repositories contains _git

refactor so that we don't have conditional logic based on service definition

no need for this commend anymore

add comment

Fixed RegEx for HTTP remote git URL

Added Tests

pretty sure we can do this safely
2022-03-16 20:52:49 +11:00
Jesse Duffield 9ef65574db refactor to rename pull_request to hosting_service and apply SRP 2021-12-29 09:01:06 +11:00