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
* upstream/main: (25 commits)
[skip ci] Updated translations via Crowdin
Respect user's locale when rendering the date range in the repo activity page (go-gitea#21410)
Consolidate more CSS colors into variables (go-gitea#21402)
Add HEAD fix to gitea doctor (go-gitea#21352)
Contribution guidelines (go-gitea#21425)
Refactor Gitpod configuration to improve quick spin up of automated dev environments (go-gitea#21411)
Support instance-wide OAuth2 applications (go-gitea#21335)
Case-insensitive NuGet symbol file GUID (go-gitea#21409)
Add generic set type (go-gitea#21408)
Improve OAuth integration tests (go-gitea#21390)
Make e-mail sanity check more precise (go-gitea#20991)
Fix broken link to frontend guidelines in hacking guidelines (go-gitea#21382)
Use Name instead of DisplayName in LFS Lock (go-gitea#21415)
[skip ci] Updated translations via Crowdin
feat(pr review): add more space on mobile (go-gitea#21326)
Bump `golang.org/x/text` (go-gitea#21412)
Update gitea.service (go-gitea#21399)
Do DB update after merge in hammer context (go-gitea#21401)
add gitpod config (go-gitea#20995)
Remove cancel button in repo creation page (go-gitea#21381)
...
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+8-24Lines changed: 8 additions & 24 deletions
Display the source diff
Display the rich diff
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