code.gitea.io/gitea@v1.22.3/CONTRIBUTING.md (about) 1 # Contribution Guidelines 2 3 <details><summary>Table of Contents</summary> 4 5 - [Contribution Guidelines](#contribution-guidelines) 6 - [Introduction](#introduction) 7 - [Issues](#issues) 8 - [How to report issues](#how-to-report-issues) 9 - [Types of issues](#types-of-issues) 10 - [Discuss your design before the implementation](#discuss-your-design-before-the-implementation) 11 - [Issue locking](#issue-locking) 12 - [Building Gitea](#building-gitea) 13 - [Dependencies](#dependencies) 14 - [Backend](#backend) 15 - [Frontend](#frontend) 16 - [Design guideline](#design-guideline) 17 - [Styleguide](#styleguide) 18 - [Copyright](#copyright) 19 - [Testing](#testing) 20 - [Translation](#translation) 21 - [Code review](#code-review) 22 - [Pull request format](#pull-request-format) 23 - [PR title and summary](#pr-title-and-summary) 24 - [Milestone](#milestone) 25 - [Labels](#labels) 26 - [Breaking PRs](#breaking-prs) 27 - [What is a breaking PR?](#what-is-a-breaking-pr) 28 - [How to handle breaking PRs?](#how-to-handle-breaking-prs) 29 - [Maintaining open PRs](#maintaining-open-prs) 30 - [Getting PRs merged](#getting-prs-merged) 31 - [Final call](#final-call) 32 - [Commit messages](#commit-messages) 33 - [PR Co-authors](#pr-co-authors) 34 - [PRs targeting `main`](#prs-targeting-main) 35 - [Backport PRs](#backport-prs) 36 - [Documentation](#documentation) 37 - [API v1](#api-v1) 38 - [GitHub API compatibility](#github-api-compatibility) 39 - [Adding/Maintaining API routes](#addingmaintaining-api-routes) 40 - [When to use what HTTP method](#when-to-use-what-http-method) 41 - [Requirements for API routes](#requirements-for-api-routes) 42 - [Backports and Frontports](#backports-and-frontports) 43 - [What is backported?](#what-is-backported) 44 - [How to backport?](#how-to-backport) 45 - [Format of backport PRs](#format-of-backport-prs) 46 - [Frontports](#frontports) 47 - [Developer Certificate of Origin (DCO)](#developer-certificate-of-origin-dco) 48 - [Release Cycle](#release-cycle) 49 - [Maintainers](#maintainers) 50 - [Technical Oversight Committee (TOC)](#technical-oversight-committee-toc) 51 - [TOC election process](#toc-election-process) 52 - [Current TOC members](#current-toc-members) 53 - [Previous TOC/owners members](#previous-tocowners-members) 54 - [Governance Compensation](#governance-compensation) 55 - [TOC \& Working groups](#toc--working-groups) 56 - [Roadmap](#roadmap) 57 - [Versions](#versions) 58 - [Releasing Gitea](#releasing-gitea) 59 60 </details> 61 62 ## Introduction 63 64 This document explains how to contribute changes to the Gitea project. \ 65 It assumes you have followed the [installation instructions](https://docs.gitea.com/category/installation). \ 66 Sensitive security-related issues should be reported to [security@gitea.io](mailto:security@gitea.io). 67 68 For configuring IDEs for Gitea development, see the [contributed IDE configurations](contrib/ide/). 69 70 ## Issues 71 72 ### How to report issues 73 74 Please search the issues on the issue tracker with a variety of related keywords to ensure that your issue has not already been reported. 75 76 If your issue has not been reported yet, [open an issue](https://github.com/go-gitea/gitea/issues/new) 77 and answer the questions so we can understand and reproduce the problematic behavior. \ 78 Please write clear and concise instructions so that we can reproduce the behavior — even if it seems obvious. \ 79 The more detailed and specific you are, the faster we can fix the issue. \ 80 It is really helpful if you can reproduce your problem on a site running on the latest commits, i.e. <https://demo.gitea.com>, as perhaps your problem has already been fixed on a current version. \ 81 Please follow the guidelines described in [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) for your report. 82 83 Please be kind, remember that Gitea comes at no cost to you, and you're getting free help. 84 85 ### Types of issues 86 87 Typically, issues fall in one of the following categories: 88 89 - `bug`: Something in the frontend or backend behaves unexpectedly 90 - `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 91 - `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 92 - `enhancement`: An existing feature should get an upgrade 93 - `refactoring`: Parts of the code base don't conform with other parts and should be changed to improve Gitea's maintainability 94 95 ### Discuss your design before the implementation 96 97 We welcome submissions. \ 98 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! 99 100 Significant changes such as new features must go through the change proposal process before they can be accepted. \ 101 This is mainly to save yourself the trouble of implementing it, only to find out that your proposed implementation has some potential problems. \ 102 Furthermore, this process gives everyone a chance to validate the design, helps prevent duplication of effort, and ensures that the idea fits inside 103 the goals for the project and tools. 104 105 Pull requests should not be the place for architecture discussions. 106 107 ### Issue locking 108 109 Commenting on closed or merged issues/PRs is strongly discouraged. 110 Such comments will likely be overlooked as some maintainers may not view notifications on closed issues, thinking that the item is resolved. 111 As such, commenting on closed/merged issues/PRs may be disabled prior to the scheduled auto-locking if a discussion starts or if unrelated comments are posted. 112 If further discussion is needed, we encourage you to open a new issue instead and we recommend linking to the issue/PR in question for context. 113 114 ## Building Gitea 115 116 See the [development setup instructions](https://docs.gitea.com/development/hacking-on-gitea). 117 118 ## Dependencies 119 120 ### Backend 121 122 Go dependencies are managed using [Go Modules](https://go.dev/cmd/go/#hdr-Module_maintenance). \ 123 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). 124 125 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. \ 126 Apart from that, these files should only be modified by Pull Requests whose only purpose is to update dependencies. 127 128 The `go.mod`, `go.sum` update needs to be justified as part of the PR description, 129 and must be verified by the reviewers and/or merger to always reference 130 an existing upstream commit. 131 132 ### Frontend 133 134 For the frontend, we use [npm](https://www.npmjs.com/). 135 136 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. 137 138 ## Design guideline 139 140 Depending on your change, please read the 141 142 - [backend development guideline](https://docs.gitea.com/contributing/guidelines-backend) 143 - [frontend development guideline](https://docs.gitea.com/contributing/guidelines-frontend) 144 - [refactoring guideline](https://docs.gitea.com/contributing/guidelines-refactoring) 145 146 ## Styleguide 147 148 You should always run `make fmt` before committing to conform to Gitea's styleguide. 149 150 ## Copyright 151 152 New code files that you contribute should use the standard copyright header: 153 154 ``` 155 // Copyright <current year> The Gitea Authors. All rights reserved. 156 // SPDX-License-Identifier: MIT 157 ``` 158 159 Afterwards, copyright should only be modified when the copyright author changes. 160 161 ## Testing 162 163 Before submitting a pull request, run all tests to make sure your changes don't cause a regression elsewhere. 164 165 Here's how to run the test suite: 166 167 - code lint 168 169 | | | 170 | :-------------------- | :---------------------------------------------------------------- | 171 |``make lint`` | lint everything (not needed if you only change the front- **or** backend) | 172 |``make lint-frontend`` | lint frontend files | 173 |``make lint-backend`` | lint backend files | 174 175 - run tests (we suggest running them on Linux) 176 177 | Command | Action | | 178 | :------------------------------------- | :----------------------------------------------- | ------------ | 179 |``make test[\#SpecificTestName]`` | run unit test(s) | | 180 |``make test-sqlite[\#SpecificTestName]``| run [integration](tests/integration) test(s) for SQLite |[More details](tests/integration/README.md) | 181 |``make test-e2e-sqlite[\#SpecificTestName]``| run [end-to-end](tests/e2e) test(s) for SQLite |[More details](tests/e2e/README.md) | 182 183 ## Translation 184 185 All translation work happens on [Crowdin](https://crowdin.com/project/gitea). 186 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). 187 It is synced regularly with Crowdin. \ 188 Other locales on main branch **should not** be updated manually as they will be overwritten with each sync. \ 189 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. 190 191 The tool `go run build/backport-locale.go` can be used to backport locales from the main branch to release branches that were missed. 192 193 ## Code review 194 195 ### Pull request format 196 197 Please try to make your pull request easy to review for us. \ 198 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. \ 199 It has lots of useful tips for any project you may want to contribute to. \ 200 Some of the key points: 201 202 - Make small pull requests. \ 203 The smaller, the faster to review and the more likely it will be merged soon. 204 - Don't make changes unrelated to your PR. \ 205 Maybe there are typos on some comments, maybe refactoring would be welcome on a function... \ 206 but if that is not related to your PR, please make *another* PR for that. 207 - Split big pull requests into multiple small ones. \ 208 An incremental change will be faster to review than a huge PR. 209 - Allow edits by maintainers. This way, the maintainers will take care of merging the PR later on instead of you. 210 211 ### PR title and summary 212 213 In the PR title, describe the problem you are fixing, not how you are fixing it. \ 214 Use the first comment as a summary of your PR. \ 215 In the PR summary, you can describe exactly how you are fixing this problem. 216 217 Keep this summary up-to-date as the PR evolves. \ 218 If your PR changes the UI, you must add **after** screenshots in the PR summary. \ 219 If you are not implementing a new feature, you should also post **before** screenshots for comparison. 220 221 If you are implementing a new feature, your PR will only be merged if your screenshots are up to date.\ 222 Furthermore, feature PRs will only be merged if their summary contains a clear usage description (understandable for users) and testing description (understandable for reviewers). 223 You should strive to combine both into a single description. 224 225 Another requirement for merging PRs is that the PR is labeled correctly.\ 226 However, this is not your job as a contributor, but the job of the person merging your PR.\ 227 If you think that your PR was labeled incorrectly, or notice that it was merged without labels, please let us know. 228 229 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 230 231 ```text 232 Fixes/Closes/Resolves #<ISSUE_NR_X>. 233 Fixes/Closes/Resolves #<ISSUE_NR_Y>. 234 ``` 235 236 to your summary. \ 237 Each issue that will be closed must stand on a separate line. 238 239 ### Milestone 240 241 A PR should only be assigned to a milestone if it will likely be merged into the given version. \ 242 As a rule of thumb, assume that a PR will stay open for an additional month for every 100 added lines. \ 243 PRs without a milestone may not be merged. 244 245 ### Labels 246 247 Almost all labels used inside Gitea can be classified as one of the following: 248 249 - `modifies/…`: Determines which parts of the codebase are affected. These labels will be set through the CI. 250 - `topic/…`: Determines the conceptual component of Gitea that is affected, i.e. issues, projects, or authentication. At best, PRs should only target one component but there might be overlap. Must be set manually. 251 - `type/…`: Determines the type of an issue or PR (feature, refactoring, docs, bug, …). If GitHub supported scoped labels, these labels would be exclusive, so you should set **exactly** one, not more or less (every PR should fall into one of the provided categories, and only one). 252 - `issue/…` / `pr/…`: Labels that are specific to issues or PRs respectively and that are only necessary in a given context, i.e. `issue/not-a-bug` or `pr/need-2-approvals` 253 254 Every PR should be labeled correctly with every label that applies. 255 256 There are also some labels that will be managed automatically.\ 257 In particular, these are 258 259 - the amount of pending required approvals 260 - has all `backport`s or needs a manual backport 261 262 ### Breaking PRs 263 264 #### What is a breaking PR? 265 266 A PR is breaking if it meets one of the following criteria: 267 268 - It changes API output in an incompatible way for existing users 269 - It removes a setting that an admin could previously set (i.e. via `app.ini`) 270 - An admin must do something manually to restore the old behavior 271 272 In particular, this means that adding new settings is not breaking.\ 273 Changing the default value of a setting or replacing the setting with another one is breaking, however. 274 275 #### How to handle breaking PRs? 276 277 If your PR has a breaking change, you must add two things to the summary of your PR: 278 279 1. A reasoning why this breaking change is necessary 280 2. A `BREAKING` section explaining in simple terms (understandable for a typical user) how this PR affects users and how to mitigate these changes. This section can look for example like 281 282 ```md 283 ## :warning: BREAKING :warning: 284 ``` 285 286 Breaking PRs will not be merged as long as not both of these requirements are met. 287 288 ### Maintaining open PRs 289 290 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. \ 291 Once that happens, do not rebase or squash your branch anymore as it makes it difficult to review the new changes. \ 292 Merge the base branch into your branch only when you really need to, i.e. because of conflicting changes in the mean time. \ 293 This reduces unnecessary CI runs. \ 294 Don't worry about merge commits messing up your commit history as every PR will be squash merged. \ 295 This means that all changes are joined into a single new commit whose message is as described below. 296 297 ### Getting PRs merged 298 299 Changes to Gitea must be reviewed before they are accepted — no matter who 300 makes the change, even if they are an owner or a maintainer. \ 301 The only exception are critical bugs that prevent Gitea from being compiled or started. \ 302 Specifically, we require two approvals from maintainers for every PR. \ 303 Once this criteria has been met, your PR receives the `lgtm/done` label. \ 304 From this point on, your only responsibility is to fix merge conflicts or respond to/implement requests by maintainers. \ 305 It is the responsibility of the maintainers from this point to get your PR merged. 306 307 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. \ 308 This label means that the PR is part of the merge queue and will be merged as soon as possible. \ 309 The merge queue will be cleared in the order of the list below: 310 311 <https://github.com/go-gitea/gitea/pulls?q=is%3Apr+label%3Areviewed%2Fwait-merge+sort%3Acreated-asc+is%3Aopen> 312 313 Gitea uses it's own tool, the <https://github.com/GiteaBot/gitea-backporter> to automate parts of the review process. \ 314 This tool does the things listed below automatically: 315 316 - create a backport PR if needed once the initial PR was merged 317 - remove the PR from the merge queue after the PR merged 318 - keep the oldest branch in the merge queue up to date with merges 319 320 ### Final call 321 322 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. 323 324 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. 325 326 However, if there are no objections from maintainers, the PR can be merged with only one approval from the TOC (not the author). 327 328 ### Commit messages 329 330 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. \ 331 The final commit message should no longer contain any uncertainty such as `hopefully, <x> won't happen anymore`. Replace uncertainty with certainty. 332 333 #### PR Co-authors 334 335 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. \ 336 Mergers are required to remove such "false-positive" co-authors when writing the commit message. \ 337 The true co-authors must remain in the commit message. 338 339 #### PRs targeting `main` 340 341 The commit message of PRs targeting `main` is always 342 343 ```bash 344 $PR_TITLE ($PR_INDEX) 345 346 $REWRITTEN_PR_SUMMARY 347 ``` 348 349 #### Backport PRs 350 351 The commit message of backport PRs is always 352 353 ```bash 354 $PR_TITLE ($INITIAL_PR_INDEX) ($BACKPORT_PR_INDEX) 355 356 $REWRITTEN_PR_SUMMARY 357 ``` 358 359 ## Documentation 360 361 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. 362 363 ## API v1 364 365 The API is documented by [swagger](https://gitea.com/api/swagger) and is based on [the GitHub API](https://docs.github.com/en/rest). 366 367 ### GitHub API compatibility 368 369 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. \ 370 If Gitea provides functionality that GitHub does not, a new endpoint can be created. \ 371 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. \ 372 Updating an existing API should not remove existing fields unless there is a really good reason to do so. \ 373 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). 374 375 ### Adding/Maintaining API routes 376 377 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)). \ 378 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)) \ 379 and referenced in [routers/api/v1/swagger/options.go](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/swagger/options.go). \ 380 They can then be used like [this example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L318). \ 381 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)) \ 382 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)) \ 383 They can be used like [this example](https://github.com/go-gitea/gitea/blob/c620eb5b2d0d874da68ebd734d3864c5224f71f7/routers/api/v1/repo/issue.go#L277-L279). 384 385 ### When to use what HTTP method 386 387 In general, HTTP methods are chosen as follows: 388 389 - **GET** endpoints return the requested object(s) and status **OK (200)** 390 - **DELETE** endpoints return the status **No Content (204)** and no content either 391 - **POST** endpoints are used to **create** new objects (e.g. a User) and return the status **Created (201)** and the created object 392 - **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 393 - **PATCH** endpoints are used to **edit/change** an existing object and return the changed object and the status **OK (200)** 394 395 ### Requirements for API routes 396 397 All parameters of endpoints changing/editing an object must be optional (except the ones to identify the object, which are required). 398 399 Endpoints returning lists must 400 401 - support pagination (`page` & `limit` options in query) 402 - set `X-Total-Count` header via **SetTotalCountHeader** ([example](https://github.com/go-gitea/gitea/blob/7aae98cc5d4113f1e9918b7ee7dd09f67c189e3e/routers/api/v1/repo/issue.go#L444)) 403 404 ## Backports and Frontports 405 406 ### What is backported? 407 408 We backport PRs given the following circumstances: 409 410 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? --> 411 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? --> 412 3. We never backport new features. 413 4. We never backport breaking changes except when 414 1. The breaking change has no effect on the vast majority of users 415 2. The component triggering the breaking change is marked as experimental 416 417 ### How to backport? 418 419 In the past, it was necessary to manually backport your PRs. \ 420 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 421 422 - does not have the label `backport/manual` 423 - has the label `backport/<version>` 424 425 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. 426 427 ### Format of backport PRs 428 429 The title of backport PRs should be 430 431 ``` 432 <original PR title> (#<original pr number>) 433 ``` 434 435 The first two lines of the summary of the backporting PR should be 436 437 ``` 438 Backport #<original pr number> 439 440 ``` 441 442 with the rest of the summary and labels matching the original PR. 443 444 ### Frontports 445 446 Frontports behave exactly as described above for backports. 447 448 ## Developer Certificate of Origin (DCO) 449 450 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). \ 451 No further action is required. \ 452 You can also decide to sign off your commits by adding the following line at the end of your commit messages: 453 454 ``` 455 Signed-off-by: Joe Smith <joe.smith@email.com> 456 ``` 457 458 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`. 459 460 We assume in good faith that the information you provide is legally binding. 461 462 ## Release Cycle 463 464 We adopted a release schedule to streamline the process of working on, finishing, and issuing releases. \ 465 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. \ 466 All the feature pull requests should be 467 merged before feature freeze. All feature pull requests haven't been merged before this feature freeze will be moved to next milestone, please notice our feature freeze announcement on discord. And, during the frozen period, a corresponding 468 release branch is open for fixes backported from main branch. Release candidates 469 are made during this period for user testing to 470 obtain a final version that is maintained in this branch. 471 472 During a development cycle, we may also publish any necessary minor releases 473 for the previous version. For example, if the latest, published release is 474 v1.2, then minor changes for the previous release—e.g., v1.1.0 -> v1.1.1—are 475 still possible. 476 477 ## Maintainers 478 479 To make sure every PR is checked, we have [maintainers](MAINTAINERS). \ 480 Every PR **must** be reviewed by at least two maintainers (or owners) before it can get merged. \ 481 For refactoring PRs after a week and documentation only PRs, the approval of only one maintainer is enough. \ 482 A maintainer should be a contributor of Gitea and contributed at least 483 4 accepted PRs. A contributor should apply as a maintainer in the 484 [Discord](https://discord.gg/Gitea) `#develop` channel. The team maintainers may invite the contributor. A maintainer 485 should spend some time on code reviews. If a maintainer has no 486 time to do that, they should apply to leave the maintainers team 487 and we will give them the honor of being a member of the [advisors 488 team](https://github.com/orgs/go-gitea/teams/advisors). Of course, if 489 an advisor has time to code review, we will gladly welcome them back 490 to the maintainers team. If a maintainer is inactive for more than 3 491 months and forgets to leave the maintainers team, the owners may move 492 him or her from the maintainers team to the advisors team. 493 For security reasons, Maintainers should use 2FA for their accounts and 494 if possible provide GPG signed commits. 495 https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/ 496 https://help.github.com/articles/signing-commits-with-gpg/ 497 498 Furthermore, any account with write access (like bots and TOC members) **must** use 2FA. 499 https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/ 500 501 ## Technical Oversight Committee (TOC) 502 503 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 are elected as it has been over the past years, and the other three consist of appointed members from the Gitea company. 504 https://blog.gitea.com/quarterly-23q1/ 505 506 ### TOC election process 507 508 Any maintainer is eligible to be part of the community TOC if they are not associated with the Gitea company. 509 A maintainer can either nominate themselves, or can be nominated by other maintainers to be a candidate for the TOC election. 510 If you are nominated by someone else, you must first accept your nomination before the vote starts to be a candidate. 511 512 The TOC is elected for one year, the TOC election happens yearly. 513 After the announcement of the results of the TOC election, elected members have two weeks time to confirm or refuse the seat. 514 If an elected member does not answer within this timeframe, they are automatically assumed to refuse the seat. 515 Refusals result in the person with the next highest vote getting the same choice. 516 As long as seats are empty in the TOC, members of the previous TOC can fill them until an elected member accepts the seat. 517 518 If an elected member that accepts the seat does not have 2FA configured yet, they will be temporarily counted as `answer pending` until they manage to configure 2FA, thus leaving their seat empty for this duration. 519 520 ### Current TOC members 521 522 - 2024-01-01 ~ 2024-12-31 523 - Company 524 - [Jason Song](https://gitea.com/wolfogre) <i@wolfogre.com> 525 - [Lunny Xiao](https://gitea.com/lunny) <xiaolunwen@gmail.com> 526 - [Matti Ranta](https://gitea.com/techknowlogick) <techknowlogick@gitea.com> 527 - Community 528 - [6543](https://gitea.com/6543) <6543@obermui.de> 529 - [delvh](https://gitea.com/delvh) <dev.lh@web.de> 530 - [John Olheiser](https://gitea.com/jolheiser) <john.olheiser@gmail.com> 531 532 ### Previous TOC/owners members 533 534 Here's the history of the owners and the time they served: 535 536 - [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), 2023 537 - [Kim Carlbäcker](https://github.com/bkcsoft) - 2016, 2017 538 - [Thomas Boerger](https://gitea.com/tboerger) - 2016, 2017 539 - [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) 540 - [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), 2023 541 - [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), 2023 542 - [6543](https://gitea.com/6543) - 2023 543 - [John Olheiser](https://gitea.com/jolheiser) - 2023 544 - [Jason Song](https://gitea.com/wolfogre) - 2023 545 546 ## Governance Compensation 547 548 Each member of the community elected TOC will be granted $500 each month as compensation for their work. 549 550 Furthermore, any community release manager for a specific release or LTS will be compensated $500 for the delivery of said release. 551 552 These funds will come from community sources like the OpenCollective rather than directly from the company. 553 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. 554 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. 555 556 ## TOC & Working groups 557 558 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. 559 560 The currently proposed groups are: 561 562 - **Core Group**: maintain the primary Gitea repository 563 - **Integration Group**: maintain the Gitea ecosystem's related tools, including go-sdk/tea/changelog/bots etc. 564 - **Documentation Group**: maintain related documents and repositories 565 - **Translation Group**: coordinate with translators and maintain translations 566 - **Security Group**: managed by TOC directly, members are decided by TOC, maintains security patches/responsible for security items 567 568 ## Roadmap 569 570 Each year a roadmap will be discussed with the entire Gitea maintainers team, and feedback will be solicited from various stakeholders. 571 TOC members need to review the roadmap every year and work together on the direction of the project. 572 573 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. 574 575 You can visit our roadmap on the wiki. 576 577 ## Versions 578 579 Gitea has the `main` branch as a tip branch and has version branches 580 such as `release/v1.19`. `release/v1.19` is a release branch and we will 581 tag `v1.19.0` for binary download. If `v1.19.0` has bugs, we will accept 582 pull requests on the `release/v1.19` branch and publish a `v1.19.1` tag, 583 after bringing the bug fix also to the main branch. 584 585 Since the `main` branch is a tip version, if you wish to use Gitea 586 in production, please download the latest release tag version. All the 587 branches will be protected via GitHub, all the PRs to every branch must 588 be reviewed by two maintainers and must pass the automatic tests. 589 590 ## Releasing Gitea 591 592 - 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. 593 - 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. 594 - 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: 595 - 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`. 596 - When CI has finished building tag then you have to create a new branch named `release/v$vmaj.$vmin` 597 - If it is bugfix version create PR for changelog on branch `release/v$vmaj.$vmin` and wait till it is reviewed and merged. 598 - 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`. 599 - 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.) 600 - 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. 601 - Send PR to [blog repository](https://gitea.com/gitea/blog) announcing the release. 602 - Verify all release assets were correctly published through CI on dl.gitea.com and GitHub releases. Once ACKed: 603 - bump the version of https://dl.gitea.com/gitea/version.json 604 - merge the blog post PR 605 - announce the release in discord `#announcements`