Commit Graph

6 Commits

Author SHA1 Message Date
Erik Seliger
d249b8f701
gerrit: Add support for repositoryPathPattern (#64102)
Most other code host connections we support have this property to
control the generated name, but for some reason it was forgotten for
Gerrit.

This PR adds it, plus a few tests.

![Screenshot 2024-07-26 at
14.04.35@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/Xvbrpl1hwVbe4tb9QeLp/6b7f2e35-1147-4e6d-912c-628ea94f2f33.png)

Test plan: Added tests, cloned a gerrit repo locally.

## Changelog 

Added support for the `repositoryPathPattern` setting for Gerrit code
host connections.
2024-07-26 15:08:14 +02:00
Erik Seliger
5a370f22ba
gerrit: Add support for SSH cloning (#61537)
To bring Gerrit support more in line with other code hosts and because a customer recently ran into this limitation, this PR adds support for the SSH flag.

The diff is mostly straightforward, with two things to watch out for:
- The clone URL construction in makeRepo was wrong previously, it missed the `/a/`. This is only used for visuals, but still annoying. So I moved the whole construction into here from the gitserver cloneURL package.
- The SSH hostname and port are configurable in Gerrit, so to construct the right URL we need to fetch some instance metadata. This would be costly to do in the gitserver method, so we persist all the info needed to construct clone URLs "offline" during the cloning process by storing all the data for HTTP and SSH clones on the repo metadata column. This is mostly in line with other code hosts as well, see GitLab right above in the gitserver/cloneurl package.

Closes https://github.com/sourcegraph/sourcegraph/issues/60597

## Test plan

Added tests for the various stages, recreated recorded responses, and tried both HTTP and SSH cloning locally, both worked with out Gerrit instance.
2024-04-04 15:56:51 +02:00
Camden Cheek
1ead945267
Docs: update links to point to new site (#60381)
We have a number of docs links in the product that point to the old doc site. 

Method:
- Search the repo for `docs.sourcegraph.com`
- Exclude the `doc/` dir, all test fixtures, and `CHANGELOG.md`
- For each, replace `docs.sourcegraph.com` with `sourcegraph.com/docs`
- Navigate to the resulting URL ensuring it's not a dead link, updating the URL if necessary

Many of the URLs updated are just comments, but since I'm doing a manual audit of each URL anyways, I felt it was worth it to update these while I was at it.
2024-02-13 00:23:47 +00:00
Petri-Johan Last
363c66e448
Add Exclude field to gerrit code host connections (#59739) 2024-01-24 12:38:39 +02:00
Petri-Johan Last
6394b92243
Add Gerrit as an officially supported code host with permissions syncing (#46763) 2023-01-27 15:33:24 +00:00
Idan Varsano
724284bff0
Gerrit code host (#33951)
* Gerrit code host support
2022-04-20 10:51:42 -04:00