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
|``make test[\#TestSpecificName]``| run unit test |
89
-
|``make test-sqlite[\#TestSpecificName]``| run [integration](integrations) test for SQLite |
89
+
|``make test-sqlite[\#TestSpecificName]``| run [integration](integrations) test for SQLite |
90
90
|[More details about integrations](integrations/README.md)|
91
91
92
92
## Vendoring
@@ -127,14 +127,14 @@ the *[How to get faster PR reviews](https://github.com/kubernetes/community/blob
127
127
it has lots of useful tips for any project you may want to contribute.
128
128
Some of the key points:
129
129
130
-
* Make small pull requests. The smaller, the faster to review and the
130
+
- Make small pull requests. The smaller, the faster to review and the
131
131
more likely it will be merged soon.
132
-
* Don't make changes unrelated to your PR. Maybe there are typos on
132
+
- Don't make changes unrelated to your PR. Maybe there are typos on
133
133
some comments, maybe refactoring would be welcome on a function... but
134
134
if that is not related to your PR, please make *another* PR for that.
135
-
* Split big pull requests into multiple small ones. An incremental change
135
+
- Split big pull requests into multiple small ones. An incremental change
136
136
will be faster to review than a huge PR.
137
-
* Use the first comment as a summary explainer of your PR and you should keep this up-to-date as the PR evolves.
137
+
- Use the first comment as a summary explainer of your PR and you should keep this up-to-date as the PR evolves.
138
138
139
139
If your PR could cause a breaking change you must add a BREAKING section to this comment e.g.:
140
140
@@ -146,7 +146,8 @@ To explain how this could affect users and how to mitigate these changes.
146
146
147
147
## Styleguide
148
148
149
-
For imports you should use the following format (_without_ the comments)
149
+
For imports you should use the following format (*without* the comments)
150
+
150
151
```go
151
152
import (
152
153
// stdlib
@@ -181,11 +182,15 @@ To maintain understandable code and avoid circular dependencies it is important
181
182
## API v1
182
183
183
184
The API is documented by [swagger](http://try.gitea.io/api/swagger) and is based on [GitHub API v3](https://developer.github.com/v3/).
184
-
Thus, Gitea´s API should use the same endpoints and fields as GitHub´s API as far as possible, unless there are good reasons to deviate.
185
-
If Gitea provides functionality that GitHub does not, a new endpoint can be created.
185
+
186
+
Thus, Gitea´s API should use the same endpoints and fields as GitHub´s API as far as possible, unless there are good reasons to deviate.
187
+
188
+
If Gitea provides functionality that GitHub does not, a new endpoint can be created.
189
+
186
190
If information is provided by Gitea that is not provided by the GitHub API, a new field can be used that doesn't collide with any GitHub fields.
187
191
188
192
Updating an existing API should not remove existing fields unless there is a really good reason to do so.
193
+
189
194
The same applies to status responses. If you notice a problem, feel free to leave a comment in the code for future refactoring to APIv2 (which is currently not planned).
190
195
191
196
All expected results (errors, success, fail messages) should be documented
@@ -194,28 +199,33 @@ All expected results (errors, success, fail messages) should be documented
194
199
All JSON input types must be defined as a struct in [modules/structs/](modules/structs/)
***GET** endpoints return requested object and status **OK (200)**
210
-
***DELETE** endpoints return status **No Content (204)**
211
-
***POST** endpoints return status **Created (201)**, used to **create** new objects (e.g. a User)
212
-
***PUT** endpoints return status **No Content (204)**, used to **add/assign** existing Objects (e.g. User) to something (e.g. Org-Team)
213
-
***PATCH** endpoints return changed object and status **OK (200)**, used to **edit/change** an existing object
216
+
217
+
-**GET** endpoints return requested object and status **OK (200)**
218
+
-**DELETE** endpoints return status **No Content (204)**
219
+
-**POST** endpoints return status **Created (201)**, used to **create** new objects (e.g. a User)
220
+
-**PUT** endpoints return status **No Content (204)**, used to **add/assign** existing Objects (e.g. User) to something (e.g. Org-Team)
221
+
-**PATCH** endpoints return changed object and status **OK (200)**, used to **edit/change** an existing object
214
222
215
223
An endpoint which changes/edits an object expects all fields to be optional (except ones to identify the object, which are required).
224
+
216
225
### Endpoints returning lists should
217
-
* support pagination (`page` & `limit` options in query)
218
-
* set `X-Total-Count` header via **SetTotalCountHeader** ([example](https://github.com/go-gitea/gitea/blob/7aae98cc5d4113f1e9918b7ee7dd09f67c189e3e/routers/api/v1/repo/issue.go#L444))
226
+
227
+
- support pagination (`page` & `limit` options in query)
228
+
- set `X-Total-Count` header via **SetTotalCountHeader** ([example](https://github.com/go-gitea/gitea/blob/7aae98cc5d4113f1e9918b7ee7dd09f67c189e3e/routers/api/v1/repo/issue.go#L444))
219
229
220
230
## Large Character Comments
221
231
@@ -368,35 +378,35 @@ and lead the development of Gitea.
368
378
To honor the past owners, here's the history of the owners and the time
@@ -413,20 +423,20 @@ be reviewed by two maintainers and must pass the automatic tests.
413
423
414
424
## Releasing Gitea
415
425
416
-
* Let $vmaj, $vmin and $vpat be Major, Minor and Patch version numbers, $vpat should be rc1, rc2, 0, 1, ...... $vmaj.$vmin will be kept the same as milestones on github or gitea in future.
417
-
* Before releasing, confirm all the version's milestone issues or PRs has been resolved. Then discuss the release on Discord channel #maintainers and get agreed with almost all the owners and mergers. Or you can declare the version and if nobody against in about serval hours.
418
-
* If this is a big version first you have to create PR for changelog on branch `main` with PRs with label `changelog` and after it has been merged do following steps:
419
-
* Create `-dev` tag as `git tag -s -F release.notes v$vmaj.$vmin.0-dev` and push the tag as `git push origin v$vmaj.$vmin.0-dev`.
420
-
* When CI has finished building tag then you have to create a new branch named `release/v$vmaj.$vmin`
421
-
* If it is bugfix version create PR for changelog on branch `release/v$vmaj.$vmin` and wait till it is reviewed and merged.
422
-
* Add a tag as `git tag -s -F release.notes v$vmaj.$vmin.$`, release.notes file could be a temporary file to only include the changelog this version which you added to `CHANGELOG.md`.
423
-
* And then push the tag as `git push origin v$vmaj.$vmin.$`. Drone CI will automatically create a release and upload all the compiled binary. (But currently it doesn't add the release notes automatically. Maybe we should fix that.)
424
-
* If needed send a frontport PR for the changelog to branch `main` and update the version in `docs/config.yaml` to refer to the new version.
425
-
* Send PR to [blog repository](https://gitea.com/gitea/blog) announcing the release.
426
-
* Verify all release assets were correctly published through CI on dl.gitea.io and GitHub releases. Once ACKed:
427
-
* bump the version of https://dl.gitea.io/gitea/version.json
428
-
* merge the blog post PR
429
-
* announce the release in discord `#announcements`
426
+
- Let $vmaj, $vmin and $vpat be Major, Minor and Patch version numbers, $vpat should be rc1, rc2, 0, 1, ...... $vmaj.$vmin will be kept the same as milestones on github or gitea in future.
427
+
- Before releasing, confirm all the version's milestone issues or PRs has been resolved. Then discuss the release on Discord channel #maintainers and get agreed with almost all the owners and mergers. Or you can declare the version and if nobody against in about serval hours.
428
+
- If this is a big version first you have to create PR for changelog on branch `main` with PRs with label `changelog` and after it has been merged do following steps:
429
+
- Create `-dev` tag as `git tag -s -F release.notes v$vmaj.$vmin.0-dev` and push the tag as `git push origin v$vmaj.$vmin.0-dev`.
430
+
- When CI has finished building tag then you have to create a new branch named `release/v$vmaj.$vmin`
431
+
- If it is bugfix version create PR for changelog on branch `release/v$vmaj.$vmin` and wait till it is reviewed and merged.
432
+
- Add a tag as `git tag -s -F release.notes v$vmaj.$vmin.$`, release.notes file could be a temporary file to only include the changelog this version which you added to `CHANGELOG.md`.
433
+
- And then push the tag as `git push origin v$vmaj.$vmin.$`. Drone CI will automatically create a release and upload all the compiled binary. (But currently it doesn't add the release notes automatically. Maybe we should fix that.)
434
+
- If needed send a frontport PR for the changelog to branch `main` and update the version in `docs/config.yaml` to refer to the new version.
435
+
- Send PR to [blog repository](https://gitea.com/gitea/blog) announcing the release.
436
+
- Verify all release assets were correctly published through CI on dl.gitea.io and GitHub releases. Once ACKed:
437
+
- bump the version of https://dl.gitea.io/gitea/version.json
438
+
- merge the blog post PR
439
+
- announce the release in discord `#announcements`
Copy file name to clipboardExpand all lines: README.md
+9-6
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ NOTES:
100
100
101
101
## Translating
102
102
103
-
Translations are done through Crowdin. If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there.
103
+
Translations are done through Crowdin. If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there.
104
104
105
105
You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope to fill it as questions pop up.
For more information and instructions about how to install Gitea, please look at our [documentation](https://docs.gitea.io/en-us/).
114
114
If you have questions that are not covered by the documentation, you can get in contact with us on our [Discord server](https://discord.gg/Gitea) or create a post in the [discourse forum](https://discourse.gitea.io/).
115
115
116
-
We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea).
117
-
The Hugo-based documentation theme is hosted at [gitea/theme](https://gitea.com/gitea/theme).
116
+
We maintain a list of Gitea-related projects at [gitea/awesome-gitea](https://gitea.com/gitea/awesome-gitea).
117
+
118
+
The Hugo-based documentation theme is hosted at [gitea/theme](https://gitea.com/gitea/theme).
119
+
118
120
The official Gitea CLI is developed at [gitea/tea](https://gitea.com/gitea/tea).
0 commit comments