You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CONTRIBUTING.md 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. # Contribution Guidelines
  2. <details><summary>Table of Contents</summary>
  3. - [Contribution Guidelines](#contribution-guidelines)
  4. - [Introduction](#introduction)
  5. - [Issues](#issues)
  6. - [How to report issues](#how-to-report-issues)
  7. - [Types of issues](#types-of-issues)
  8. - [Discuss your design before the implementation](#discuss-your-design-before-the-implementation)
  9. - [Building Gitea](#building-gitea)
  10. - [Dependencies](#dependencies)
  11. - [Backend](#backend)
  12. - [Frontend](#frontend)
  13. - [Design guideline](#design-guideline)
  14. - [Styleguide](#styleguide)
  15. - [Copyright](#copyright)
  16. - [Testing](#testing)
  17. - [Translation](#translation)
  18. - [Code review](#code-review)
  19. - [Pull request format](#pull-request-format)
  20. - [PR title and summary](#pr-title-and-summary)
  21. - [Milestone](#milestone)
  22. - [Labels](#labels)
  23. - [Breaking PRs](#breaking-prs)
  24. - [What is a breaking PR?](#what-is-a-breaking-pr)
  25. - [How to handle breaking PRs?](#how-to-handle-breaking-prs)
  26. - [Maintaining open PRs](#maintaining-open-prs)
  27. - [Getting PRs merged](#getting-prs-merged)
  28. - [Final call](#final-call)
  29. - [Commit messages](#commit-messages)
  30. - [PR Co-authors](#pr-co-authors)
  31. - [PRs targeting `main`](#prs-targeting-main)
  32. - [Backport PRs](#backport-prs)
  33. - [Documentation](#documentation)
  34. - [API v1](#api-v1)
  35. - [GitHub API compatibility](#github-api-compatibility)
  36. - [Adding/Maintaining API routes](#addingmaintaining-api-routes)
  37. - [When to use what HTTP method](#when-to-use-what-http-method)
  38. - [Requirements for API routes](#requirements-for-api-routes)
  39. - [Backports and Frontports](#backports-and-frontports)
  40. - [What is backported?](#what-is-backported)
  41. - [How to backport?](#how-to-backport)
  42. - [Format of backport PRs](#format-of-backport-prs)
  43. - [Frontports](#frontports)
  44. - [Developer Certificate of Origin (DCO)](#developer-certificate-of-origin-dco)
  45. - [Release Cycle](#release-cycle)
  46. - [Maintainers](#maintainers)
  47. - [Technical Oversight Committee (TOC)](#technical-oversight-committee-toc)
  48. - [Current TOC members](#current-toc-members)
  49. - [Previous TOC/owners members](#previous-tocowners-members)
  50. - [Governance Compensation](#governance-compensation)
  51. - [TOC \& Working groups](#toc--working-groups)
  52. - [Roadmap](#roadmap)
  53. - [Versions](#versions)
  54. - [Releasing Gitea](#releasing-gitea)
  55. </details>
  56. ## Introduction
  57. This document explains how to contribute changes to the Gitea project. \
  58. It assumes you have followed the [installation instructions](https://docs.gitea.com/category/installation). \
  59. Sensitive security-related issues should be reported to [security@gitea.io](mailto:security@gitea.io).
  60. For configuring IDEs for Gitea development, see the [contributed IDE configurations](contrib/ide/).
  61. ## Issues
  62. ### How to report issues
  63. Please search the issues on the issue tracker with a variety of related keywords to ensure that your issue has not already been reported.
  64. If your issue has not been reported yet, [open an issue](https://github.com/go-gitea/gitea/issues/new)
  65. and answer the questions so we can understand and reproduce the problematic behavior. \
  66. Please write clear and concise instructions so that we can reproduce the behavior — even if it seems obvious. \
  67. The more detailed and specific you are, the faster we can fix the issue. \
  68. It is really helpful if you can reproduce your problem on a site running on the latest commits, i.e. <https://try.gitea.io>, as perhaps your problem has already been fixed on a current version. \
  69. Please follow the guidelines described in [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) for your report.
  70. Please be kind, remember that Gitea comes at no cost to you, and you're getting free help.
  71. ### Types of issues
  72. Typically, issues fall in one of the following categories:
  73. - `bug`: Something in the frontend or backend behaves unexpectedly
  74. - `security issue`: bug that has serious implications such as leaking another users data. Please do not file such issues on the public tracker and send a mail to security@gitea.io instead
  75. - `feature`: Completely new functionality. You should describe this feature in enough detail that anyone who reads the issue can understand how it is supposed to be implemented
  76. - `enhancement`: An existing feature should get an upgrade
  77. - `refactoring`: Parts of the code base don't conform with other parts and should be changed to improve Gitea's maintainability
  78. ### Discuss your design before the implementation
  79. We welcome submissions. \
  80. If you want to change or add something, please let everyone know what you're working on — [file an issue](https://github.com/go-gitea/gitea/issues/new) or comment on an existing one before starting your work!
  81. Significant changes such as new features must go through the change proposal process before they can be accepted. \
  82. This is mainly to save yourself the trouble of implementing it, only to find out that your proposed implementation has some potential problems. \
  83. Furthermore, this process gives everyone a chance to validate the design, helps prevent duplication of effort, and ensures that the idea fits inside
  84. the goals for the project and tools.
  85. Pull requests should not be the place for architecture discussions.
  86. ## Building Gitea
  87. See the [development setup instructions](https://docs.gitea.com/development/hacking-on-gitea).
  88. ## Dependencies
  89. ### Backend
  90. Go dependencies are managed using [Go Modules](https://golang.org/cmd/go/#hdr-Module_maintenance). \
  91. You can find more details in the [go mod documentation](https://go.dev/ref/mod) and the [Go Modules Wiki](https://github.com/golang/go/wiki/Modules).
  92. Pull requests should only modify `go.mod` and `go.sum` where it is related to your change, be it a bugfix or a new feature. \
  93. Apart from that, these files should only be modified by Pull Requests whose only purpose is to update dependencies.
  94. The `go.mod`, `go.sum` update needs to be justified as part of the PR description,
  95. and must be verified by the reviewers and/or merger to always reference
  96. an existing upstream commit.
  97. ### Frontend
  98. For the frontend, we use [npm](https://www.npmjs.com/).
  99. The same restrictions apply for frontend dependencies as for backend dependencies, with the exceptions that the files for it are `package.json` and `package-lock.json`, and that new versions must always reference an existing version.
  100. ## Design guideline
  101. Depending on your change, please read the
  102. - [backend development guideline](https://docs.gitea.com/contributing/guidelines-backend)
  103. - [frontend development guideline](https://docs.gitea.com/contributing/guidelines-frontend)
  104. - [refactoring guideline](https://docs.gitea.com/contributing/guidelines-refactoring)
  105. ## Styleguide
  106. You should always run `make fmt` before committing to conform to Gitea's styleguide.
  107. ## Copyright
  108. New code files that you contribute should use the standard copyright header:
  109. ```
  110. // Copyright <current year> The Gitea Authors. All rights reserved.
  111. // SPDX-License-Identifier: MIT
  112. ```
  113. Afterwards, copyright should only be modified when the copyright author changes.
  114. ## Testing
  115. Before submitting a pull request, run all tests to make sure your changes don't cause a regression elsewhere.
  116. Here's how to run the test suite:
  117. - code lint
  118. | | |
  119. | :-------------------- | :---------------------------------------------------------------- |
  120. |``make lint`` | lint everything (not needed if you only change the front- **or** backend) |
  121. |``make lint-frontend`` | lint frontend files |
  122. |``make lint-backend`` | lint backend files |
  123. - run tests (we suggest running them on Linux)
  124. | Command | Action | |
  125. | :------------------------------------- | :----------------------------------------------- | ------------ |
  126. |``make test[\#SpecificTestName]`` | run unit test(s) |
  127. |``make test-sqlite[\#SpecificTestName]``| run [integration](tests/integration) test(s) for SQLite |[More details](tests/integration/README.md) |
  128. |``make test-e2e-sqlite[\#SpecificTestName]``| run [end-to-end](tests/e2e) test(s) for SQLite |[More details](tests/e2e/README.md) |
  129. ## Translation
  130. All translation work happens on [Crowdin](https://crowdin.com/project/gitea).
  131. The only translation that is maintained in this repository is [the English translation](https://github.com/go-gitea/gitea/blob/main/options/locale/locale_en-US.ini).
  132. It is synced regularly with Crowdin. \
  133. Other locales on main branch **should not** be updated manually as they will be overwritten with each sync. \
  134. Once a language has reached a **satisfactory percentage** of translated keys (~25%), it will be synced back into this repo and included in the next released version.
  135. The tool `go run build/backport-locale.go` can be used to backport locales from the main branch to release branches that were missed.
  136. ## Code review
  137. ### Pull request format
  138. Please try to make your pull request easy to review for us. \
  139. For that, please read the [*Best Practices for Faster Reviews*](https://github.com/kubernetes/community/blob/261cb0fd089b64002c91e8eddceebf032462ccd6/contributors/guide/pull-requests.md#best-practices-for-faster-reviews) guide. \
  140. It has lots of useful tips for any project you may want to contribute to. \
  141. Some of the key points:
  142. - Make small pull requests. \
  143. The smaller, the faster to review and the more likely it will be merged soon.
  144. - Don't make changes unrelated to your PR. \
  145. Maybe there are typos on some comments, maybe refactoring would be welcome on a function... \
  146. but if that is not related to your PR, please make *another* PR for that.
  147. - Split big pull requests into multiple small ones. \
  148. An incremental change will be faster to review than a huge PR.
  149. - Allow edits by maintainers. This way, the maintainers will take care of merging the PR later on instead of you.
  150. ### PR title and summary
  151. In the PR title, describe the problem you are fixing, not how you are fixing it. \
  152. Use the first comment as a summary of your PR. \
  153. In the PR summary, you can describe exactly how you are fixing this problem. \
  154. Keep this summary up-to-date as the PR evolves. \
  155. If your PR changes the UI, you must add **after** screenshots in the PR summary. \
  156. If you are not implementing a new feature, you should also post **before** screenshots for comparison. \
  157. If your PR closes some issues, you must note that in a way that both GitHub and Gitea understand, i.e. by appending a paragraph like
  158. ```text
  159. Fixes/Closes/Resolves #<ISSUE_NR_X>.
  160. Fixes/Closes/Resolves #<ISSUE_NR_Y>.
  161. ```
  162. to your summary. \
  163. Each issue that will be closed must stand on a separate line.
  164. ### Milestone
  165. A PR should only be assigned to a milestone if it will likely be merged into the given version. \
  166. As a rule of thumb, assume that a PR will stay open for an additional month for every 100 added lines. \
  167. PRs without a milestone may not be merged.
  168. ### Labels
  169. Every PR should be labeled correctly with every label that applies. \
  170. This includes especially the distinction between `bug` (fixing existing functionality), `feature` (new functionality), `enhancement` (upgrades for existing functionality), and `refactoring` (improving the internal code structure without changing the output (much)). \
  171. Furthermore,
  172. - the amount of pending required approvals
  173. - whether this PR is `blocked`, a `backport` or `breaking`
  174. - if it targets the `ui` or `api`
  175. - if it increases the application `speed`
  176. - reduces `memory usage`
  177. are oftentimes notable labels.
  178. ### Breaking PRs
  179. #### What is a breaking PR?
  180. A PR is breaking if it meets one of the following criteria:
  181. - It changes API output in an incompatible way for existing users
  182. - It removes a setting that an admin could previously set (i.e. via `app.ini`)
  183. - An admin must do something manually to restore the old behavior
  184. In particular, this means that adding new settings is not breaking.\
  185. Changing the default value of a setting or replacing the setting with another one is breaking, however.
  186. #### How to handle breaking PRs?
  187. If your PR has a breaking change, you must add a `BREAKING` section to your PR summary, e.g.
  188. ```
  189. ## :warning: BREAKING :warning:
  190. ```
  191. To explain how this will affect users and how to mitigate these changes.
  192. ### Maintaining open PRs
  193. The moment you create a non-draft PR or the moment you convert a draft PR to a non-draft PR is the moment code review starts for it. \
  194. Once that happens, do not rebase or squash your branch anymore as it makes it difficult to review the new changes. \
  195. Merge the base branch into your branch only when you really need to, i.e. because of conflicting changes in the mean time. \
  196. This reduces unnecessary CI runs. \
  197. Don't worry about merge commits messing up your commit history as every PR will be squash merged. \
  198. This means that all changes are joined into a single new commit whose message is as described below.
  199. ### Getting PRs merged
  200. Changes to Gitea must be reviewed before they are accepted — no matter who
  201. makes the change, even if they are an owner or a maintainer. \
  202. The only exception are critical bugs that prevent Gitea from being compiled or started. \
  203. Specifically, we require two approvals from maintainers for every PR. \
  204. Once this criteria has been met, your PR receives the `lgtm/done` label. \
  205. From this point on, your only responsibility is to fix merge conflicts or respond to/implement requests by maintainers. \
  206. It is the responsibility of the maintainers from this point to get your PR merged.
  207. If a PR has the `lgtm/done` label and there are no open discussions or merge conflicts anymore, any maintainer can add the `reviewed/wait-merge` label. \
  208. This label means that the PR is part of the merge queue and will be merged as soon as possible. \
  209. The merge queue will be cleared in the order of the list below:
  210. <https://github.com/go-gitea/gitea/pulls?q=is%3Apr+label%3Areviewed%2Fwait-merge+sort%3Acreated-asc+is%3Aopen>
  211. Gitea uses it's own tool, the <https://github.com/GiteaBot/gitea-backporter> to automate parts of the review process. \
  212. This tool does the things listed below automatically:
  213. - create a backport PR if needed once the initial PR was merged
  214. - remove the PR from the merge queue after the PR merged
  215. - keep the oldest branch in the merge queue up to date with merges
  216. ### Final call
  217. If a PR has been ignored for more than 7 days with no comments or reviews, and the author or any maintainer believes it will not survive a long wait (such as a refactoring PR), they can send "final call" to the TOC by mentioning them in a comment.
  218. After another 7 days, if there is still zero approval, this is considered a polite refusal, and the PR will be closed to avoid wasting further time. Therefore, the "final call" has a cost, and should be used cautiously.
  219. However, if there are no objections from maintainers, the PR can be merged with only one approval from the TOC (not the author).
  220. ### Commit messages
  221. Mergers are able and required to rewrite the PR title and summary (the first comment of a PR) so that it can produce an easily understandable commit message if necessary. \
  222. The final commit message should no longer contain any uncertainty such as `hopefully, <x> won't happen anymore`. Replace uncertainty with certainty.
  223. #### PR Co-authors
  224. A person counts as a PR co-author the moment they (co-)authored a commit that is not simply a `Merge base branch into branch` commit. \
  225. Mergers are required to remove such "false-positive" co-authors when writing the commit message. \
  226. The true co-authors must remain in the commit message.
  227. #### PRs targeting `main`
  228. The commit message of PRs targeting `main` is always
  229. ```bash
  230. $PR_TITLE ($PR_INDEX)
  231. $REWRITTEN_PR_SUMMARY
  232. ```
  233. #### Backport PRs
  234. The commit message of backport PRs is always
  235. ```bash
  236. $PR_TITLE ($INITIAL_PR_INDEX) ($BACKPORT_PR_INDEX)
  237. $REWRITTEN_PR_SUMMARY
  238. ```
  239. ## Documentation
  240. If you add a new feature or change an existing aspect of Gitea, the documentation for that feature must be created or updated in the same PR.
  241. ## API v1
  242. The API is documented by [swagger](http://try.gitea.io/api/swagger) and is based on [the GitHub API](https://docs.github.com/en/rest).
  243. ### GitHub API compatibility
  244. Gitea's API should use the same endpoints and fields as the GitHub API as far as possible, unless there are good reasons to deviate. \
  245. If Gitea provides functionality that GitHub does not, a new endpoint can be created. \
  246. 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. \
  247. Updating an existing API should not remove existing fields unless there is a really good reason to do so. \
  248. The same applies to status responses. If you notice a problem, feel free to leave a comment in the code for future refactoring to API v2 (which is currently not planned).
  249. ### Adding/Maintaining API routes
  250. All expected results (errors, success, fail messages) must be documented ([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L319-L327)). \
  251. All JSON input types must be defined as a struct in [modules/structs/](modules/structs/) ([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/modules/structs/issue.go#L76-L91)) \
  252. and referenced in [routers/api/v1/swagger/options.go](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/options.go). \
  253. They can then be used like [this example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L318). \
  254. All JSON responses must be defined as a struct in [modules/structs/](modules/structs/) ([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/modules/structs/issue.go#L36-L68)) \
  255. and referenced in its category in [routers/api/v1/swagger/](routers/api/v1/swagger/) ([example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/issue.go#L11-L16)) \
  256. They can be used like [this example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L277-L279).
  257. ### When to use what HTTP method
  258. In general, HTTP methods are chosen as follows:
  259. - **GET** endpoints return the requested object(s) and status **OK (200)**
  260. - **DELETE** endpoints return the status **No Content (204)** and no content either
  261. - **POST** endpoints are used to **create** new objects (e.g. a User) and return the status **Created (201)** and the created object
  262. - **PUT** endpoints are used to **add/assign** existing Objects (e.g. a user to a team) and return the status **No Content (204)** and no content either
  263. - **PATCH** endpoints are used to **edit/change** an existing object and return the changed object and the status **OK (200)**
  264. ### Requirements for API routes
  265. All parameters of endpoints changing/editing an object must be optional (except the ones to identify the object, which are required).
  266. Endpoints returning lists must
  267. - support pagination (`page` & `limit` options in query)
  268. - set `X-Total-Count` header via **SetTotalCountHeader** ([example](https://github.com/go-gitea/gitea/blob/7aae98cc5d4113f1e9918b7ee7dd09f67c189e3e/routers/api/v1/repo/issue.go#L444))
  269. ## Backports and Frontports
  270. ### What is backported?
  271. We backport PRs given the following circumstances:
  272. 1. Feature freeze is active, but `<version>-rc0` has not been released yet. Here, we backport as much as possible. <!-- TODO: Is that our definition with the new backport bot? -->
  273. 2. `rc0` has been released. Here, we only backport bug- and security-fixes, and small enhancements. Large PRs such as refactors are not backported anymore. <!-- TODO: Is that our definition with the new backport bot? -->
  274. 3. We never backport new features.
  275. 4. We never backport breaking changes except when
  276. 1. The breaking change has no effect on the vast majority of users
  277. 2. The component triggering the breaking change is marked as experimental
  278. ### How to backport?
  279. In the past, it was necessary to manually backport your PRs. \
  280. Now, that's not a requirement anymore as our [backport bot](https://github.com/GiteaBot) tries to create backports automatically once the PR is merged when the PR
  281. - does not have the label `backport/manual`
  282. - has the label `backport/<version>`
  283. The `backport/manual` label signifies either that you want to backport the change yourself, or that there were conflicts when backporting, thus you **must** do it yourself.
  284. ### Format of backport PRs
  285. The title of backport PRs should be
  286. ```
  287. <original PR title> (#<original pr number>)
  288. ```
  289. The first two lines of the summary of the backporting PR should be
  290. ```
  291. Backport #<original pr number>
  292. ```
  293. with the rest of the summary and labels matching the original PR.
  294. ### Frontports
  295. Frontports behave exactly as described above for backports.
  296. ## Developer Certificate of Origin (DCO)
  297. We consider the act of contributing to the code by submitting a Pull Request as the "Sign off" or agreement to the certifications and terms of the [DCO](DCO) and [MIT license](LICENSE). \
  298. No further action is required. \
  299. You can also decide to sign off your commits by adding the following line at the end of your commit messages:
  300. ```
  301. Signed-off-by: Joe Smith <joe.smith@email.com>
  302. ```
  303. If you set the `user.name` and `user.email` Git config options, you can add the line to the end of your commits automatically with `git commit -s`.
  304. We assume in good faith that the information you provide is legally binding.
  305. ## Release Cycle
  306. We adopted a release schedule to streamline the process of working on, finishing, and issuing releases. \
  307. The overall goal is to make a major release every three or four months, which breaks down into two or three months of general development followed by one month of testing and polishing known as the release freeze. \
  308. All the feature pull requests should be
  309. merged before feature freeze. And, during the frozen period, a corresponding
  310. release branch is open for fixes backported from main branch. Release candidates
  311. are made during this period for user testing to
  312. obtain a final version that is maintained in this branch.
  313. During a development cycle, we may also publish any necessary minor releases
  314. for the previous version. For example, if the latest, published release is
  315. v1.2, then minor changes for the previous release—e.g., v1.1.0 -> v1.1.1—are
  316. still possible.
  317. ## Maintainers
  318. To make sure every PR is checked, we have [maintainers](MAINTAINERS). \
  319. Every PR **must** be reviewed by at least two maintainers (or owners) before it can get merged. \
  320. For refactoring PRs after a week and documentation only PRs, the approval of only one maintainer is enough. \
  321. A maintainer should be a contributor of Gitea and contributed at least
  322. 4 accepted PRs. A contributor should apply as a maintainer in the
  323. [Discord](https://discord.gg/Gitea) `#develop` channel. The team maintainers may invite the contributor. A maintainer
  324. should spend some time on code reviews. If a maintainer has no
  325. time to do that, they should apply to leave the maintainers team
  326. and we will give them the honor of being a member of the [advisors
  327. team](https://github.com/orgs/go-gitea/teams/advisors). Of course, if
  328. an advisor has time to code review, we will gladly welcome them back
  329. to the maintainers team. If a maintainer is inactive for more than 3
  330. months and forgets to leave the maintainers team, the owners may move
  331. him or her from the maintainers team to the advisors team.
  332. For security reasons, Maintainers should use 2FA for their accounts and
  333. if possible provide GPG signed commits.
  334. https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/
  335. https://help.github.com/articles/signing-commits-with-gpg/
  336. ## Technical Oversight Committee (TOC)
  337. At the start of 2023, the `Owners` team was dissolved. Instead, the governance charter proposed a technical oversight committee (TOC) which expands the ownership team of the Gitea project from three elected positions to six positions. Three positions would be elected as it has been over the past years, and the other three would consist of appointed members from the Gitea company.
  338. https://blog.gitea.com/quarterly-23q1/
  339. When the new community members have been elected, the old members will give up ownership to the newly elected members. For security reasons, TOC members or any account with write access (like a bot) must use 2FA.
  340. https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/
  341. ### Current TOC members
  342. - 2023-01-01 ~ 2023-12-31 - https://blog.gitea.com/quarterly-23q1/
  343. - Company
  344. - [Jason Song](https://gitea.com/wolfogre) <i@wolfogre.com>
  345. - [Lunny Xiao](https://gitea.com/lunny) <xiaolunwen@gmail.com>
  346. - [Matti Ranta](https://gitea.com/techknowlogick) <techknowlogick@gitea.io>
  347. - Community
  348. - [6543](https://gitea.com/6543) <6543@obermui.de>
  349. - [Andrew Thornton](https://gitea.com/zeripath) <art27@cantab.net>
  350. - [John Olheiser](https://gitea.com/jolheiser) <john.olheiser@gmail.com>
  351. ### Previous TOC/owners members
  352. Here's the history of the owners and the time they served:
  353. - [Lunny Xiao](https://gitea.com/lunny) - 2016, 2017, [2018](https://github.com/go-gitea/gitea/issues/3255), [2019](https://github.com/go-gitea/gitea/issues/5572), [2020](https://github.com/go-gitea/gitea/issues/9230), [2021](https://github.com/go-gitea/gitea/issues/13801), [2022](https://github.com/go-gitea/gitea/issues/17872)
  354. - [Kim Carlbäcker](https://github.com/bkcsoft) - 2016, 2017
  355. - [Thomas Boerger](https://gitea.com/tboerger) - 2016, 2017
  356. - [Lauris Bukšis-Haberkorns](https://gitea.com/lafriks) - [2018](https://github.com/go-gitea/gitea/issues/3255), [2019](https://github.com/go-gitea/gitea/issues/5572), [2020](https://github.com/go-gitea/gitea/issues/9230), [2021](https://github.com/go-gitea/gitea/issues/13801)
  357. - [Matti Ranta](https://gitea.com/techknowlogick) - [2019](https://github.com/go-gitea/gitea/issues/5572), [2020](https://github.com/go-gitea/gitea/issues/9230), [2021](https://github.com/go-gitea/gitea/issues/13801), [2022](https://github.com/go-gitea/gitea/issues/17872)
  358. - [Andrew Thornton](https://gitea.com/zeripath) - [2020](https://github.com/go-gitea/gitea/issues/9230), [2021](https://github.com/go-gitea/gitea/issues/13801), [2022](https://github.com/go-gitea/gitea/issues/17872)
  359. ## Governance Compensation
  360. Each member of the community elected TOC will be granted $500 each month as compensation for their work.
  361. Furthermore, any community release manager for a specific release or LTS will be compensated $500 for the delivery of said release.
  362. These funds will come from community sources like the OpenCollective rather than directly from the company.
  363. Only non-company members are eligible for this compensation, and if a member of the community TOC takes the responsibility of release manager, they would only be compensated for their TOC duties.
  364. Gitea Ltd employees are not eligible to receive any funds from the OpenCollective unless it is reimbursement for a purchase made for the Gitea project itself.
  365. ## TOC & Working groups
  366. With Gitea covering many projects outside of the main repository, several groups will be created to help focus on specific areas instead of requiring maintainers to be a jack-of-all-trades. Maintainers are of course more than welcome to be part of multiple groups should they wish to contribute in multiple places.
  367. The currently proposed groups are:
  368. - **Core Group**: maintain the primary Gitea repository
  369. - **Integration Group**: maintain the Gitea ecosystem's related tools, including go-sdk/tea/changelog/bots etc.
  370. - **Documentation Group**: maintain related documents and repositories
  371. - **Translation Group**: coordinate with translators and maintain translations
  372. - **Security Group**: managed by TOC directly, members are decided by TOC, maintains security patches/responsible for security items
  373. ## Roadmap
  374. Each year a roadmap will be discussed with the entire Gitea maintainers team, and feedback will be solicited from various stakeholders.
  375. TOC members need to review the roadmap every year and work together on the direction of the project.
  376. When a vote is required for a proposal or other change, the vote of community elected TOC members count slightly more than the vote of company elected TOC members. With this approach, we both avoid ties and ensure that changes align with the mission statement and community opinion.
  377. You can visit our roadmap on the wiki.
  378. ## Versions
  379. Gitea has the `main` branch as a tip branch and has version branches
  380. such as `release/v1.19`. `release/v1.19` is a release branch and we will
  381. tag `v1.19.0` for binary download. If `v1.19.0` has bugs, we will accept
  382. pull requests on the `release/v1.19` branch and publish a `v1.19.1` tag,
  383. after bringing the bug fix also to the main branch.
  384. Since the `main` branch is a tip version, if you wish to use Gitea
  385. in production, please download the latest release tag version. All the
  386. branches will be protected via GitHub, all the PRs to every branch must
  387. be reviewed by two maintainers and must pass the automatic tests.
  388. ## Releasing Gitea
  389. - 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.
  390. - 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.
  391. - 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:
  392. - 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`.
  393. - When CI has finished building tag then you have to create a new branch named `release/v$vmaj.$vmin`
  394. - If it is bugfix version create PR for changelog on branch `release/v$vmaj.$vmin` and wait till it is reviewed and merged.
  395. - 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`.
  396. - 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.)
  397. - 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.
  398. - Send PR to [blog repository](https://gitea.com/gitea/blog) announcing the release.
  399. - Verify all release assets were correctly published through CI on dl.gitea.com and GitHub releases. Once ACKed:
  400. - bump the version of https://dl.gitea.com/gitea/version.json
  401. - merge the blog post PR
  402. - announce the release in discord `#announcements`