Skip to content

Commit 0c7ff7f

Browse files
committed
First pass of tone and style polish
Bring the page a lot closer to GitLab tone and style. Not perfect, but we've gotta start somewhere.
1 parent 62cb608 commit 0c7ff7f

File tree

1 file changed

+51
-39
lines changed

1 file changed

+51
-39
lines changed

doc/beginners_guide.md

+51-39
Original file line numberDiff line numberDiff line change
@@ -4,79 +4,91 @@ group: Source Code
44
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
55
---
66

7-
## Beginner's guide to Gitlab Shell contributions
7+
# Beginner's guide to GitLab Shell contributions
88

9-
### Check
9+
## Check
1010

11-
Checks if GitLab API access and redis via internal API can be reached:
11+
Checks if GitLab API access and Redis via internal API can be reached:
1212

13-
make check
13+
```shell
14+
make check
15+
```
1416

15-
### Compile
17+
## Compile
1618

1719
Builds the `gitlab-shell` binaries, placing them into `bin/`.
1820

19-
make compile
21+
```shell
22+
make compile
23+
```
2024

21-
### Install
25+
## Install
2226

23-
Builds the `gitlab-shell` binaries and installs them onto the filesystem. The
24-
default location is `/usr/local`, but can be controlled by use of the `PREFIX`
27+
Builds the `gitlab-shell` binaries and installs them onto the file system. The
28+
default location is `/usr/local`, but you can change the location by setting the `PREFIX`
2529
and `DESTDIR` environment variables.
2630

27-
make install
31+
```shell
32+
make install
33+
```
2834

29-
### Setup
35+
## Setup
3036

3137
This command is intended for use when installing GitLab from source on a single
32-
machine. In addition to compiling the gitlab-shell binaries, it ensures that
33-
various paths on the filesystem exist with the correct permissions. Do not run
34-
it unless instructed to by your installation method documentation.
38+
machine. It compiles the GitLab Shell binaries, and ensures that
39+
various paths on the file system exist with the correct permissions. Do not run
40+
this command unless your installation method documentation instructs you to.
3541

36-
make setup
42+
```shell
43+
make setup
44+
```
3745

38-
39-
### Testing
46+
## Testing
4047

4148
Run tests:
4249

43-
bundle install
44-
make test
50+
```shell
51+
bundle install
52+
make test
53+
```
4554

46-
Run gofmt:
55+
Run Gofmt:
4756

48-
make verify
57+
```shell
58+
make verify
59+
```
4960

5061
Run both test and verify (the default Makefile target):
5162

52-
bundle install
53-
make validate
63+
```shell
64+
bundle install
65+
make validate
66+
```
5467

55-
### Gitaly
68+
## Gitaly
5669

5770
Some tests need a Gitaly server. The
58-
[`docker-compose.yml`](./docker-compose.yml) file will run Gitaly on
59-
port 8075. To tell the tests where Gitaly is, set
60-
`GITALY_CONNECTION_INFO`:
71+
[`docker-compose.yml`](../docker-compose.yml) file runs Gitaly on port 8075.
72+
To tell the tests where Gitaly is, set `GITALY_CONNECTION_INFO`:
6173

62-
export GITALY_CONNECTION_INFO='{"address": "tcp://localhost:8075", "storage": "default"}'
63-
make test
74+
```plaintext
75+
export GITALY_CONNECTION_INFO='{"address": "tcp://localhost:8075", "storage": "default"}'
76+
make test
77+
```
6478

65-
If no `GITALY_CONNECTION_INFO` is set, the test suite will still run, but any
66-
tests requiring Gitaly will be skipped. They will always run in the CI
67-
environment.
79+
If no `GITALY_CONNECTION_INFO` is set, the test suite still runs, but any
80+
tests requiring Gitaly are skipped. The tests always run in the CI environment.
6881

69-
### Logging Guidelines
82+
## Logging Guidelines
7083

71-
In general, it should be possible to determine the structure, but not content,
72-
of a gitlab-shell or gitlab-sshd session just from inspecting the logs. Some
73-
guidelines:
84+
In general, you can determine the structure, but not content, of a GitLab Shell
85+
or `gitlab-sshd` session by inspecting the logs. Some guidelines:
7486

7587
- We use [`gitlab.com/gitlab-org/labkit/log`](https://pkg.go.dev/gitlab.com/gitlab-org/labkit/log)
76-
for logging functionality
77-
- **Always** include a correlation ID
88+
for logging.
89+
- Always include a correlation ID.
7890
- Log messages should be invariant and unique. Include accessory information in
7991
fields, using `log.WithField`, `log.WithFields`, or `log.WithError`.
80-
- Log success cases as well as error cases
92+
- Log both success cases and error cases.
8193
- Logging too much is better than not logging enough. If a message seems too
8294
verbose, consider reducing the log level before removing the message.

0 commit comments

Comments
 (0)