Commit Graph
25 Commits
Author SHA1 Message Date
Eng Zer Jun deed9eb18e Remove redundant len check
From the Go specification [1]:

  "3. If the map is nil, the number of iterations is 0."

`len` returns 0 if the map is nil [2]. Therefore, checking `len(v) > 0`
before a loop is unnecessary.

[1]: https://go.dev/ref/spec#For_range
[2]: https://pkg.go.dev/builtin#len

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-10-04 21:03:26 +08:00
Raido OrasandRaido Oras d7b611aa05 Allow port in webDomain for services config values 2023-08-21 14:33:58 +03:00
Jesse Duffield e33fe37a99 Standardise on using lo for slice functions
We've been sometimes using lo and sometimes using my slices package, and we need to pick one
for consistency. Lo is more extensive and better maintained so we're going with that.

My slices package was a superset of go's own slices package so in some places I've just used
the official one (the methods were just wrappers anyway).

I've also moved the remaining methods into the utils package.
2023-07-30 18:51:23 +10: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
Jesse Duffield f7e8b2dd71 cleanup integration test code 2023-02-26 12:54:13 +11: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
TheBlob42andJesse Duffield bcc0466498 feat: pull request support for bitbucket server 2022-04-11 17:17:40 +10:00
casswedsonandJesse Duffield b7928042f0 chore: typo hunting ft. codespell 2022-04-06 08:52:41 +10:00
Jesse Duffield 94a53484a1 would you believe that I'm adding even more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield eda8f4a5d4 lots more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield a34bdf1a04 update linters 2022-03-19 12:12:57 +11:00
Jesse Duffield 28c9d85141 fix tests 2022-03-16 20:52:49 +11:00
tiwoodandJesse Duffield 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
Mikael ElkiaerandJesse Duffield 874e230aef run go fmt 2022-01-25 23:23:55 +11:00
Mikael ElkiaerandJesse Duffield 4da5795ef1 fixed indentation by swapping spaces for tabs 2022-01-25 23:23:55 +11:00
Mikael ElkiaerandJesse Duffield 03c9acad26 add tests specific for URL escaping in PRs 2022-01-25 23:23:55 +11:00
Mikael ElkiaerandJesse Duffield d53322675d update unit tests not expecting url escaping 2022-01-25 23:23:55 +11:00
Mikael ElkiaerandJesse Duffield ae18ad5b66 add URL encoding in pull request branch names 2022-01-25 23:23:55 +11:00
bin101andJesse Duffield ad23bd03a0 fix: custom service usage 2022-01-21 23:13:00 +11:00
Jesse Duffield 18f48a43d5 add some more linters 2022-01-09 14:09:53 +11:00
Jesse Duffield 9ef65574db refactor to rename pull_request to hosting_service and apply SRP 2021-12-29 09:01:06 +11:00