You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some changes to the contribution guidelines.
- I removed the `Large Character Comments` part because I think they are
bad design. They are used in big files to group sections of code. This
code should be organized into individual files.
- Updated some paths.
- Added `Documentation` because our documentation is not good at the
moment. We should enforce documentation of newly added features to help
our users.
Co-authored-by: techknowlogick <[email protected]>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+8-24Lines changed: 8 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -170,17 +170,22 @@ import (
170
170
171
171
To maintain understandable code and avoid circular dependencies it is important to have a good structure of the code. The Gitea code is divided into the following parts:
172
172
173
-
-**integration:** Integration tests
174
173
-**models:** Contains the data structures used by xorm to construct database tables. It also contains supporting functions to query and update the database. Dependencies to other code in Gitea should be avoided although some modules might be needed (for example for logging).
175
174
-**models/fixtures:** Sample model data used in integration tests.
176
175
-**models/migrations:** Handling of database migrations between versions. PRs that changes a database structure shall also have a migration step.
177
-
-**modules:** Different modules to handle specific functionality in Gitea.
176
+
-**modules:** Different modules to handle specific functionality in Gitea. Shall only depend on other modules but not other packages (models, services).
-**routers:** Handling of server requests. As it uses other Gitea packages to serve the request, other packages (models, modules or services) shall not depend on routers
178
+
-**routers:** Handling of server requests. As it uses other Gitea packages to serve the request, other packages (models, modules or services) shall not depend on routers.
180
179
-**services:** Support functions for common routing operations. Uses models and modules to handle the request.
181
180
-**templates:** Golang templates for generating the html output.
181
+
-**tests/e2e:** End to end tests
182
+
-**tests/integration:** Integration tests
182
183
-**vendor:** External code that Gitea depends on.
183
184
185
+
## Documentation
186
+
187
+
If you add a new feature or change an existing aspect of Gitea, the documentation for that feature must be created or updated.
188
+
184
189
## API v1
185
190
186
191
The API is documented by [swagger](http://try.gitea.io/api/swagger) and is based on [GitHub API v3](https://developer.github.com/v3/).
@@ -229,27 +234,6 @@ An endpoint which changes/edits an object expects all fields to be optional (exc
229
234
- support pagination (`page` & `limit` options in query)
230
235
- set `X-Total-Count` header via **SetTotalCountHeader** ([example](https://github.com/go-gitea/gitea/blob/7aae98cc5d4113f1e9918b7ee7dd09f67c189e3e/routers/api/v1/repo/issue.go#L444))
231
236
232
-
## Large Character Comments
233
-
234
-
Throughout the codebase there are large-text comments for sections of code, e.g.:
235
-
236
-
```go
237
-
// __________ .__
238
-
// \______ \ _______ _|__| ______ _ __
239
-
// | _// __ \ \/ / |/ __ \ \/ \/ /
240
-
// | | \ ___/\ /| \ ___/\ /
241
-
// |____|_ /\___ >\_/ |__|\___ >\/\_/
242
-
// \/ \/ \/
243
-
```
244
-
245
-
These were created using the `figlet` tool with the `graffiti` font.
246
-
247
-
A simple way of creating these is to use the following:
0 commit comments