@@ -31,20 +31,6 @@ It is go gettable ...
31
31
$ go get github.com/andygrunwald/go-gerrit
32
32
```
33
33
34
- ... (optional) to run checks and tests:
35
-
36
- ** Tests Only**
37
-
38
- ``` sh
39
- $ make test
40
- ```
41
-
42
- ** Checks, Tests, Linters, etc**
43
-
44
- ``` sh
45
- $ make vet staticcheck
46
- ```
47
-
48
34
## API / Usage
49
35
50
36
Have a look at the [ GoDoc documentation] ( https://pkg.go.dev/github.com/andygrunwald/go-gerrit ) for a detailed API description.
@@ -233,6 +219,45 @@ func main() {
233
219
}
234
220
```
235
221
222
+ ## Development
223
+
224
+ ### Running tests and linters
225
+
226
+ Tests only:
227
+
228
+ ``` sh
229
+ $ make test
230
+ ```
231
+
232
+ Checks, tests and linters
233
+
234
+ ``` sh
235
+ $ make vet staticcheck test
236
+ ```
237
+
238
+ ### Local Gerrit setup
239
+
240
+ For local development, we suggest the usage of the [ official Gerrit Code Review docker image] ( https://hub.docker.com/r/gerritcodereview/gerrit ) :
241
+
242
+ ```
243
+ $ docker run -ti -p 8080:8080 -p 29418:29418 gerritcodereview/gerrit:3.4.1
244
+ ```
245
+
246
+ Wait a few minutes until the ``` Gerrit Code Review NNN ready ``` message appears,
247
+ where NNN is your current Gerrit version, then open your browser to http://localhost:8080
248
+ and you will be in Gerrit Code Review.
249
+
250
+ #### Authentication
251
+
252
+ For local development setups, go to http://localhost:8080/settings/#HTTPCredentials and click ` GENERATE NEW PASSWORD ` .
253
+ Now you can use (only for development purposes):
254
+
255
+ ``` go
256
+ client.Authentication .SetBasicAuth (" admin" , " secret" )
257
+ ```
258
+
259
+ Replace ` secret ` with your new value.
260
+
236
261
## Frequently Asked Questions (FAQ)
237
262
238
263
### How is the source code organized?
0 commit comments