├── .editorconfig ├── .github ├── issue_template.md └── pull_request_template.md ├── .lgtm ├── CONTRIBUTING.md ├── CONTRIBUTORS ├── DCO ├── LICENSE ├── MAINTAINERS ├── README.md ├── gitea.rb ├── lgtm.rb └── tea.rb /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | 10 | [*.go] 11 | indent_style = tab 12 | indent_size = 8 13 | 14 | [*.tmpl] 15 | indent_style = tab 16 | indent_size = 2 17 | 18 | [Makefile] 19 | indent_style = tab 20 | 21 | [*.{less,yml}] 22 | indent_style = space 23 | indent_size = 2 24 | 25 | [*.js] 26 | indent_style = space 27 | indent_size = 4 28 | -------------------------------------------------------------------------------- /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | 1. Please speak English, this is the language everybody of us can speak and write. 2 | 2. Please ask questions or config/deploy problems on our Gitter channel: https://gitter.im/go-gitea/gitea 3 | 3. Please take a moment to search that an issue doesn't already exist. 4 | 4. Please give all relevant information below for bug reports, incomplete details will be handled as an invalid report. 5 | 6 | **You MUST delete the content above including this line before posting, otherwise your issue will be invalid.** 7 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | Please check the following: 2 | 3 | 1. Make sure you are targeting the `master` branch, pull requests on release branches are only allowed for bug fixes. 4 | 2. Read contributing guidelines: https://github.com/go-gitea/git/blob/master/CONTRIBUTING.md 5 | 3. Describe what your pull request does and which issue you're targeting (if any) 6 | 7 | **You MUST delete the content above including this line before posting, otherwise your pull request will be invalid.** 8 | -------------------------------------------------------------------------------- /.lgtm: -------------------------------------------------------------------------------- 1 | pattern = "(?)LGTM" 2 | self_approval_off = true 3 | ignore_maintainers_file = true 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | ## Introduction 4 | 5 | This document explains how to contribute changes to the Gitea project. It assumes you have followed the [installation instructions](https://github.com/go-gitea/docs/tree/master/en-US/installation). Sensitive security-related issues should be reported to [security@gitea.io](mailto:security@gitea.io). 6 | 7 | ## Bug reports 8 | 9 | Please search the issues on the issue tracker with a variety of keywords to ensure your bug is not already reported. 10 | 11 | If unique, [open an issue](https://github.com/go-gitea/gitea/issues/new) and answer the questions so we can understand and reproduce the problematic behavior. 12 | 13 | To show us that the issue you are having is in Gitea itself, please write clear, concise instructions so we can reproduce the behavior (even if it seems obvious). The more detailed and specific you are, the faster we can fix the issue. Check out [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html). 14 | 15 | Please be kind, remember that Gitea comes at no cost to you, and you're getting free help. 16 | 17 | ## Discuss your design 18 | 19 | The project welcomes submissions but please let everyone know what you're working on if you want to change or add something to the Gitea repositories. 20 | 21 | Before starting to write something new for the Gitea project, please [file an issue](https://github.com/go-gitea/gitea/issues/new). Significant changes must go through the [change proposal process](https://github.com/go-gitea/proposals) before they can be accepted. 22 | 23 | This process gives everyone a chance to validate the design, helps prevent duplication of effort, and ensures that the idea fits inside the goals for the project and tools. It also checks that the design is sound before code is written; the code review tool is not the place for high-level discussions. 24 | 25 | ## Testing redux 26 | 27 | Before sending code out for review, run all the tests for the whole tree to make sure the changes don't break other usage and keep the compatibility on upgrade. To make sure you are running the test suite exactly like we do, you should install the CLI for [Drone CI](https://github.com/drone/drone), as we are using the server for continous testing, following [these instructions](http://readme.drone.io/0.5/install/cli/). After that you can simply call `drone exec` within your working directory and it will try to run the test suite locally. 28 | 29 | ## Code review 30 | 31 | Changes to Gitea must be reviewed before they are accepted, no matter who makes the change even if it is an owner or a maintainer. We use GitHub's pull request workflow to do that and we also use [LGTM](http://lgtm.co) to ensure every PR is reviewed by at least 2 maintainers. 32 | 33 | Please try to make your pull request easy to review for us. Please read the "[How to get faster PR reviews](https://github.com/kubernetes/community/blob/master/contributors/devel/faster_reviews.md)" guide, it has lots of useful tips for any project you may want to contribute. Some of the key points: 34 | 35 | * Make small pull requests. The smaller, the faster to review and the more likely it will be merged soon. 36 | * Don't make changes unrelated to your PR. Maybe there are typos on some comments, maybe refactoring would be welcome on a function... but if that is not related to your PR, please make *another* PR for that. 37 | * Split big pull requests into multiple small ones. An incremental change will be faster to review than a huge PR. 38 | 39 | ## Sign your work 40 | 41 | The sign-off is a simple line at the end of the explanation for the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: If you can certify [DCO](DCO), then you just add a line to every git commit message: 42 | 43 | ``` 44 | Signed-off-by: Joe Smith 45 | ``` 46 | 47 | Please use your real name, we really dislike pseudonyms or anonymous contributions. We are in the open-source world without secrets. If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`. 48 | 49 | ## Maintainers 50 | 51 | To make sure every PR is checked, we have [team maintainers](https://github.com/orgs/go-gitea/teams/maintainers). Every PR **MUST** be reviewed by at least two maintainers (or owners) before it can get merged. A maintainer should be a contributor of Gitea (or Gogs) and contributed at least 4 accepted PRs. A contributor should apply as a maintainer in the [Gitter develop channel](https://gitter.im/go-gitea/develop). The owners or the team maintainers may invite the contributor. A maintainer should spend some time on code reviews. If a maintainer has no time to do that, they should apply to leave the maintainers team and we will give them the honor of being a member of the [advisors team](https://github.com/orgs/go-gitea/teams/advisors). Of course, if an advisor has time to code review, we will gladly welcome them back to the maintainers team. If a maintainer is inactive for more than 3 months and forgets to leave the maintainers team, the owners may move him or her from the maintainers team to the advisors team. 52 | 53 | ## Owners 54 | 55 | Since Gitea is a pure community organization without any company support, to keep the development healthy we will elect three owners every year. All contributors may vote to elect up to three candidates, one of which will be the main owner, and the other two the assistant owners. When the new owners have been elected, the old owners will give up ownership to the newly elected owners. If an owner is unable to do so, the other owners will assist in ceding ownership to the newly elected owners. 56 | 57 | After the election, the new owners should proactively agree with our [CONTRIBUTING](CONTRIBUTING.md) requirements on the [Gitter main channel](https://gitter.im/go-gitea/gitea). Below are the words to speak: 58 | 59 | ``` 60 | I'm honored to having been elected an owner of Gitea, I agree with [CONTRIBUTING](CONTRIBUTING.md). I will spend part of my time on Gitea and lead the development of Gitea. 61 | ``` 62 | 63 | To honor the past owners, here's the history of the owners and the time they served: 64 | 65 | * 2016-11-04 ~ 2017-12-31 66 | * [Lunny Xiao](https://github.com/lunny) 67 | * [Thomas Boerger](https://github.com/tboerger) 68 | * [Kim Carlbäcker](https://github.com/bkcsoft) 69 | 70 | ## Versions 71 | 72 | Gitea has the `master` branch as a tip branch and has version branches such as `v0.9`. `v0.9` is a release branch and we will tag `v0.9.0` for binary download. If `v0.9.0` has bugs, we will accept pull requests on the `v0.9` branch and publish a `v0.9.1` tag, after bringing the bug fix also to the master branch. 73 | 74 | Since the `master` branch is a tip version, if you wish to use Gitea in production, please download the latest release tag version. All the branches will be protected via GitHub, all the PRs to every branch must be reviewed by two maintainers and must pass the automatic tests. 75 | 76 | ## Copyright 77 | 78 | Code that you contribute should use the standard copyright header: 79 | 80 | ``` 81 | // Copyright 2017 The Gitea Authors. All rights reserved. 82 | // Use of this source code is governed by a MIT-style 83 | // license that can be found in the LICENSE file. 84 | ``` 85 | 86 | Files in the repository contain copyright from the year they are added to the year they are last changed. If the copyright author is changed, just paste the header below the old one. 87 | -------------------------------------------------------------------------------- /CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Andrey Nering (@andreynering) 2 | Kim Carlbäcker (@bkcsoft) 3 | LefsFlare (@LefsFlarey) 4 | Lunny Xiao (@lunny) 5 | Rachid Zarouali (@xinity) 6 | Rémy Boulanouar (@DblK) 7 | Sandro Santilli (@strk) 8 | Thibault Meyer (@0xbaadf00d) 9 | Thomas Boerger (@tboerger) 10 | -------------------------------------------------------------------------------- /DCO: -------------------------------------------------------------------------------- 1 | Developer Certificate of Origin 2 | Version 1.1 3 | 4 | Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 5 | 660 York Street, Suite 102, 6 | San Francisco, CA 94110 USA 7 | 8 | Everyone is permitted to copy and distribute verbatim copies of this 9 | license document, but changing it is not allowed. 10 | 11 | 12 | Developer's Certificate of Origin 1.1 13 | 14 | By making a contribution to this project, I certify that: 15 | 16 | (a) The contribution was created in whole or in part by me and I 17 | have the right to submit it under the open source license 18 | indicated in the file; or 19 | 20 | (b) The contribution is based upon previous work that, to the best 21 | of my knowledge, is covered under an appropriate open source 22 | license and I have the right under that license to submit that 23 | work with modifications, whether created in whole or in part 24 | by me, under the same open source license (unless I am 25 | permitted to submit under a different license), as indicated 26 | in the file; or 27 | 28 | (c) The contribution was provided directly to me by some other 29 | person who certified (a), (b) or (c) and I have not modified 30 | it. 31 | 32 | (d) I understand and agree that this project and the contribution 33 | are public and that a record of the contribution (including all 34 | personal information I submit with it, including my sign-off) is 35 | maintained indefinitely and may be redistributed consistent with 36 | this project or the open source license(s) involved. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 The Gitea Authors 2 | Copyright (c) 2015 The Gogs Authors 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /MAINTAINERS: -------------------------------------------------------------------------------- 1 | Alexey Makhov (@makhov) 2 | Andrey Nering (@andreynering) 3 | Bo-Yi Wu (@appleboy) 4 | Ethan Koenig (@ethantkoenig) 5 | Kees de Vries (@Bwko) 6 | Kim Carlbäcker (@bkcsoft) 7 | LefsFlare (@LefsFlarey) 8 | Lunny Xiao (@lunny) 9 | Matthias Loibl (@metalmatze) 10 | Morgan Bazalgette (@thehowl) 11 | Rachid Zarouali (@xinity) 12 | Rémy Boulanouar (@DblK) 13 | Sandro Santilli (@strk) 14 | Thibault Meyer (@0xbaadf00d) 15 | Thomas Boerger (@tboerger) 16 | Patrick G (@geek1011) 17 | Antoine Girard (@sapk) 18 | Lauris Bukšis-Haberkorns (@lafriks) 19 | Jonas Östanbäck (@cez81) 20 | David Schneiderbauer (@daviian) 21 | Peter Žeby (@morlinest) 22 | Matti Ranta (@techknowlogick) 23 | Jonas Franz (@jonasfranz) 24 | Alexey Terentyev (@axifive) 25 | Lanre Adelowo (@adelowo) 26 | Konrad Langenberg (@kolaente) 27 | He-Long Zhang (@BetaCat0) 28 | Andrew Thornton (@zeripath) 29 | 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gitea: Homebrew 2 | 3 | [![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/NsatcWJ) 4 | 5 | Homebrew repository to install Gitea on macOS. 6 | 7 | ## Prepare 8 | 9 | ```bash 10 | brew tap go-gitea/gitea 11 | ``` 12 | 13 | ## Install 14 | 15 | ### gitea 16 | 17 | ```bash 18 | brew install gitea 19 | gitea -h 20 | ``` 21 | 22 | ## Contributing 23 | 24 | Fork -> Patch -> Push -> Pull Request 25 | 26 | ## Authors 27 | 28 | * [Maintainers](https://github.com/orgs/go-gitea/people) 29 | * [Contributors](https://github.com/go-gitea/gitea/graphs/contributors) 30 | 31 | ## License 32 | 33 | This project is under the MIT License. See the [LICENSE](LICENSE) file for the 34 | full license text. 35 | 36 | ## Copyright 37 | 38 | ``` 39 | Copyright (c) 2016 The Gitea Authors 40 | ``` 41 | -------------------------------------------------------------------------------- /gitea.rb: -------------------------------------------------------------------------------- 1 | require "formula" 2 | 3 | class Gitea < Formula 4 | homepage "https://github.com/go-gitea/gitea" 5 | head "https://github.com/go-gitea/gitea.git" 6 | 7 | stable do 8 | version "1.8.3" 9 | url "https://dl.gitea.io/gitea/#{version}/gitea-#{version}-darwin-10.6-amd64" 10 | sha256 `curl -s https://dl.gitea.io/gitea/#{version}/gitea-#{version}-darwin-10.6-amd64.sha256`.split(" ").first 11 | end 12 | 13 | devel do 14 | url "https://dl.gitea.io/gitea/master/gitea-master-darwin-10.6-amd64" 15 | sha256 `curl -s https://dl.gitea.io/gitea/master/gitea-master-darwin-10.6-amd64.sha256`.split(" ").first 16 | version "master" 17 | end 18 | 19 | head do 20 | url "https://github.com/go-gitea/gitea.git", :branch => "master" 21 | depends_on "go" => :build 22 | end 23 | 24 | test do 25 | system "#{bin}/gitea", "--version" 26 | end 27 | 28 | def install 29 | case 30 | when build.head? 31 | mkdir_p buildpath/File.join("src", "code.gitea.io") 32 | ln_s buildpath, buildpath/File.join("src", "code.gitea.io", "gitea") 33 | 34 | ENV.append_path "PATH", File.join(buildpath, "bin") 35 | 36 | ENV["GOPATH"] = buildpath 37 | ENV["GOHOME"] = buildpath 38 | ENV["TAGS"] = "bindata sqlite tidb" 39 | 40 | system "cd src/code.gitea.io/gitea && make generate build" 41 | 42 | bin.install "#{buildpath}/gitea" => "gitea" 43 | else 44 | bin.install "#{buildpath}/gitea-#{version}-darwin-10.6-amd64" => "gitea" 45 | end 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /lgtm.rb: -------------------------------------------------------------------------------- 1 | require "formula" 2 | 3 | class Lgtm < Formula 4 | homepage "https://github.com/go-gitea/lgtm" 5 | head "https://github.com/go-gitea/lgtm.git" 6 | 7 | stable do 8 | version "1.0.0" 9 | url "https://dl.gitea.io/lgtm/#{version}/lgtm-#{version}-darwin-10.6-amd64" 10 | sha256 `curl -s https://dl.gitea.io/lgtm/#{version}/lgtm-#{version}-darwin-10.6-amd64.sha256`.split(" ").first 11 | end 12 | 13 | devel do 14 | url "https://dl.gitea.io/lgtm/master/lgtm-master-darwin-10.6-amd64" 15 | sha256 `curl -s https://dl.gitea.io/lgtm/master/lgtm-master-darwin-10.6-amd64.sha256`.split(" ").first 16 | version "master" 17 | end 18 | 19 | head do 20 | url "https://github.com/go-gitea/lgtm.git", :branch => "master" 21 | depends_on "go" => :build 22 | end 23 | 24 | test do 25 | system "#{bin}/lgtm", "--version" 26 | end 27 | 28 | def install 29 | case 30 | when build.head? 31 | mkdir_p buildpath/File.join("src", "github.com", "go-gitea") 32 | ln_s buildpath, buildpath/File.join("src", "github.com", "go-gitea", "lgtm") 33 | 34 | ENV.append_path "PATH", File.join(buildpath, "bin") 35 | 36 | ENV["GOPATH"] = buildpath 37 | ENV["GOHOME"] = buildpath 38 | ENV["TAGS"] = "" 39 | 40 | system "cd src/github.com/go-gitea/lgtm && make build" 41 | 42 | bin.install "#{buildpath}/lgtm" => "lgtm" 43 | else 44 | bin.install "#{buildpath}/lgtm-#{version}-darwin-10.6-amd64" => "lgtm" 45 | end 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /tea.rb: -------------------------------------------------------------------------------- 1 | require "formula" 2 | 3 | class Tea < Formula 4 | homepage "https://gitea.com/gitea/tea" 5 | head "https://gitea.com/gitea/tea.git" 6 | 7 | stable do 8 | version "0.1.0" 9 | url "https://dl.gitea.io/tea/#{version}/tea-#{version}-darwin-10.6-amd64" 10 | sha256 `curl -s https://dl.gitea.io/tea/#{version}/tea-#{version}-darwin-10.6-amd64.sha256`.split(" ").first 11 | end 12 | 13 | devel do 14 | url "https://dl.gitea.io/tea/master/tea-master-darwin-10.6-amd64" 15 | sha256 `curl -s https://dl.gitea.io/tea/master/tea-master-darwin-10.6-amd64.sha256`.split(" ").first 16 | version "master" 17 | end 18 | 19 | head do 20 | url "https://github.com/go-gitea/tea.git", :branch => "master" 21 | depends_on "go" => :build 22 | end 23 | 24 | test do 25 | system "#{bin}/tea", "--version" 26 | end 27 | 28 | def install 29 | case 30 | when build.head? 31 | mkdir_p buildpath/File.join("src", "code.gitea.io") 32 | ln_s buildpath, buildpath/File.join("src", "code.gitea.io", "tea") 33 | 34 | ENV.append_path "PATH", File.join(buildpath, "bin") 35 | 36 | ENV["GOPATH"] = buildpath 37 | ENV["GOHOME"] = buildpath 38 | 39 | system "cd src/code.gitea.io/tea && make build" 40 | 41 | bin.install "#{buildpath}/tea" => "tea" 42 | else 43 | bin.install "#{buildpath}/tea-#{version}-darwin-10.6-amd64" => "tea" 44 | end 45 | end 46 | end 47 | --------------------------------------------------------------------------------