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
Add a few more comments to the CONTRIBUTING.md document (#18469)
* Explain how to title your Backport PR
* Advise that the first comment in a PR should explain the PR
* Include information about BREAKING changes
* Include information about backports/frontports
* Add reference command for creating backports
* Add reference commandline for creating large characters
* Add information about updating docs/config.yaml
* Update year in the copyright
Signed-off-by: Andrew Thornton <[email protected]>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+74-4Lines changed: 74 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,15 @@ Some of the key points:
134
134
if that is not related to your PR, please make *another* PR for that.
135
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.
138
+
139
+
If your PR could cause a breaking change you must add a BREAKING section to this comment e.g.:
140
+
141
+
```
142
+
## :warning: BREAKING :warning:
143
+
```
144
+
145
+
To explain how this could affect users and how to mitigate these changes.
137
146
138
147
## Styleguide
139
148
@@ -203,13 +212,74 @@ In general, HTTP methods are chosen as follows:
203
212
***PUT** endpoints return status **No Content (204)**, used to **add/assign** existing Objects (e.g. User) to something (e.g. Org-Team)
204
213
***PATCH** endpoints return changed object and status **OK (200)**, used to **edit/change** an existing object
205
214
206
-
207
215
An endpoint which changes/edits an object expects all fields to be optional (except ones to identify the object, which are required).
208
-
209
216
### Endpoints returning lists should
210
217
* support pagination (`page` & `limit` options in query)
211
218
* set `X-Total-Count` header via **SetTotalCountHeader** ([example](https://github.com/go-gitea/gitea/blob/7aae98cc5d4113f1e9918b7ee7dd09f67c189e3e/routers/api/v1/repo/issue.go#L444))
212
219
220
+
## Large Character Comments
221
+
222
+
Throughout the codebase there are large-text comments for sections of code, e.g.:
223
+
224
+
```go
225
+
// __________ .__
226
+
// \______ \ _______ _|__| ______ _ __
227
+
// | _// __ \ \/ / |/ __ \ \/ \/ /
228
+
// | | \ ___/\ /| \ ___/\ /
229
+
// |____|_ /\___ >\_/ |__|\___ >\/\_/
230
+
// \/ \/ \/
231
+
```
232
+
233
+
These were created using the `figlet` tool with the `graffiti` font.
234
+
235
+
A simple way of creating these is to use the following:
@@ -351,15 +421,15 @@ be reviewed by two maintainers and must pass the automatic tests.
351
421
* If it is bugfix version create PR for changelog on branch `release/v$vmaj.$vmin` and wait till it is reviewed and merged.
352
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`.
353
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.)
354
-
* If needed send PR for changelog on branch `main`.
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.
355
425
* Send PR to [blog repository](https://gitea.com/gitea/blog) announcing the release.
356
426
357
427
## Copyright
358
428
359
429
Code that you contribute should use the standard copyright header:
360
430
361
431
```
362
-
// Copyright 2020 The Gitea Authors. All rights reserved.
432
+
// Copyright 2022 The Gitea Authors. All rights reserved.
363
433
// Use of this source code is governed by a MIT-style
0 commit comments