Bläddra i källkod

进行公开发布的修改

1. 修改README.md
2. 删除不在使用的文件
3. 添加配置选项
SongZihuan 2 månader sedan
förälder
incheckning
9115a6369c
100 ändrade filer med 290 tillägg och 1599 borttagningar
  1. 0 26
      .deepsource.toml
  2. 0 2
      .github/CODEOWNERS
  3. 0 78
      .github/CONTRIBUTING.md
  4. 41 0
      .github/ISSUE_TEMPLATE/1-bug.md
  5. 15 0
      .github/ISSUE_TEMPLATE/2-feature.md
  6. 7 0
      .github/ISSUE_TEMPLATE/3-thank.md
  7. 0 82
      .github/ISSUE_TEMPLATE/bug_report.yml
  8. 1 0
      .github/ISSUE_TEMPLATE/config.yaml
  9. 0 8
      .github/ISSUE_TEMPLATE/config.yml
  10. 0 52
      .github/ISSUE_TEMPLATE/dev_release_minor_version.md
  11. 0 59
      .github/ISSUE_TEMPLATE/dev_release_patch_version.md
  12. 0 32
      .github/ISSUE_TEMPLATE/documentation.yml
  13. 0 47
      .github/ISSUE_TEMPLATE/feature_request.yml
  14. 0 11
      .github/dependabot.yml
  15. 14 0
      .github/pull-request-template.md
  16. 0 15
      .github/pull_request_template.md
  17. 0 75
      .github/workflows/codeql.yml
  18. 0 192
      .github/workflows/docker.yml
  19. 0 216
      .github/workflows/go.yml
  20. 0 25
      .github/workflows/lock.yml
  21. 0 17
      .github/workflows/shell.yml
  22. 0 1
      .packager/.godir
  23. 0 1
      .packager/Procfile
  24. 0 24
      .packager/hooks/postinst
  25. 0 31
      .pkgr.yml
  26. 0 257
      CHANGELOG.md
  27. 0 2
      CODEOWNERS
  28. 5 16
      LICENSE
  29. 19 0
      LICENSE.gogs
  30. 18 96
      README.md
  31. 0 102
      README_ZH.md
  32. 0 24
      SECURITY.md
  33. 1 1
      Taskfile.yml
  34. 0 16
      codecov.yml
  35. 8 0
      conf/app.ini
  36. 1 1
      conf/embed.go
  37. 1 1
      conf/embed_test.go
  38. 1 1
      gen.go
  39. 1 0
      go.mod
  40. 2 0
      go.sum
  41. 1 1
      gogs.go
  42. 1 1
      internal/app/api.go
  43. 1 1
      internal/app/api_test.go
  44. 1 1
      internal/app/metrics.go
  45. 1 1
      internal/auth/auth.go
  46. 1 1
      internal/auth/github/config.go
  47. 1 1
      internal/auth/github/provider.go
  48. 1 1
      internal/auth/ldap/config.go
  49. 1 1
      internal/auth/ldap/provider.go
  50. 1 1
      internal/auth/pam/config.go
  51. 1 1
      internal/auth/pam/pam.go
  52. 1 1
      internal/auth/pam/pam_stub.go
  53. 1 1
      internal/auth/pam/provider.go
  54. 1 1
      internal/auth/smtp/config.go
  55. 1 1
      internal/auth/smtp/provider.go
  56. 1 1
      internal/authutil/basic.go
  57. 1 1
      internal/authutil/basic_test.go
  58. 1 1
      internal/avatar/avatar.go
  59. 1 1
      internal/avatar/avatar_test.go
  60. 1 1
      internal/cmd/admin.go
  61. 1 1
      internal/cmd/backup.go
  62. 1 1
      internal/cmd/cert.go
  63. 1 1
      internal/cmd/cmd.go
  64. 1 1
      internal/cmd/hook.go
  65. 1 1
      internal/cmd/import.go
  66. 1 1
      internal/cmd/restore.go
  67. 1 1
      internal/cmd/serv.go
  68. 77 18
      internal/cmd/web.go
  69. 1 1
      internal/conf/computed.go
  70. 1 1
      internal/conf/computed_test.go
  71. 1 1
      internal/conf/conf.go
  72. 1 1
      internal/conf/conf_test.go
  73. 1 1
      internal/conf/log.go
  74. 1 1
      internal/conf/log_test.go
  75. 1 1
      internal/conf/mocks.go
  76. 17 13
      internal/conf/static.go
  77. 1 1
      internal/conf/static_minwinsvc.go
  78. 1 1
      internal/conf/static_test.go
  79. 4 0
      internal/conf/testdata/TestInit.golden.ini
  80. 1 1
      internal/conf/utils.go
  81. 1 1
      internal/conf/utils_test.go
  82. 1 1
      internal/context/api.go
  83. 1 1
      internal/context/api_org.go
  84. 1 1
      internal/context/auth.go
  85. 1 1
      internal/context/context.go
  86. 1 1
      internal/context/notice.go
  87. 1 1
      internal/context/org.go
  88. 1 1
      internal/context/repo.go
  89. 1 1
      internal/context/user.go
  90. 1 1
      internal/cron/cron.go
  91. 1 1
      internal/cryptoutil/aes.go
  92. 1 1
      internal/cryptoutil/aes_test.go
  93. 1 1
      internal/cryptoutil/md5.go
  94. 1 1
      internal/cryptoutil/md5_test.go
  95. 1 1
      internal/cryptoutil/sha.go
  96. 1 1
      internal/cryptoutil/sha_test.go
  97. 1 1
      internal/database/access_tokens.go
  98. 1 1
      internal/database/access_tokens_test.go
  99. 1 1
      internal/database/actions.go
  100. 1 1
      internal/database/actions_test.go

+ 0 - 26
.deepsource.toml

@@ -1,26 +0,0 @@
-version = 1
-
-exclude_patterns = ["**/mocks_test.go"]
-
-[[analyzers]]
-name = "docker"
-enabled = true
-
-[[analyzers]]
-name = "shell"
-enabled = true
-
-[[analyzers]]
-name = "go"
-enabled = true
-
-  [analyzers.meta]
-  import_root = "github.com/gogs/gogs"
-
-[[transformers]]
-name = "gofumpt"
-enabled = true
-
-[[transformers]]
-name = "gofmt"
-enabled = true

+ 0 - 2
.github/CODEOWNERS

@@ -1,2 +0,0 @@
-# Default
-* @unknwon

+ 0 - 78
.github/CONTRIBUTING.md

@@ -1,78 +0,0 @@
-# Welcome to Gogs contributing guide
-
-Thank you for investing your time in contributing to our projects!
-
-Read our [Code of Conduct](https://go.dev/conduct) to keep our community approachable and respectable.
-
-In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.
-
-Use the table of contents icon <img src="https://github.com/github/docs/raw/50561895328b8f369694973252127b7d93899d83/assets/images/table-of-contents.png" width="25" height="25" /> on the top left corner of this document to get to a specific section of this guide quickly.
-
-## New contributor guide
-
-To get an overview of the project, read the [README](/README.md). Here are some resources to help you get started with open source contributions:
-
-- [Finding ways to contribute to open source on GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)
-- [Set up Git](https://docs.github.com/en/get-started/quickstart/set-up-git)
-- [GitHub flow](https://docs.github.com/en/get-started/quickstart/github-flow)
-- [Collaborating with pull requests](https://docs.github.com/en/github/collaborating-with-pull-requests)
-- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
-- [Talk, then code](https://www.craft.do/s/kyHVs6OoE4Dj5V)
-
-In addition to the general guides with open source contributions, you would also need to:
-
-- Have basic knowledge about web applications development, database management systems and programming in [Go](https://go.dev/).
-- Have a working local development setup with a reasonable good IDE or editor like [Visual Studio Code](https://code.visualstudio.com/docs/languages/go), [GoLand](https://www.jetbrains.com/go/) or [Vim](https://github.com/fatih/vim-go).
-- [Set up your development environment](/docs/dev/local_development.md).
-
-## Issues
-
-### Ask for help
-
-Before opening an issue, please make sure the problem you're encountering isn't already addressed on the [Troubleshooting](https://gogs.io/docs/intro/troubleshooting.html) and [FAQs](https://gogs.io/docs/intro/faqs.html) pages.
-
-### Create a new issue
-
-- For questions, ask in [Discussions](https://github.com/gogs/gogs/discussions).
-- [Check to make sure](https://docs.github.com/en/github/searching-for-information-on-github/searching-on-github/searching-issues-and-pull-requests#search-by-the-title-body-or-comments) someone hasn't already opened a similar [issue](https://github.com/gogs/gogs/issues).
-- If a similar issue doesn't exist, open a new issue using a relevant [issue form](https://github.com/gogs/gogs/issues/new/choose).
-- Blank issues that are not coming from maintainers will be closed without a response.
-
-### Pick up an issue to solve
-
-- Scan through our [existing issues](https://github.com/gogs/gogs/issues) to find one that interests you.
-- The [👋 good first issue](https://github.com/gogs/gogs/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%91%8B+good+first+issue%22) is a good place to start exploring issues that are well-groomed for newcomers.
-- Do not hesitate to ask for more details or clarifying questions on the issue!
-- Communicate on the issue you are intended to pick up _before_ starting working on it.
-- Every issue that gets picked up will have an expected timeline for the implementation, the issue may be reassigned after the expected timeline. Please be responsible and proactive on the communication 🙇‍♂️
-
-## Add new features or make big changes
-
-New features or big changes require proposals before we may be able to accept any contribution. Proposals should be posted to the [Discussions - Proposal](https://github.com/gogs/gogs/discussions/categories/proposal) category for review and discussions. GitHub Discussions provides sub-threading which is much more suitable than GitHub Issues for discussions to happen. Please read [Write a proposal for open source contributions](https://unknwon.io/posts/220210-write-a-proposal-for-open-source-contributions/) to begin with.
-
-## Pull requests
-
-When you're finished with the changes, create a pull request, or a series of pull requests if necessary.
-
-Contributing to another codebase is not as simple as code changes, it is also about contributing influence to the design. Therefore, we kindly ask you that:
-
-- Please acknowledge that no pull request is guaranteed to be merged.
-- Please always do a self-review before requesting reviews from others.
-- Please expect code review to be strict and may have multiple rounds.
-- Please make self-contained incremental changes, pull requests with huge diff may be rejected for review.
-- Please use English in code comments and docstring.
-- Please do not force push unless absolutely necessary. Force pushes make review much harder in multiple rounds, and we use [Squash and merge](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/about-pull-request-merges#squash-and-merge-your-pull-request-commits) so you don't need to worry about messy commits and just focus on the changes.
-
-### Things we do not accept
-
-1. Updates to locale files (`conf/locale_xx-XX.ini`) other than the `conf/locale_en-US.ini`. Please read the [guide for localizing Gogs](https://gogs.io/docs/features/i18n).
-1. Docker compose files.
-
-### Coding guidelines
-
-1. Please read the Sourcegraph's [Go style guide](https://docs.sourcegraph.com/dev/background-information/languages/go).
-1. **NO** direct modifications to `.css` files, `.css` files are all generated by `.less` files. You can regenerate `.css` files by executing `task less`.
-
-## Your PR is merged!
-
-Congratulations 🎉🎉 Thanks again for taking the effort to have this journey with us 🌟

+ 41 - 0
.github/ISSUE_TEMPLATE/1-bug.md

@@ -0,0 +1,41 @@
+---
+name: 遇到错误或反常情况
+about: 如果你遇到Bug(错误、不合理的情况)请通过此Issue反馈。
+---
+## Bug提交
+### 问题
+
+请简单概况问题。
+
+### 发生阶段
+
+* 运行(`go run`)
+* 构建(`go build`)
+* 构建后运行
+* 其他(请详细描述)
+
+(请在上述类型中选择或自行补充)
+
+### 你再做什么
+
+请详细说明你在做什么。
+
+### 项目运行的情况
+
+项目运行的情况是什么?
+
+例如:调用了某个API,数据库的写入或读取。
+
+### 发生了什么事情
+
+发生了什么错误?
+
+并且请把日志(若有)、命令行输出一并告诉我们。
+
+### 正确到结果应该是
+
+你希望正常的结果应该是什么?
+
+### 其他补充
+
+你的其他补充。

+ 15 - 0
.github/ISSUE_TEMPLATE/2-feature.md

@@ -0,0 +1,15 @@
+---
+name: 新功能请求
+about: 如果你有新功能请求,欢迎你告知我们。
+---
+## 新功能请求
+
+请简单概述你的功能请求。
+
+## 现状
+
+关于此功能的现状如何?
+
+* 我有想法,但我没办法自己实现
+* 我有想法,并且我计划自己实现并提交PR
+* 我已经提交PR

+ 7 - 0
.github/ISSUE_TEMPLATE/3-thank.md

@@ -0,0 +1,7 @@
+---
+name: 分享喜悦
+about: 如果我们的项目对你有帮助,或者你想分享一些喜悦(和项目有关的)欢迎使用此模板。
+---
+## 分享喜悦
+
+请简单叙述发生的事情,并为我们留言吧。

+ 0 - 82
.github/ISSUE_TEMPLATE/bug_report.yml

@@ -1,82 +0,0 @@
-name: Bug report
-description: File a bug report to help us improve
-labels: ["\U0001F48A bug"]
-body:
-  - type: markdown
-    attributes:
-      value: |
-        Thanks for taking the time to fill out this bug report!
-        
-        - Please use English :)
-        - For questions, ask in [Discussions](https://github.com/gogs/gogs/discussions).
-        - Before you file an issue read the [Contributing guide](https://github.com/gogs/gogs/blob/main/.github/CONTRIBUTING.md).
-        - Check to make sure someone hasn't already opened a similar [issue](https://github.com/gogs/gogs/issues).
-  - type: input
-    attributes:
-      label: Gogs version
-      description: |
-        Please specify the exact Gogs version you're reporting for, e.g. "0.12.3". You can find the version information in the admin dashboard (`/admin`).
-        
-        _Note that "gogs/gogs:latest" is not a Gogs version, it does not mean anything._
-    validations:
-      required: true
-  - type: textarea
-    attributes:
-      label: Git version
-      description: |
-        Please specify the exact Git version you're using of both server and client. You can find the version information by running `git version`.
-      value: |
-        - Server: 
-        - Client: 
-    validations:
-      required: true
-  - type: input
-    attributes:
-      label: Operating system
-      description: |
-        Please specify the exact operating system name and version you're reporting for, e.g. "Windows 10", "CentOS 7", "Ubuntu 20.04".
-    validations:
-      required: true
-  - type: input
-    attributes:
-      label: Database
-      description: |
-        Please specify the exact database and version you're reporting for, e.g. "PostgreSQL 9.6", "MySQL 5.7", "SQLite 3".
-    validations:
-      required: true
-  - type: textarea
-    attributes:
-      label: Describe the bug
-      description: A clear and concise description of what the bug is.
-    validations:
-      required: true
-  - type: textarea
-    attributes:
-      label: To reproduce
-      description: The steps to reproduce the problem described above.
-    validations:
-      required: true
-  - type: textarea
-    attributes:
-      label: Expected behavior
-      description: A clear and concise description of what you expected to happen.
-    validations:
-      required: true
-  - type: textarea
-    attributes:
-      label: Additional context
-      description: |
-        Links? References? Suggestions? Anything that will give us more context about the issue you are encountering!
-        
-        Please include any error logs found in the `log/gogs.log` file. Otherwise, we probably won't be able to help you much.
-
-        Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
-    validations:
-      required: false
-  - type: checkboxes
-    attributes:
-      label: Code of Conduct
-      description: By submitting this issue, you agree to follow our [Code of Conduct](https://go.dev/conduct)
-      options:
-        - label: I agree to follow this project's Code of Conduct
-          required: true

+ 1 - 0
.github/ISSUE_TEMPLATE/config.yaml

@@ -0,0 +1 @@
+blank_issues_enabled: true

+ 0 - 8
.github/ISSUE_TEMPLATE/config.yml

@@ -1,8 +0,0 @@
-blank_issues_enabled: true
-contact_links:
-  - name: Ask questions
-    url: https://github.com/gogs/gogs/discussions
-    about: Please ask questions in Discussions.
-  - name: Make a proposal
-    url: https://github.com/gogs/gogs/discussions/categories/proposal
-    about: Please make proposals in Discussions.

+ 0 - 52
.github/ISSUE_TEMPLATE/dev_release_minor_version.md

@@ -1,52 +0,0 @@
----
-name: "Dev: Release a minor version"
-about: ONLY USED BY MAINTAINERS.
-title: "Release [VERSION]"
-labels: 📸 release
----
-
-_This is generated from the [minor release template](https://github.com/gogs/gogs/blob/main/.github/ISSUE_TEMPLATE/dev_release_minor_version.md)._
-
-## Before release
-
-On the `main` branch:
-
-- [ ] Close stale issues with the label [status: needs feedback](https://github.com/gogs/gogs/issues?q=is%3Aissue+is%3Aopen+label%3A%22status%3A+needs+feedback%22).
-- [ ] [Sync locales from Crowdin](https://github.com/gogs/gogs/blob/main/docs/dev/import_locale.md).
-- [ ] [Update CHANGELOG](https://github.com/gogs/gogs/commit/540134d4436d8da82247dd2cabe9312ca2f5b1f1) to include entries for the current minor release.
-- [ ] Cut a new release branch `release/<MAJOR>.<MINOR>`, e.g. `release/0.12`.
-
-## During release
-
-On the release branch:
-
-- [ ] [Update the hard-coded version](https://github.com/gogs/gogs/commit/f17e7d5a2c36c52a1121d2315f3d75dcd8053b89) to the current release, e.g. `0.12.0+dev` -> `0.12.0`.
-- [ ] Wait for GitHub Actions to complete and no failed jobs.
-- [ ] Publish new RC releases (e.g. `v0.12.0-rc.1`, `v0.12.0-rc.2`) to ensure Docker workflow succeeds. **Make sure the tag is created on the release branch**.
-	- Pull down the Docker image and [run through application setup](https://github.com/gogs/gogs/blob/main/docker/README.md) to make sure nothing blows up.
-- [ ] Publish a new [GitHub release](https://github.com/gogs/gogs/releases) with entries from [CHANGELOG](https://github.com/gogs/gogs/blob/main/CHANGELOG.md) for the current minor release. **Make sure the tag is created on the release branch**.
-- [ ] [Wait for a new image tag for the current release](https://github.com/gogs/gogs/actions/workflows/docker.yml?query=event%3Arelease) to be created automatically on both [Docker Hub](https://hub.docker.com/r/gogs/gogs/tags) and [GitHub Container registry](https://github.com/gogs/gogs/pkgs/container/gogs).
-- [ ] [Push a new Docker image tag](https://github.com/gogs/gogs/blob/main/docs/dev/release/release_new_version.md#update-docker-image-tag) as `<MAJOR>.<MINOR>` to both [Docker Hub](https://hub.docker.com/r/gogs/gogs/tags) and [GitHub Container registry](https://github.com/gogs/gogs/pkgs/container/gogs), e.g.:
-- [ ] [Compile and pack binaries](https://github.com/gogs/gogs/blob/main/docs/dev/release/release_new_version.md#compile-and-pack-binaries) (all prefixed with `gogs_<MAJOR>.<MINOR>.<PATCH>_`, e.g. `gogs_0.12.0_`):
-	- [ ] macOS: `darwin_amd64.zip`, `darwin_arm64.zip`
-	- [ ] Linux: `linux_386.tar.gz`, `linux_386.zip`, `linux_amd64.tar.gz`, `linux_amd64.zip`
-	- [ ] ARM: `linux_armv7.tar.gz`, `linux_armv7.zip`, `linux_armv8.tar.gz`, `linux_armv8.zip`
-	- [ ] Windows: `windows_amd64.zip`, `windows_amd64_mws.zip`
-- [ ] [Generate SHA256 checksum](https://github.com/gogs/gogs/blob/main/docs/dev/release/sha256.sh) for all binaries to the file `checksum_sha256.txt`.
-- [ ] Upload all binaries and `checksum_sha256.txt` to:
-	- [ ] GitHub release
-	- [ ] https://dl.gogs.io
-- [ ] Update content of [Install from binary](https://gogs.io/docs/installation/install_from_binary).
-
-## After release
-
-On the `main` branch:
-
-- [ ] Publish [GitHub security advisories](https://github.com/gogs/gogs/security) for security patches included in the release.
-- [ ] Update the repository mirror on [Gitee](https://gitee.com/unknwon/gogs).
-- [ ] Create a new release announcement in [Discussions](https://github.com/gogs/gogs/discussions/categories/announcements).
-- [ ] Send a tweet on the [official Twitter account](https://twitter.com/GogsHQ) for the minor release.
-- [ ] Publish a new release article on [OSChina](http://my.oschina.net/Obahua/admin/releases).
-- [ ] Close the minor milestone.
-- [ ] [Bump the hard-coded version](https://github.com/gogs/gogs/commit/a98968436cd5841cf691bb0b80c54c81470d1676) to the new develop version, e.g. `0.12.0+dev` -> `0.13.0+dev`.
-- [ ] Run `task legacy` to identify deprecated code that is aimed to be removed in current develop version.

+ 0 - 59
.github/ISSUE_TEMPLATE/dev_release_patch_version.md

@@ -1,59 +0,0 @@
----
-name: "Dev: Release a patch version"
-about: ONLY USED BY MAINTAINERS.
-title: "Release [VERSION]"
-labels: 📸 release
----
-
-_This is generated from the [patch release template](https://github.com/gogs/gogs/blob/main/.github/ISSUE_TEMPLATE/dev_release_patch_version.md)._
-
-## Before release
-
-On the release branch:
-
-- [ ] Make sure all commits are cherry-picked from the `main` branch by checking the patch milestone.
-	- Run `task build` for every cherry-picked commit to make sure there is no compilation error.
-- [ ] [Update CHANGELOG on the `main` branch](https://github.com/gogs/gogs/commit/e6c5633f580399c8f4dfc07166a63a01c6c70346) to include entries for the current patch release.
-
-## During release
-
-On the release branch:
-
-- [ ] [Update the hard-coded version](https://github.com/gogs/gogs/commit/f0e3cd90f8d7695960eeef2e4e54b2e717302f6c) to the current release, e.g. `0.12.0` -> `0.12.1`.
-- [ ] Wait for GitHub Actions to complete and no failed jobs.
-- [ ] Publish new RC releases (e.g. `v0.12.0-rc.1`, `v0.12.0-rc.2`) to ensure Docker workflow succeeds.
-	- ⚠️ **Make sure the tag is created on the release branch**.
-	- Pull down the Docker image and [run through application setup](https://github.com/gogs/gogs/blob/main/docker/README.md) to make sure nothing blows up.
-- [ ] Publish a new [GitHub release](https://github.com/gogs/gogs/releases) with entries from [CHANGELOG](https://github.com/gogs/gogs/blob/main/CHANGELOG.md) for the current patch release and all previous releases with same minor version.
-	- ⚠️ **Make sure the tag is created on the release branch**.
-- [ ] Update all previous GitHub releases with same minor version with the warning:
-	```
-	**ℹ️ Heads up! There is a new patch release [0.12.1](https://github.com/gogs/gogs/releases/tag/v0.12.1) available, we recommend directly installing or upgrading to that version.**
-	```
-- [ ] [Wait for a new image tag for the current release](https://github.com/gogs/gogs/actions/workflows/docker.yml?query=event%3Arelease) to be created automatically on both [Docker Hub](https://hub.docker.com/r/gogs/gogs/tags) and [GitHub Container registry](https://github.com/gogs/gogs/pkgs/container/gogs).
-	- Pull down the Docker image and [run through application setup](https://github.com/gogs/gogs/blob/main/docker/README.md) to make sure nothing blows up.
-- [ ] [Update Docker image tag](https://github.com/gogs/gogs/blob/main/docs/dev/release/release_new_version.md#update-docker-image-tag) for the minor release `<MAJOR>.<MINOR>` on both [Docker Hub](https://hub.docker.com/r/gogs/gogs/tags) and [GitHub Container registry](https://github.com/gogs/gogs/pkgs/container/gogs).
-- [ ] [Compile and pack binaries](https://github.com/gogs/gogs/blob/main/docs/dev/release/release_new_version.md#compile-and-pack-binaries) (all prefixed with `gogs_<MAJOR>.<MINOR>.<PATCH>_`, e.g. `gogs_0.12.0_`):
-	- [ ] macOS: `darwin_arm64.zip`, `darwin_amd64.zip`
-	- [ ] Linux: `linux_amd64.tar.gz`, `linux_amd64.zip`
-	- [ ] ARM: `linux_armv8.tar.gz`, `linux_armv8.zip`
-	- [ ] Windows: `windows_amd64.zip`, `windows_amd64_mws.zip`
-- [ ] [Generate SHA256 checksum](https://github.com/gogs/gogs/blob/main/docs/dev/release/sha256.sh) for all binaries to the file `checksum_sha256.txt`.
-- [ ] Upload all binaries and `checksum_sha256.txt` to:
-	- [ ] GitHub release
-	- [ ] https://dl.gogs.io
-- [ ] Update content of [Install from binary](https://gogs.io/docs/installation/install_from_binary).
-
-## After release
-
-On the `main` branch:
-
-- [ ] Publish [GitHub security advisories](https://github.com/gogs/gogs/security) for security patches included in the release.
-- [ ] Post the following message on issues that are included in the patch milestone:
-    ```
-    The <MAJOR>.<MINOR>.<PATCH> has been released that includes the patch of the reported issue.
-    ```
-- [ ] Update the repository mirror on [Gitee](https://gitee.com/unknwon/gogs).
-- [ ] Create a new release announcement in [Discussions](https://github.com/gogs/gogs/discussions/categories/announcements).
-- [ ] Send a tweet on the [official Twitter account](https://twitter.com/GogsHQ) for the patch release.
-- [ ] Close the patch milestone.

+ 0 - 32
.github/ISSUE_TEMPLATE/documentation.yml

@@ -1,32 +0,0 @@
-name: Improve documentation
-description: Suggest an idea or a patch for documentation
-labels: ["📖 documentation"]
-body:
-  - type: markdown
-    attributes:
-      value: |
-        Thanks for taking the time to fill out this form!
-        
-        - Please use English :)
-        - For questions, ask in [Discussions](https://github.com/gogs/gogs/discussions).
-        - Before you file an issue read the [Contributing guide](https://github.com/gogs/gogs/blob/main/.github/CONTRIBUTING.md).
-        - Check to make sure someone hasn't already opened a similar [issue](https://github.com/gogs/gogs/issues).
-  - type: textarea
-    attributes:
-      label: What needs to be improved? Please describe
-      description: A clear and concise description of what is wrong or missing.
-    validations:
-      required: true
-  - type: textarea
-    attributes:
-      label: Why do you think it is important?
-      description: A clear and concise explanation of the rationale.
-    validations:
-      required: true
-  - type: checkboxes
-    attributes:
-      label: Code of Conduct
-      description: By submitting this issue, you agree to follow our [Code of Conduct](https://go.dev/conduct)
-      options:
-        - label: I agree to follow this project's Code of Conduct
-          required: true

+ 0 - 47
.github/ISSUE_TEMPLATE/feature_request.yml

@@ -1,47 +0,0 @@
-name: Feature request
-description: Suggest an idea for this project
-labels: ["\U0001F3AF feature"]
-body:
-  - type: markdown
-    attributes:
-      value: |
-        Thanks for taking the time to fill out this form!
-        
-        - Please use English :)
-        - For questions, ask in [Discussions](https://github.com/gogs/gogs/discussions).
-        - Before you file an issue read the [Contributing guide](https://github.com/gogs/gogs/blob/main/.github/CONTRIBUTING.md).
-        - Check to make sure someone hasn't already opened a similar [issue](https://github.com/gogs/gogs/issues).
-  - type: textarea
-    attributes:
-      label: Describe the feature
-      description: A clear and concise description of what the feature is, e.g. I think it is reasonable to have [...]
-    validations:
-      required: true
-  - type: textarea
-    attributes:
-      label: Describe the solution you'd like
-      description: A clear and concise description of what you want to happen.
-    validations:
-      required: true
-  - type: textarea
-    attributes:
-      label: Describe alternatives you've considered
-      description: A clear and concise description of any alternative solutions or features you've considered.
-    validations:
-      required: true
-  - type: textarea
-    attributes:
-      label: Additional context
-      description: |
-        Links? References? Suggestions? Anything that will give us more context about the feature you are requesting!
-
-        Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
-    validations:
-      required: false
-  - type: checkboxes
-    attributes:
-      label: Code of Conduct
-      description: By submitting this issue, you agree to follow our [Code of Conduct](https://go.dev/conduct)
-      options:
-        - label: I agree to follow this project's Code of Conduct
-          required: true

+ 0 - 11
.github/dependabot.yml

@@ -1,11 +0,0 @@
-# Docs: https://git.io/JCUAY
-version: 2
-updates:
-  - package-ecosystem: "gomod"
-    directory: "/"
-    schedule:
-      interval: "monthly"
-    reviewers:
-      - "gogs/core"
-    commit-message:
-      prefix: "mod:"

+ 14 - 0
.github/pull-request-template.md

@@ -0,0 +1,14 @@
+<!-- 请务必在创建PR前,在右侧 Labels 选项中加上label的其中一个: [feature]、[fix]、[documentation] 。以便于Actions自动生成Releases时自动对PR进行归类。-->
+
+**在提出此拉取请求时,我确认了以下几点(请复选框):**
+
+- [ ] 我已阅读并理解[LICENSE](LICENSE),并自愿成为本项目的贡献者。
+- [ ] 我已检查没有与此请求重复的拉取请求。
+- [ ] 我已经考虑过,并确认这份呈件对其他人很有价值。
+- [ ] 我接受此提交可能不会被使用,并根据维护人员的意愿关闭拉取请求。
+
+**填写PR内容:**
+
+-
+-
+-

+ 0 - 15
.github/pull_request_template.md

@@ -1,15 +0,0 @@
-## Describe the pull request
-
-A clear and concise description of what the pull request is about, i.e. what problem should be fixed? 
-
-Link to the issue: <!-- paste the issue link here, or put "n/a" if not applicable -->
-
-## Checklist
-
-- [ ] I agree to follow the [Code of Conduct](https://go.dev/conduct) by submitting this pull request.
-- [ ] I have read and acknowledge the [Contributing guide](https://github.com/gogs/gogs/blob/main/.github/CONTRIBUTING.md).
-- [ ] I have added test cases to cover the new code or have provided the test plan.
-
-## Test plan
-
-<!-- Please provide concrete but concise steps to proof things are working as stated, see an example in https://github.com/gogs/gogs/pull/7345 -->

+ 0 - 75
.github/workflows/codeql.yml

@@ -1,75 +0,0 @@
-# For most projects, this workflow file will not need changing; you simply need
-# to commit it to your repository.
-#
-# You may wish to alter this file to override the set of languages analyzed,
-# or to provide custom queries or build logic.
-#
-# ******** NOTE ********
-# We have attempted to detect the languages in your repository. Please check
-# the `language` matrix defined below to confirm you have the correct set of
-# supported CodeQL languages.
-#
-name: "CodeQL"
-
-on:
-  push:
-    branches: [ main ]
-  pull_request:
-    paths:
-      - '.github/workflows/codeql.yml'
-  schedule:
-    - cron: '0 19 * * 0'
-
-permissions:
-  contents: read
-  security-events: write
-
-jobs:
-  analyze:
-    name: Analyze
-    runs-on: ubuntu-latest
-
-    strategy:
-      fail-fast: false
-      matrix:
-        language: [ 'go' ]
-        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
-        # Learn more:
-        # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
-
-    steps:
-      - name: Checkout repository
-        uses: actions/checkout@v4
-        with:
-          # We must fetch at least the immediate parents so that if this is
-          # a pull request then we can checkout the head.
-          fetch-depth: 2
-
-      # Initializes the CodeQL tools for scanning.
-      - name: Initialize CodeQL
-        uses: github/codeql-action/init@v2
-        with:
-          languages: ${{ matrix.language }}
-          # If you wish to specify custom queries, you can do so here or in a config file.
-          # By default, queries listed here will override any specified in a config file.
-          # Prefix the list here with "+" to use these queries and those in the config file.
-          # queries: ./path/to/local/query, your-org/your-repo/queries@main
-
-      # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
-      # If this step fails, then you should remove it and run the build manually (see below)
-      - name: Autobuild
-        uses: github/codeql-action/autobuild@v2
-
-      # ℹ️ Command-line programs to run using the OS shell.
-      # 📚 https://git.io/JvXDl
-
-      # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
-      #    and modify them (or add more) to build your code if your project
-      #    uses a compiled language
-
-      #- run: |
-      #   make bootstrap
-      #   make release
-
-      - name: Perform CodeQL Analysis
-        uses: github/codeql-action/analyze@v2

+ 0 - 192
.github/workflows/docker.yml

@@ -1,192 +0,0 @@
-name: Docker
-on:
-  push:
-    branches:
-      - main
-  pull_request:
-    paths:
-      - 'Dockerfile'
-      - 'docker/**'
-      - '.github/workflows/docker.yml'
-  release:
-    types: [ published ]
-
-jobs:
-  buildx:
-    if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
-    concurrency:
-      group: ${{ github.workflow }}-${{ github.ref }}
-      cancel-in-progress: true
-    runs-on: ubuntu-latest
-    permissions:
-      actions: write
-      contents: read
-      packages: write
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Set up QEMU
-        uses: docker/setup-qemu-action@v3
-        with:
-          platforms: linux/amd64,linux/arm64,linux/arm/v7
-      - name: Set up Docker Buildx
-        id: buildx
-        uses: docker/setup-buildx-action@v3
-      - name: Inspect builder
-        run: |
-          echo "Name:      ${{ steps.buildx.outputs.name }}"
-          echo "Endpoint:  ${{ steps.buildx.outputs.endpoint }}"
-          echo "Status:    ${{ steps.buildx.outputs.status }}"
-          echo "Flags:     ${{ steps.buildx.outputs.flags }}"
-          echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
-      - name: Login to Docker Hub
-        uses: docker/login-action@v3
-        with:
-          username: ${{ secrets.DOCKERHUB_USERNAME }}
-          password: ${{ secrets.DOCKERHUB_TOKEN }}
-      - name: Login to GitHub Container registry
-        uses: docker/login-action@v3
-        with:
-          registry: ghcr.io
-          username: ${{ github.repository_owner }}
-          password: ${{ secrets.GITHUB_TOKEN }}
-      - name: Login to DigitalOcean Container registry
-        uses: docker/login-action@v3
-        with:
-          registry: registry.digitalocean.com
-          username: ${{ secrets.DIGITALOCEAN_USERNAME }}
-          password: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
-      - name: Build and push images
-        uses: docker/build-push-action@v5
-        with:
-          context: .
-          platforms: linux/amd64,linux/arm64,linux/arm/v7
-          push: true
-          tags: |
-            gogs/gogs:latest
-            ghcr.io/gogs/gogs:latest
-            registry.digitalocean.com/gogs/gogs:latest
-      - name: Scan for container vulnerabilities
-        uses: aquasecurity/trivy-action@master
-        with:
-          image-ref: gogs/gogs:latest
-          exit-code: '1'
-      - name: Send email on failure
-        uses: dawidd6/action-send-mail@v3
-        if: ${{ failure() }}
-        with:
-          server_address: smtp.mailgun.org
-          server_port: 465
-          username: ${{ secrets.SMTP_USERNAME }}
-          password: ${{ secrets.SMTP_PASSWORD }}
-          subject: GitHub Actions (${{ github.repository }}) job result
-          to: github-actions-8ce6454@unknwon.io
-          from: GitHub Actions (${{ github.repository }})
-          reply_to: noreply@unknwon.io
-          body: |
-            The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}".
-
-            View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
-
-  buildx-pull-request:
-    if: ${{ github.event_name == 'pull_request'}}
-    runs-on: ubuntu-latest
-    permissions:
-      contents: read
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Set up Docker Buildx
-        id: buildx
-        uses: docker/setup-buildx-action@v2
-        with:
-          config-inline: |
-            [worker.oci]
-              max-parallelism = 2
-      - name: Inspect builder
-        run: |
-          echo "Name:      ${{ steps.buildx.outputs.name }}"
-          echo "Endpoint:  ${{ steps.buildx.outputs.endpoint }}"
-          echo "Status:    ${{ steps.buildx.outputs.status }}"
-          echo "Flags:     ${{ steps.buildx.outputs.flags }}"
-          echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
-      - name: Compute short commit SHA
-        id: short-sha
-        uses: benjlevesque/short-sha@v2.1
-      - name: Build and push images
-        uses: docker/build-push-action@v5
-        with:
-          context: .
-          platforms: linux/amd64
-          push: true
-          tags: |
-            ttl.sh/gogs/gogs-${{ steps.short-sha.outputs.sha }}:1d
-      - name: Scan for container vulnerabilities
-        uses: aquasecurity/trivy-action@master
-        with:
-          image-ref: ttl.sh/gogs/gogs-${{ steps.short-sha.outputs.sha }}:1d
-          exit-code: '1'
-
-  # Updates to the following section needs to be synced to all release branches within their lifecycles.
-  buildx-release:
-    if: ${{ github.event_name == 'release' }}
-    runs-on: ubuntu-latest
-    permissions:
-      actions: write
-      contents: read
-      packages: write
-    steps:
-      - name: Compute image tag name
-        run: echo "IMAGE_TAG=$(echo $GITHUB_REF_NAME | cut -c 2-)" >> $GITHUB_ENV
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Set up QEMU
-        uses: docker/setup-qemu-action@v3
-        with:
-          platforms: linux/amd64,linux/arm64,linux/arm/v7
-      - name: Set up Docker Buildx
-        id: buildx
-        uses: docker/setup-buildx-action@v3
-      - name: Inspect builder
-        run: |
-          echo "Name:      ${{ steps.buildx.outputs.name }}"
-          echo "Endpoint:  ${{ steps.buildx.outputs.endpoint }}"
-          echo "Status:    ${{ steps.buildx.outputs.status }}"
-          echo "Flags:     ${{ steps.buildx.outputs.flags }}"
-          echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
-      - name: Login to Docker Hub
-        uses: docker/login-action@v3
-        with:
-          username: ${{ secrets.DOCKERHUB_USERNAME }}
-          password: ${{ secrets.DOCKERHUB_TOKEN }}
-      - name: Login to GitHub Container registry
-        uses: docker/login-action@v3
-        with:
-          registry: ghcr.io
-          username: ${{ github.repository_owner }}
-          password: ${{ secrets.GITHUB_TOKEN }}
-      - name: Build and push images
-        uses: docker/build-push-action@v5
-        with:
-          context: .
-          platforms: linux/amd64,linux/arm64,linux/arm/v7
-          push: true
-          tags: |
-            gogs/gogs:${{ env.IMAGE_TAG }}
-            ghcr.io/gogs/gogs:${{ env.IMAGE_TAG }}
-      - name: Send email on failure
-        uses: dawidd6/action-send-mail@v3
-        if: ${{ failure() }}
-        with:
-          server_address: smtp.mailgun.org
-          server_port: 465
-          username: ${{ secrets.SMTP_USERNAME }}
-          password: ${{ secrets.SMTP_PASSWORD }}
-          subject: GitHub Actions (${{ github.repository }}) job result
-          to: github-actions-8ce6454@unknwon.io
-          from: GitHub Actions (${{ github.repository }})
-          reply_to: noreply@unknwon.io
-          body: |
-            The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}".
-
-            View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}

+ 0 - 216
.github/workflows/go.yml

@@ -1,216 +0,0 @@
-name: Go
-on:
-  push:
-    branches:
-      - main
-      - 'release/**'
-    paths:
-      - '**.go'
-      - 'go.mod'
-      - '.golangci.yml'
-      - '.github/workflows/go.yml'
-  pull_request:
-    paths:
-      - '**.go'
-      - 'go.mod'
-      - '.golangci.yml'
-      - '.github/workflows/go.yml'
-env:
-  GOPROXY: "https://proxy.golang.org"
-
-permissions:
-  contents: read
-
-jobs:
-  lint:
-    permissions:
-      contents: read       # for actions/checkout to fetch code
-      pull-requests: read  # for golangci/golangci-lint-action to fetch pull requests
-    name: Lint
-    runs-on: ubuntu-latest
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Install Go
-        uses: actions/setup-go@v5
-        with:
-          go-version: 1.23.x
-      - name: Install Task
-        uses: arduino/setup-task@v2
-        with:
-          repo-token: ${{ secrets.GITHUB_TOKEN }}
-      - name: Check Go module tidiness and generated files
-        shell: bash
-        run: |
-          go mod tidy
-          task generate
-          STATUS=$(git status --porcelain)
-          if [ ! -z "$STATUS" ]; then
-            echo "Unstaged files:"
-            echo $STATUS
-            echo "Run 'go mod tidy' or 'task generate' commit them"
-            exit 1
-          fi
-      - name: Run golangci-lint
-        uses: golangci/golangci-lint-action@v4
-        with:
-          version: latest
-          args: --timeout=30m
-
-  test:
-    name: Test
-    strategy:
-      matrix:
-        go-version: [ 1.23.x ]
-        platform: [ ubuntu-latest, macos-latest ]
-    runs-on: ${{ matrix.platform }}
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Install Go
-        uses: actions/setup-go@v5
-        with:
-          go-version: ${{ matrix.go-version }}
-      - name: Run tests with coverage
-        run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./...
-      - name: Upload coverage report to Codecov
-        uses: codecov/codecov-action@v4
-        with:
-          file: ./coverage
-          flags: unittests
-      - name: Send email on failure
-        uses: dawidd6/action-send-mail@v3
-        if: ${{ failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
-        with:
-          server_address: smtp.mailgun.org
-          server_port: 465
-          username: ${{ secrets.SMTP_USERNAME }}
-          password: ${{ secrets.SMTP_PASSWORD }}
-          subject: GitHub Actions (${{ github.repository }}) job result
-          to: github-actions-8ce6454@unknwon.io
-          from: GitHub Actions (${{ github.repository }})
-          reply_to: noreply@unknwon.io
-          body: |
-            The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}".
-
-            View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
-
-  # Running tests with race detection consumes too much memory on Windows,
-  # see https://github.com/golang/go/issues/46099 for details.
-  test-windows:
-    name: Test Windows
-    strategy:
-      matrix:
-        go-version: [ 1.23.x ]
-        platform: [ windows-latest ]
-    runs-on: ${{ matrix.platform }}
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Install Go
-        uses: actions/setup-go@v5
-        with:
-          go-version: ${{ matrix.go-version }}
-      - name: Run tests with coverage
-        run: go test -shuffle=on -v -coverprofile=coverage -covermode=atomic ./...
-      - name: Upload coverage report to Codecov
-        uses: codecov/codecov-action@v4
-        with:
-          file: ./coverage
-          flags: unittests
-      - name: Send email on failure
-        uses: dawidd6/action-send-mail@v3
-        if: ${{ failure() && github.event_name == 'push' && github.ref == 'refs/heads/main' }}
-        with:
-          server_address: smtp.mailgun.org
-          server_port: 465
-          username: ${{ secrets.SMTP_USERNAME }}
-          password: ${{ secrets.SMTP_PASSWORD }}
-          subject: GitHub Actions (${{ github.repository }}) job result
-          to: github-actions-8ce6454@unknwon.io
-          from: GitHub Actions (${{ github.repository }})
-          reply_to: noreply@unknwon.io
-          body: |
-            The job "${{ github.job }}" of ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} completed with "${{ job.status }}".
-
-            View the job run at: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
-
-  postgres:
-    name: Postgres
-    strategy:
-      matrix:
-        go-version: [ 1.23.x ]
-        platform: [ ubuntu-latest ]
-    runs-on: ${{ matrix.platform }}
-    services:
-      postgres:
-        image: postgres:9.6
-        env:
-          POSTGRES_PASSWORD: postgres
-        options: >-
-          --health-cmd pg_isready
-          --health-interval 10s
-          --health-timeout 5s
-          --health-retries 5
-        ports:
-          - 5432:5432
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Install Go
-        uses: actions/setup-go@v5
-        with:
-          go-version: ${{ matrix.go-version }}
-      - name: Run tests with coverage
-        run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./internal/database/...
-        env:
-          GOGS_DATABASE_TYPE: postgres
-          PGPORT: 5432
-          PGHOST: localhost
-          PGUSER: postgres
-          PGPASSWORD: postgres
-          PGSSLMODE: disable
-
-  mysql:
-    name: MySQL
-    strategy:
-      matrix:
-        go-version: [ 1.23.x ]
-        platform: [ ubuntu-20.04 ]
-    runs-on: ${{ matrix.platform }}
-    steps:
-      - name: Start MySQL server
-        run: sudo systemctl start mysql
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Install Go
-        uses: actions/setup-go@v5
-        with:
-          go-version: ${{ matrix.go-version }}
-      - name: Run tests with coverage
-        run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./internal/database/...
-        env:
-          GOGS_DATABASE_TYPE: mysql
-          MYSQL_USER: root
-          MYSQL_PASSWORD: root
-          MYSQL_HOST: localhost
-          MYSQL_PORT: 3306
-
-  sqlite-go:
-    name: SQLite - Go
-    strategy:
-      matrix:
-        go-version: [ 1.23.x ]
-        platform: [ ubuntu-latest ]
-    runs-on: ${{ matrix.platform }}
-    steps:
-      - name: Checkout code
-        uses: actions/checkout@v4
-      - name: Install Go
-        uses: actions/setup-go@v5
-        with:
-          go-version: ${{ matrix.go-version }}
-      - name: Run tests with coverage
-        run: go test -shuffle=on -v -race -parallel=1 -coverprofile=coverage -covermode=atomic ./internal/database/...
-        env:
-          GOGS_DATABASE_TYPE: sqlite

+ 0 - 25
.github/workflows/lock.yml

@@ -1,25 +0,0 @@
-name: 'Lock Threads'
-
-on:
-  schedule:
-    - cron: '0 0 * * *'
-  workflow_dispatch:
-
-permissions:
-  issues: write
-  pull-requests: write
-
-concurrency:
-  group: lock
-
-jobs:
-  action:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: dessant/lock-threads@v5
-        with:
-          github-token: ${{ github.token }}
-          issue-inactive-days: '90'
-          issue-lock-reason: 'resolved'
-          pr-inactive-days: '365'
-          pr-lock-reason: 'resolved'

+ 0 - 17
.github/workflows/shell.yml

@@ -1,17 +0,0 @@
-name: Shell
-on:
-  push:
-    branches: [ main ]
-  pull_request:
-
-permissions:
-  contents: read
-
-jobs:
-  shellcheck:
-    name: Shellcheck
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v4
-      - name: Run ShellCheck
-        uses: ludeeus/action-shellcheck@master

+ 0 - 1
.packager/.godir

@@ -1 +0,0 @@
-main

+ 0 - 1
.packager/Procfile

@@ -1 +0,0 @@
-web: ./gogs web -p ${PORT:=3000}

+ 0 - 24
.packager/hooks/postinst

@@ -1,24 +0,0 @@
-#!/bin/sh
-
-set -e
-
-APP_NAME="gogs"
-CLI="${APP_NAME}"
-APP_USER=$(${CLI} config:get APP_USER)
-APP_GROUP=$(${CLI} config:get APP_GROUP)
-APP_CONFIG="/etc/${APP_NAME}/conf/app.ini"
-
-mkdir -p "$(dirname ${APP_CONFIG})"
-chown "${APP_USER}"."${APP_GROUP}" "$(dirname ${APP_CONFIG})"
-[ -f ${APP_CONFIG} ] || ${CLI} run cp conf/app.ini ${APP_CONFIG}
-${CLI} config:set USER="${APP_USER}"
-sed -i "s|RUN_USER = git|RUN_USER = ${APP_USER}|" ${APP_CONFIG}
-sed -i "s|RUN_MODE = dev|RUN_MODE = prod|" ${APP_CONFIG}
-
-${CLI} config:set GOGS_CUSTOM=/etc/${APP_NAME}
-
-# scale
-${CLI} scale web=1 || true
-
-# restart the service
-service gogs restart || true

+ 0 - 31
.pkgr.yml

@@ -1,31 +0,0 @@
-targets:
-  debian-10: &debian
-    build_dependencies:
-      - libpam0g-dev
-    dependencies:
-      - libpam0g
-      - git
-  debian-11:
-    <<: *debian
-  debian-12:
-    <<: *debian
-  ubuntu-18.04:
-    <<: *debian
-  ubuntu-20.04:
-    <<: *debian
-  ubuntu-22.04:
-    <<: *debian
-  centos-9:
-    build_dependencies:
-      - pam-devel
-      # required for Go buildpack
-      - perl-Digest-SHA
-    dependencies:
-      - pam
-      - git
-before:
-  - mv .packager/Procfile .
-after:
-  - mv bin/gogs gogs
-after_install: ./.packager/hooks/postinst
-buildpack: https://github.com/heroku/heroku-buildpack-go.git#main

+ 0 - 257
CHANGELOG.md

@@ -1,257 +0,0 @@
-# Changelog
-
-All notable changes to Gogs are documented in this file.
-
-## 0.14.0+dev (`main`)
-
-### Added
-
-- Support using TLS for Redis session provider using `[session] PROVIDER_CONFIG = ...,tls=true`. [#7860](https://github.com/gogs/gogs/pull/7860)
-
-### Changed
-
-- The required Go version to compile source code changed to 1.23.4.
-- The build tag `cert` has been removed, and the `gogs cert` subcommand is now always available. [#7883](https://github.com/gogs/gogs/pull/7883)
-
-### Fixed
-
-- Submodules using `ssh://` protocol and a port number are not rendered correctly. [#4941](https://github.com/gogs/gogs/issues/4941)
-- Missing link to user profile on the first commit in commits history page. [#7404](https://github.com/gogs/gogs/issues/7404)
-
-## 0.13.2
-
-### Fixed
-
-- _Security:_ Path Traversal in file editing UI. [GHSA-r7j8-5h9c-f6fx](https://github.com/gogs/gogs/security/advisories/GHSA-r7j8-5h9c-f6fx)
-- _Security:_ Path Traversal in file update API. [GHSA-qf5v-rp47-55gg](https://github.com/gogs/gogs/security/advisories/GHSA-qf5v-rp47-55gg)
-- _Security:_ Argument Injection in the built-in SSH server. [GHSA-vm62-9jw3-c8w3](https://github.com/gogs/gogs/security/advisories/GHSA-vm62-9jw3-c8w3)
-- _Security:_ Deletion of internal files. [GHSA-ccqv-43vm-4f3w](https://github.com/gogs/gogs/security/advisories/GHSA-ccqv-43vm-4f3w)
-- _Security:_ Argument Injection during changes preview. [GHSA-9pp6-wq8c-3w2c](https://github.com/gogs/gogs/security/advisories/GHSA-9pp6-wq8c-3w2c)
-- _Security:_ Argument Injection when tagging new releases. [GHSA-m27m-h5gj-wwmg](https://github.com/gogs/gogs/security/advisories/GHSA-m27m-h5gj-wwmg)
-- Use the non-deprecated section name `[email]` during installation for email settings. [#7704](https://github.com/gogs/gogs/pull/7704)
-- Use the non-deprecated section name `[email] PASSWORD` during installation for email password. [#7807](https://github.com/gogs/gogs/pull/7807)
-- Make purple template label color to actually use the hexcode of purple. [#7722](https://github.com/gogs/gogs/pull/7722)
-
-## 0.13.0
-
-### Added
-
-- Support using personal access token in the password field. [#3866](https://github.com/gogs/gogs/issues/3866)
-- An unlisted option is added when create or migrate a repository. Unlisted repositories are public but not being listed for users without direct access in the UI. [#5733](https://github.com/gogs/gogs/issues/5733)
-- New API endpoint `PUT /repos/:owner/:repo/contents/:path` for creating and update repository contents. [#5967](https://github.com/gogs/gogs/issues/5967)
-- New configuration option `[git.timeout] DIFF` for customizing operation timeout of `git diff`. [#6315](https://github.com/gogs/gogs/issues/6315)
-- New configuration option `[server] SSH_SERVER_MACS` for setting list of accepted MACs for connections to builtin SSH server. [#6434](https://github.com/gogs/gogs/issues/6434)
-- New configuration option `[repository] DEFAULT_BRANCH` for setting default branch name for new repositories. [#7291](https://github.com/gogs/gogs/issues/7291)
-- New configuration option `[server] SSH_SERVER_ALGORITHMS` for specifying the list of accepted key exchange algorithms for connections to builtin SSH server. [#7345](https://github.com/gogs/gogs/pull/7345)
-- Support specifying custom schema for PostgreSQL. [#6695](https://github.com/gogs/gogs/pull/6695)
-- Support rendering Mermaid diagrams in Markdown. [#6776](https://github.com/gogs/gogs/pull/6776)
-- Docker: Allow passing extra arguments to the `backup` command. [#7060](https://github.com/gogs/gogs/pull/7060)
-- New languages support: Mongolian, Romanian. [#6510](https://github.com/gogs/gogs/pull/6510) [#7082](https://github.com/gogs/gogs/pull/7082)
-
-### Changed
-
-- The default branch has been changed to `main`. [#6285](https://github.com/gogs/gogs/pull/6285)
-- MSSQL as database backend is deprecated, installation page no longer shows it as an option. Existing installations and manually craft configuration file continue to work. [#6295](https://github.com/gogs/gogs/pull/6295)
-- Use [Task](https://github.com/go-task/task) as the build tool. [#6297](https://github.com/gogs/gogs/pull/6297)
-- The required Go version to compile source code changed to 1.18.
-- Access tokens are now stored using their SHA256 hashes instead of raw values. [#7008](https://github.com/gogs/gogs/pull/7008)
-
-### Fixed
-
-- Unable to use LDAP authentication on ARM machines. [#6761](https://github.com/gogs/gogs/issues/6761)
-- Unable to choose "Lookup Avatar by mail" in user settings without deleting custom avatar. [#7267](https://github.com/gogs/gogs/pull/7267)
-- Mistakenly include the "data" directory under the custom directory in the Docker setup. [#7343](https://github.com/gogs/gogs/pull/7343)
-- Unable to start after data recovery with an outdated migration version. [#7125](https://github.com/gogs/gogs/issues/7125)
-
-### Removed
-
-- ⚠️ Migrations before 0.12 are removed, installations not on 0.12 should upgrade to it to run the migrations and then upgrade to 0.13.
-- Configuration section `[mailer]` is no longer used, please use `[email]`.
-- Configuration section `[service]` is no longer used, please use `[auth]`.
-- Configuration option `APP_NAME` is no longer used, please use `BRAND_NAME`.
-- Configuration option `[security] REVERSE_PROXY_AUTHENTICATION_USER` is no longer used, please use `[auth] REVERSE_PROXY_AUTHENTICATION_HEADER`.
-- Configuration option `[auth] ACTIVE_CODE_LIVE_MINUTES` is no longer used, please use `[auth] ACTIVATE_CODE_LIVES`.
-- Configuration option `[auth] RESET_PASSWD_CODE_LIVE_MINUTES` is no longer used, please use `[auth] RESET_PASSWORD_CODE_LIVES`.
-- Configuration option `[auth] ENABLE_CAPTCHA` is no longer used, please use `[auth] ENABLE_REGISTRATION_CAPTCHA`.
-- Configuration option `[auth] ENABLE_NOTIFY_MAIL` is no longer used, please use `[user] ENABLE_EMAIL_NOTIFICATION`.
-- Configuration option `[auth] REGISTER_EMAIL_CONFIRM` is no longer used, please use `[auth] REQUIRE_EMAIL_CONFIRMATION`.
-- Configuration option `[session] GC_INTERVAL_TIME` is no longer used, please use `[session] GC_INTERVAL`.
-- Configuration option `[session] SESSION_LIFE_TIME` is no longer used, please use `[session] MAX_LIFE_TIME`.
-- Configuration option `[server] ROOT_URL` is no longer used, please use `[server] EXTERNAL_URL`.
-- Configuration option `[server] LANDING_PAGE` is no longer used, please use `[server] LANDING_URL`.
-- Configuration option `[database] DB_TYPE` is no longer used, please use `[database] TYPE`.
-- Configuration option `[database] PASSWD` is no longer used, please use `[database] PASSWORD`.
-- Remove option to use Makefile as the build tool. [#6980](https://github.com/gogs/gogs/pull/6980)
-
-## 0.12.11
-
-### Fixed
-
-- _Security:_ Stored XSS for issue assignees. [#7145](https://github.com/gogs/gogs/issues/7145)
-- _Security:_ OS Command Injection in repo editor on case-insensitive file systems. [#7030](https://github.com/gogs/gogs/issues/7030)
-- Unable to render repository pages with implicit submodules (e.g. `get submodule "REDACTED": revision does not exist`). [#6436](https://github.com/gogs/gogs/issues/6436)
-
-## 0.12.10
-
-### Changed
-
-- Support using `[security] LOCAL_NETWORK_ALLOWLIST = *` to allow all hostnames. [#7111](https://github.com/gogs/gogs/pull/7111)
-
-### Fixed
-
-- Unable to send webhooks to local network addresses after configured `[security] LOCAL_NETWORK_ALLOWLIST`. [#7074](https://github.com/gogs/gogs/issues/7074)
-
-## 0.12.9
-
-### Fixed
-
-- _Security:_ OS Command Injection in file editor. [#7000](https://github.com/gogs/gogs/issues/7000)
-- _Security:_ Sanitize `DisplayName` in repository issue list. [#7009](https://github.com/gogs/gogs/pull/7009)
-- _Security:_ Path Traversal in file editor on Windows. [#7001](https://github.com/gogs/gogs/issues/7001)
-- _Security:_ Path Traversal in Git HTTP endpoints. [#7002](https://github.com/gogs/gogs/issues/7002)
-- Unable to init repository during creation on Windows. [#6967](https://github.com/gogs/gogs/issues/6967)
-- Mysterious panic on `Value not found for type *repo.HTTPContext`. [#6963](https://github.com/gogs/gogs/issues/6963)
-
-## 0.12.8
-
-### Changed
-
-- All users (including admins) need to use the configuration option `[security] LOCAL_NETWORK_ALLOWLIST` to allow repository migration and webhooks to be able to access local network addresses, which is a comma separated list of hostnames. [#6988](https://github.com/gogs/gogs/pull/6988)
-
-### Fixed
-
-- _Security:_ SSRF in webhook. [#6901](https://github.com/gogs/gogs/issues/6901)
-- _Security:_ XSS in cookies. [#6953](https://github.com/gogs/gogs/issues/6953)
-- _Security:_ OS Command Injection in file uploading. [#6968](https://github.com/gogs/gogs/issues/6968)
-- _Security:_ Remote Command Execution in file editing. [#6555](https://github.com/gogs/gogs/issues/6555)
-
-## 0.12.7
-
-### Fixed
-
-- _Security:_ Stored XSS in issues. [#6919](https://github.com/gogs/gogs/issues/6919)
-- Invalid character in `Access-Control-Allow-Credentials` response header. [#4983](https://github.com/gogs/gogs/issues/4983)
-- Mysterious `ssh: overflow reading version string` errors from builtin SSH server. [#6882](https://github.com/gogs/gogs/issues/6882)
-
-## 0.12.6
-
-### Fixed
-
-- _Security:_ Remote command execution in file uploading. [#6833](https://github.com/gogs/gogs/issues/6833)
-- _Regression:_ Unable to migrate repository from other local Git hosting. Added a new configuration option `[security] LOCAL_NETWORK_ALLOWLIST`, which is a comma separated list of hostnames that are explicitly allowed to be accessed within the local network. [#6841](https://github.com/gogs/gogs/issues/6841)
-- Slow start of Docker containers using NAS devices. [#6554](https://github.com/gogs/gogs/issues/6554)
-
-## 0.12.5
-
-### Fixed
-
-- _Security:_ Potential SSRF in repository migration. [#6754](https://github.com/gogs/gogs/issues/6754)
-- _Security:_ Improper PAM authorization handling. [#6810](https://github.com/gogs/gogs/issues/6810)
-
-## 0.12.4
-
-### Fixed
-
-- _Security:_ Potential SSRF attack by CRLF injection via repository migration. [#6413](https://github.com/gogs/gogs/issues/6413)
-- _Regression:_ Fixed smart links for issues stops rendering. [#6506](https://github.com/gogs/gogs/issues/6506)
-- Added `X-Frame-Options` header to prevent Clickjacking. [#6409](https://github.com/gogs/gogs/issues/6409)
-
-## 0.12.3
-
-### Fixed
-
-- _Regression:_ When running Gogs on Windows, push commits no longer fail on a daily basis with the error "pre-receive hook declined". [#6316](https://github.com/gogs/gogs/issues/6316)
-- Auto-linked commit SHAs now have correct links. [#6300](https://github.com/gogs/gogs/issues/6300)
-- Git LFS client (with version >= 2.5.0) wasn't able to upload files with known format (e.g. PNG, JPEG), and the server is expecting the HTTP Header `Content-Type` to be `application/octet-stream`. The server now tells the LFS client to always use `Content-Type: application/octet-stream` when upload files.
-
-## 0.12.2
-
-### Fixed
-
-- _Regression:_ Pages are correctly rendered when requesting `?go-get=1` for subdirectories. [#6314](https://github.com/gogs/gogs/issues/6314)
-- _Regression:_ Submodule with a relative path is linked correctly. [#6319](https://github.com/gogs/gogs/issues/6319)
-- Backup can be processed when `--target` is specified on Windows. [#6339](https://github.com/gogs/gogs/issues/6339)
-- Commit message contains keywords look like an issue reference no longer fails the push entirely. [#6289](https://github.com/gogs/gogs/issues/6289)
-
-## 0.12.1
-
-### Fixed
-
-- The `updated_at` field is now correctly updated when updates an issue. [#6209](https://github.com/gogs/gogs/issues/6209)
-- Fixed a regression which created `login_source.cfg` column to have `VARCHAR(255)` instead of `TEXT` in MySQL. [#6280](https://github.com/gogs/gogs/issues/6280)
-
-## 0.12.0
-
-### Added
-
-- Support for Git LFS, you can read documentation for both [user](https://github.com/gogs/gogs/blob/main/docs/user/lfs.md) and [admin](https://github.com/gogs/gogs/blob/main/docs/admin/lfs.md). [#1322](https://github.com/gogs/gogs/issues/1322)
-- Allow admin to remove observers from the repository. [#5803](https://github.com/gogs/gogs/pull/5803)
-- Use `Last-Modified` HTTP header for raw files. [#5811](https://github.com/gogs/gogs/issues/5811)
-- Support syntax highlighting for SAS code files (i.e. `.r`, `.sas`, `.tex`, `.yaml`). [#5856](https://github.com/gogs/gogs/pull/5856)
-- Able to fill in pull request title with a template. [#5901](https://github.com/gogs/gogs/pull/5901)
-- Able to override static files under `public/` directory, please refer to [documentation](https://gogs.io/docs/features/custom_template) for usage. [#5920](https://github.com/gogs/gogs/pull/5920)
-- New API endpoint `GET /admin/teams/:teamid/members` to list members of a team. [#5877](https://github.com/gogs/gogs/issues/5877)
-- Support backup with retention policy for Docker deployments. [#6140](https://github.com/gogs/gogs/pull/6140)
-
-### Changed
-
-- The organization profile page has changed to display at most 12 members. [#5506](https://github.com/gogs/gogs/issues/5506)
-- The required Go version to compile source code changed to 1.14.
-- All assets are now embedded into binary and served from memory by default. Set `[server] LOAD_ASSETS_FROM_DISK = true` to load them from disk. [#5920](https://github.com/gogs/gogs/pull/5920)
-- Application and Go versions are removed from page footer and only show in the admin dashboard.
-- Build tag for running as Windows Service has been changed from `miniwinsvc` to `minwinsvc`.
-- Configuration option `APP_NAME` is deprecated and will end support in 0.13.0, please start using `BRAND_NAME`.
-- Configuration option `[server] ROOT_URL` is deprecated and will end support in 0.13.0, please start using `[server] EXTERNAL_URL`.
-- Configuration option `[server] LANDING_PAGE` is deprecated and will end support in 0.13.0, please start using `[server] LANDING_URL`.
-- Configuration option `[database] DB_TYPE` is deprecated and will end support in 0.13.0, please start using `[database] TYPE`.
-- Configuration option `[database] PASSWD` is deprecated and will end support in 0.13.0, please start using `[database] PASSWORD`.
-- Configuration option `[security] REVERSE_PROXY_AUTHENTICATION_USER` is deprecated and will end support in 0.13.0, please start using `[auth] REVERSE_PROXY_AUTHENTICATION_HEADER`.
-- Configuration section `[mailer]` is deprecated and will end support in 0.13.0, please start using `[email]`.
-- Configuration section `[service]` is deprecated and will end support in 0.13.0, please start using `[auth]`.
-- Configuration option `[auth] ACTIVE_CODE_LIVE_MINUTES` is deprecated and will end support in 0.13.0, please start using `[auth] ACTIVATE_CODE_LIVES`.
-- Configuration option `[auth] RESET_PASSWD_CODE_LIVE_MINUTES` is deprecated and will end support in 0.13.0, please start using `[auth] RESET_PASSWORD_CODE_LIVES`.
-- Configuration option `[auth] REGISTER_EMAIL_CONFIRM` is deprecated and will end support in 0.13.0, please start using `[auth] REQUIRE_EMAIL_CONFIRMATION`.
-- Configuration option `[auth] ENABLE_CAPTCHA` is deprecated and will end support in 0.13.0, please start using `[auth] ENABLE_REGISTRATION_CAPTCHA`.
-- Configuration option `[auth] ENABLE_NOTIFY_MAIL` is deprecated and will end support in 0.13.0, please start using `[user] ENABLE_EMAIL_NOTIFICATION`.
-- Configuration option `[session] GC_INTERVAL_TIME` is deprecated and will end support in 0.13.0, please start using `[session] GC_INTERVAL`.
-- Configuration option `[session] SESSION_LIFE_TIME` is deprecated and will end support in 0.13.0, please start using `[session] MAX_LIFE_TIME`.
-- The name `-` is reserved and cannot be used for users or organizations.
-
-### Fixed
-
-- [Security] Potential open redirection with i18n.
-- [Security] Potential ability to delete files outside a repository.
-- [Security] Potential ability to set primary email on others' behalf from their verified emails.
-- [Security] Potential XSS attack via `.ipynb`. [#5170](https://github.com/gogs/gogs/issues/5170)
-- [Security] Potential SSRF attack via webhooks. [#5366](https://github.com/gogs/gogs/issues/5366)
-- [Security] Potential CSRF attack in admin panel. [#5367](https://github.com/gogs/gogs/issues/5367)
-- [Security] Potential stored XSS attack in some browsers. [#5397](https://github.com/gogs/gogs/issues/5397)
-- [Security] Potential RCE on mirror repositories. [#5767](https://github.com/gogs/gogs/issues/5767)
-- [Security] Potential XSS attack with raw markdown API. [#5907](https://github.com/gogs/gogs/pull/5907)
-- File both modified and renamed within a commit treated as separate files. [#5056](https://github.com/gogs/gogs/issues/5056)
-- Unable to restore the database backup to MySQL 8.0 with syntax error. [#5602](https://github.com/gogs/gogs/issues/5602)
-- Open/close milestone redirects to a 404 page. [#5677](https://github.com/gogs/gogs/issues/5677)
-- Disallow multiple tokens with same name. [#5587](https://github.com/gogs/gogs/issues/5587) [#5820](https://github.com/gogs/gogs/pull/5820)
-- Enable Federated Avatar Lookup could cause server to crash. [#5848](https://github.com/gogs/gogs/issues/5848)
-- Private repositories are hidden in the organization's view. [#5869](https://github.com/gogs/gogs/issues/5869)
-- Users have access to base repository cannot view commits in forks. [#5878](https://github.com/gogs/gogs/issues/5878)
-- Server error when changing email address in user settings page. [#5899](https://github.com/gogs/gogs/issues/5899)
-- Fall back to use RFC 3339 as time layout when misconfigured. [#6098](https://github.com/gogs/gogs/issues/6098)
-- Unable to update team with server error. [#6185](https://github.com/gogs/gogs/issues/6185)
-- Webhooks are not fired after push when `[service] REQUIRE_SIGNIN_VIEW = true`.
-- Files with identical content are randomly displayed one of them.
-
-### Removed
-
-- Configuration option `[other] SHOW_FOOTER_VERSION`
-- Configuration option `[server] STATIC_ROOT_PATH`
-- Configuration option `[repository] MIRROR_QUEUE_LENGTH`
-- Configuration option `[repository] PULL_REQUEST_QUEUE_LENGTH`
-- Configuration option `[session] ENABLE_SET_COOKIE`
-- Configuration option `[release.attachment] PATH`
-- Configuration option `[webhook] QUEUE_LENGTH`
-- Build tag `sqlite`, which means CGO is now required.
-
----
-
-**Older change logs can be found on [GitHub](https://github.com/gogs/gogs/releases?after=v0.12.0).**

+ 0 - 2
CODEOWNERS

@@ -1,2 +0,0 @@
-# Default
-* @gogs/core

+ 5 - 16
LICENSE

@@ -1,19 +1,8 @@
-Copyright (c) The Gogs Authors
+The MIT License (MIT)
+Copyright © 2025 宋子桓(Song Zihuan)
 
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 19 - 0
LICENSE.gogs

@@ -0,0 +1,19 @@
+Copyright (c) The Gogs Authors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 18 - 96
README.md

@@ -1,108 +1,30 @@
-![gogs-brand](https://user-images.githubusercontent.com/2946214/146899259-6a8b58ad-8d6e-40d2-ab02-79dc6aadabbf.png)
+# Huan-Gogs
 
-[![GitHub Workflow Status](https://img.shields.io/github/checks-status/gogs/gogs/main?logo=github&style=for-the-badge)](https://github.com/gogs/gogs/actions?query=branch%3Amain) [![Discord](https://img.shields.io/discord/382595433060499458.svg?style=for-the-badge&logo=discord)](https://discord.gg/9aqdHU7) [![Sourcegraph](https://img.shields.io/badge/view%20on-Sourcegraph-brightgreen.svg?style=for-the-badge&logo=sourcegraph)](https://sourcegraph.com/github.com/gogs/gogs)
+[Gogs](https://gogs.io)(`/gɑgz/`)是一款极易搭建的自助 Git 服务。
 
-[简体中文](README_ZH.md)
+[Huan-Gogs](https://github.com/SongZihuan/HuanGogs) 是根据 Gogs 按需改进而来。
 
-## 🔮 Vision
+例如增加了功能:
 
-The Gogs (`/gɑgz/`) project aims to build a simple, stable and extensible self-hosted Git service that can be set up in the most painless way. With Go, this can be done with an independent binary distribution across all platforms that Go supports, including Linux, macOS, Windows and ARM-based systems.
+- 公共邮件和主邮件分开
+- 优化邮件服务TLS握手过程
+- 更新用户权限、登录逻辑判断
+- 更新用户仓库创建逻辑(例如可以开启允许管理员无限制创建,而一般注册用户只能查看)
+- 允许限制用户探索其他用户的逻辑(Explore 发现页面 可以对一般用户不展示其他用户)
+- 修复了一些Bug
 
-## 📡 Overview
+## 关于 Gogs
 
-- Please visit [our home page](https://gogs.io) for user documentation.
-- Please refer to [CHANGELOG.md](CHANGELOG.md) for list of changes in each releases.
-- Want to try it before doing anything else? Do it [online](https://try.gogs.io/gogs/gogs)!
-- Having trouble? Help yourself with [troubleshooting](https://gogs.io/docs/intro/troubleshooting.html) or ask questions in [Discussions](https://github.com/gogs/gogs/discussions).
-- Want to help with localization? Check out the [localization documentation](https://gogs.io/docs/features/i18n.html).
-- Ready to get hands dirty? Read our [contributing guide](.github/CONTRIBUTING.md).
-- Hmm... What about APIs? We have experimental support with [documentation](https://github.com/gogs/docs-api).
+可以访问 Gogs 的官网获得更多介绍:[gogs.io](https://gogs.io/)
 
-## 💌 Features
+也可以访问其 Github 仓库获取更多介绍:[github.com/gogs/gogs](https://github.com/gogs/gogs)
 
-- User dashboard, user profile and activity timeline.
-- Access repositories via SSH, HTTP and HTTPS protocols.
-- User, organization and repository management.
-- Repository and organization webhooks, including Slack, Discord and Dingtalk.
-- Repository Git hooks, deploy keys and Git LFS.
-- Repository issues, pull requests, wiki, protected branches and collaboration.
-- Migrate and mirror repositories with wiki from other code hosts.
-- Web editor for quick editing repository files and wiki.
-- Jupyter Notebook and PDF rendering.
-- Authentication via SMTP, LDAP, reverse proxy, GitHub.com and GitHub Enterprise with 2FA.
-- Customize HTML templates, static files and many others.
-- Rich database backend support, including PostgreSQL, MySQL, SQLite3 or any database backend that speaks one of those protocols.
-- Have localization over [31 languages](https://crowdin.com/project/gogs).
+## 授权许可
 
-## 💾 Hardware requirements
+Gogs 项目采用 MIT 开源授权许可证,完整的授权说明已放置在 [LICENSE.gogs](/LICENSE.gogs) 文件中。
 
-- A Raspberry Pi or $5 Digital Ocean Droplet is more than enough to get you started. Some even use 64MB RAM Docker [CaaS](https://www.docker.com/blog/containers-as-a-service-caas/).
-- 2 CPU cores and 512MB RAM would be the baseline for teamwork.
-- Increase CPU cores when your team size gets significantly larger, memory footprint remains low.
+## 协议
 
-## 💻 Browser support
+本项目基于 [MIT LICENSE](/LICENSE) 发布。
+了解更多关于 MIT LICENSE , 请 [点击此处](https://mit-license.song-zh.com) 。
 
-- Please see [Semantic UI](https://github.com/Semantic-Org/Semantic-UI#browser-support) for specific versions of supported browsers.
-- The smallest resolution officially supported is **1024*768**, however the UI may still look right in smaller resolutions, but no promises or fixes.
-
-## 📜 Installation
-
-Make sure you install the [prerequisites](https://gogs.io/docs/installation) first.
-
-There are 6 ways to install Gogs:
-
-- [Install from binary](https://gogs.io/docs/installation/install_from_binary.html)
-- [Install from source](https://gogs.io/docs/installation/install_from_source.html)
-- [Install from packages](https://gogs.io/docs/installation/install_from_packages.html)
-- [Ship with Docker](https://github.com/gogs/gogs/tree/main/docker)
-- [Try with Vagrant](https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs)
-
-### Deploy to cloud
-
-- [Cloudron](https://www.cloudron.io/store/io.gogs.cloudronapp.html)
-- [YunoHost](https://github.com/YunoHost-Apps/gogs_ynh)
-- [alwaysdata](https://www.alwaysdata.com/en/marketplace/gogs/)
-
-### Tutorials
-
-- [Private Git Web Portal in Raspberry PI With Gogs](https://peppe8o.com/private-git-web-portal-in-raspberry-pi-with-gogs/)
-- [How To Set Up Gogs on Ubuntu 14.04](https://www.digitalocean.com/community/tutorials/how-to-set-up-gogs-on-ubuntu-14-04)
-- [Run your own GitHub-like service with the help of Docker](https://blog.hypriot.com/post/run-your-own-github-like-service-with-docker/)
-- [Dockerized Gogs git server and alpine postgres in 20 minutes or less](https://garthwaite.org/docker-gogs.html)
-- [Host Your Own Private GitHub with Gogs](https://eladnava.com/host-your-own-private-github-with-gogs-io/)
-- [使用 Gogs 搭建自己的 Git 服务器](https://blog.mynook.info/post/host-your-own-git-server-using-gogs/) (Chinese)
-- [阿里云上 Ubuntu 14.04 64 位安装 Gogs](https://my.oschina.net/luyao/blog/375654) (Chinese)
-- [Installing Gogs on FreeBSD](https://www.codejam.info/2015/03/installing-gogs-on-freebsd.html)
-- [How to install Gogs on a Linux Server (DigitalOcean)](https://www.youtube.com/watch?v=deSfX0gqefE)
-
-## 📦 Software, service and product support
-
-- [Jenkins](https://plugins.jenkins.io/gogs-webhook/) (CI)
-- [Puppet](https://forge.puppet.com/modules/Siteminds/gogs) (IT)
-- [Synology](https://www.synology.com) (Docker)
-- [Syncloud](https://syncloud.org/) (App Store)
-
-## 🙇‍♂️ Acknowledgments
-
-<p>This project is proudly supported by:</p>
-<p>
-  <a href="https://www.digitalocean.com/">
-    <img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" width="201px">
-  </a>
-</p>
-
-Other acknowledgments:
-
-- Thanks [Egon Elbre](https://twitter.com/egonelbre) for designing the original version of the logo.
-- Thanks [Crowdin](https://crowdin.com/project/gogs) for sponsoring open source translation plan.
-- Thanks [MonoVM](https://monovm.com/linux-vps/) for sponsoring VPS services.
-- Thanks [Buildkite](https://buildkite.com) for sponsoring open source CI/CD plan.
-
-## 👋 Contributors
-
-- See [contributors page](https://github.com/gogs/gogs/graphs/contributors) for top 100 contributors.
-- See [TRANSLATORS](conf/locale/TRANSLATORS) for public list of translators.
-
-## ⚖️ License
-
-This project is under the MIT License. See the [LICENSE](https://github.com/gogs/gogs/blob/main/LICENSE) file for the full license text.

+ 0 - 102
README_ZH.md

@@ -1,102 +0,0 @@
-# Gogs
-
-Gogs 是一款极易搭建的自助 Git 服务。
-
-## 项目愿景
-
-Gogs(`/gɑgz/`)项目旨在打造一个以最简便的方式搭建简单、稳定和可扩展的自助 Git 服务。使用 Go 语言开发使得 Gogs 能够通过独立的二进制分发,并且支持 Go 语言支持的 **所有平台**,包括 Linux、macOS、Windows 和基于 ARM 的操作系统。
-
-## 概览
-
-- 请移步[官网](https://gogs.io)查看用户使用文档
-- 请通过 [CHANGELOG.md](CHANGELOG.md) 文件查看各个版本的变更历史
-- 想要先睹为快?直接去[在线体验](https://try.gogs.io/gogs/gogs)吧!
-- 使用过程中遇到问题?尝试[故障排查](https://gogs.io/docs/intro/troubleshooting.html)或者前往[用户论坛](https://discuss.gogs.io/)获取帮助
-- 希望帮助多国语言的翻译吗?请查看[本地化文档](https://gogs.io/docs/features/i18n.html)
-- 准备搞点事情?请阅读[开发指南](docs/dev/local_development.md)配置开发环境
-- 想调用 API 吗?请查看[文档](https://github.com/gogs/docs-api)吧
-
-## 主要特性
-
-- 控制面板、用户页面以及活动时间线
-- 通过 SSH、HTTP 和 HTTPS 协议操作仓库
-- 管理用户、组织和仓库
-- 仓库和组织级 Webhook,包括 Slack、Discord 和钉钉
-- 仓库 Git 钩子、部署密钥和 Git LFS
-- 仓库工单(Issue)、合并请求(Pull Request)、Wiki、保护分支和多人协作
-- 从其它代码平台迁移和镜像仓库以及 Wiki
-- 在线编辑仓库文件和 Wiki
-- Jupyter Notebook 和 PDF 的渲染
-- 通过 SMTP、LDAP、反向代理、GitHub.com 和 GitHub 企业版进行用户认证
-- 开启两步验证(2FA)登录
-- 自定义 HTML 模板、静态文件和许多其它组件
-- 多样的数据库后端,包括 PostgreSQL、MySQL、SQLite3 和 [TiDB](https://github.com/pingcap/tidb)
-- 超过 [31 种语言](https://crowdin.com/project/gogs)的本地化
-
-## 硬件要求
-
-- 最低的系统硬件要求为一个廉价的树莓派
-- 如果用于团队项目管理,建议使用 2 核 CPU 及 512MB 内存
-- 当团队成员大量增加时,可以考虑添加 CPU 核数,内存占用保持不变
-
-## 浏览器支持
-
-- 请根据 [Semantic UI](https://github.com/Semantic-Org/Semantic-UI#browser-support) 查看具体支持的浏览器版本。
-- 官方支持的最小 UI 尺寸为 **1024*768**,UI 不一定会在更小尺寸的设备上被破坏,但我们无法保证且不会修复。
-
-## 安装部署
-
-在安装 Gogs 之前,您需要先安装 [基本环境](https://gogs.io/docs/installation)。
-
-然后,您可以通过以下 6 种方式来安装 Gogs:
-
-- [二进制安装](https://gogs.io/docs/installation/install_from_binary.html)
-- [源码安装](https://gogs.io/docs/installation/install_from_source.html)
-- [包管理安装](https://gogs.io/docs/installation/install_from_packages.html)
-- [采用 Docker 部署](https://github.com/gogs/gogs/tree/main/docker)
-- [通过 Vagrant 安装](https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs)
-- [通过基于 Kubernetes 的 Helm Charts](https://github.com/helm/charts/tree/master/incubator/gogs)
-
-### 云端部署
-
-- [OpenShift](https://github.com/tkisme/gogs-openshift)
-- [Cloudron](https://cloudron.io/appstore.html#io.gogs.cloudronapp)
-- [Scaleway](https://www.scaleway.com/imagehub/gogs/)
-- [Sandstorm](https://github.com/cem/gogs-sandstorm)
-- [sloppy.io](https://github.com/sloppyio/quickstarters/tree/master/gogs)
-- [YunoHost](https://github.com/mbugeia/gogs_ynh)
-- [DPlatform](https://github.com/j8r/DPlatform)
-- [LunaNode](https://github.com/LunaNode/launchgogs)
-
-### 使用教程
-
-- [使用 Gogs 搭建自己的 Git 服务器](https://blog.mynook.info/post/host-your-own-git-server-using-gogs/)
-- [阿里云上 Ubuntu 14.04 64 位安装 Gogs](http://my.oschina.net/luyao/blog/375654)
-
-## 软件、服务以及产品支持
-
-- [Fabric8](http://fabric8.io/)(DevOps)
-- [Jenkins](https://plugins.jenkins.io/gogs-webhook/)(CI)
-- [Taiga](https://taiga.io/)(项目管理)
-- [Puppet](https://forge.puppet.com/Siteminds/gogs)(IT)
-- [Kanboard](https://github.com/kanboard/plugin-gogs-webhook)(项目管理)
-- [BearyChat](https://bearychat.com/)(团队交流)
-- [GitPitch](https://gitpitch.com/)(Markdown 演示)
-- [Synology](https://www.synology.com)(Docker)
-- [Syncloud](https://syncloud.org/)(应用商店)
-
-## 特别鸣谢
-
-- 感谢 [Egon Elbre](https://twitter.com/egonelbre) 设计的 Logo。
-- 感谢 [DigitalOcean](https://www.digitalocean.com) 和 [MonoVM](https://monovm.com) 提供服务器赞助。
-- 感谢 [Crowdin](https://crowdin.com/project/gogs) 提供免费的开源项目本地化支持。
-- 感谢 [Buildkite](https://buildkite.com) 提供免费的开源项目 CI/CD 支持。
-
-## 贡献成员
-
-- 您可以通过查看 [贡献者页面](https://github.com/gogs/gogs/graphs/contributors) 获取 TOP 100 的贡献者列表。
-- 您可以通过查看 [TRANSLATORS](conf/locale/TRANSLATORS) 文件获取公开的翻译人员列表。
-
-## 授权许可
-
-本项目采用 MIT 开源授权许可证,完整的授权说明已放置在 [LICENSE](https://github.com/gogs/gogs/blob/main/LICENSE) 文件中。

+ 0 - 24
SECURITY.md

@@ -1,24 +0,0 @@
-# Security policy
-
-## Supported versions
-
-Only the latest minor version releases are supported (>= 0.13) for accepting vulnerability reports and patching fixes.
-
-Existing vulnerability reports are being tracked in [GitHub Security Advisories](https://github.com/gogs/gogs/security/advisories).
-
-## Vulnerability lifecycle
-
-> [!important]
-> Starting **Nov 9, 2023 00:00 UTC**, only security vulnerabilities reported through [GitHub Security Advisories](https://github.com/gogs/gogs/security/advisories/new) are accepted.
-> Pre-existing vulnerability reported through https://huntr.dev/ or email (`security@gogs.io`) will continue to be worked through.
-
-1. Report an advisory for the vulnerability
-1. Project maintainers review the advisory and either:
-    - Ask clarifying questions
-    - Confirm or deny the vulnerability
-1. Once the vulnerability is confirmed, the reporter may submit a patch or wait for project maintainers to patch.
-    - The latter is usually significantly slower.
-1. Patch releases will be made for the supported versions.
-1. After 14 days of the release, publish the corresponding advisory on [GitHub Security Advisories](https://github.com/gogs/gogs/security/advisories).
-
-Thank you!

+ 1 - 1
Taskfile.yml

@@ -65,7 +65,7 @@ tasks:
     cmds:
       - rm -rf {{.RELEASE_GOGS}}
       - mkdir -p {{.RELEASE_GOGS}}
-      - cp -r gogs{{.BINARY_EXT}} LICENSE README.md README_ZH.md scripts {{.RELEASE_GOGS}}
+      - cp -r gogs{{.BINARY_EXT}} LICENSE LICENSE.gogs README.md scripts {{.RELEASE_GOGS}}
       - cd {{.RELEASE_ROOT}} && zip -r gogs.zip "gogs"
     vars:
       RELEASE_ROOT: release

+ 0 - 16
codecov.yml

@@ -1,16 +0,0 @@
-coverage:
-  range: "60...95"
-  status:
-    project:
-      default:
-        threshold: 1%
-        informational: true
-    patch:
-      default:
-        only_pulls: true
-        informational: true
-
-comment:
-  layout: 'diff'
-
-github_checks: false

+ 8 - 0
conf/app.ini

@@ -15,6 +15,8 @@ RUN_MODE = dev
 EXTERNAL_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
 ; The public-facing domain name for the application.
 DOMAIN = localhost
+; Use TCP Proxy Proto
+PROXY_PROTO = false
 ; The protocol that is used to serve direct traffic to the application.
 ; Currently supports "http", "https", "fcgi" and "unix".
 PROTOCOL = http
@@ -102,6 +104,10 @@ SCRIPT_TYPE = bash
 ANSI_CHARSET =
 ; Whether to force every new repository to be private.
 FORCE_PRIVATE = false
+; Administrators are not restricted from creating repositories
+ADMIN_NOT_CREATION_LIMIT = false
+; Organizations can create an unlimited number of repositories (only works if admin.DISABLE_REGULAR_ORG_CREATION is true)
+ORGANIZATION_NOT_CREATION_LIMIT = false
 ; The global limit of number of repositories a user can create, -1 means no limit.
 MAX_CREATION_LIMIT = -1
 ; Preferred Licenses to place at the top of the list.
@@ -344,6 +350,8 @@ ANGLED_QUOTES = true
 [admin]
 ; Whether to disable regular (non-admin) users to create organizations.
 DISABLE_REGULAR_ORG_CREATION = false
+; Whether to disable regular (non-admin) users to explore other user.
+DISABLE_REGULAR_EXPLORE_USER = false
 
 [webhook]
 ; The list of enabled types for users to use, can be "gogs", "slack", "discord", "dingtalk".

+ 1 - 1
conf/embed.go

@@ -1,6 +1,6 @@
 // Copyright 2022 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
conf/embed_test.go

@@ -1,6 +1,6 @@
 // Copyright 2022 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
gen.go

@@ -1,6 +1,6 @@
 // Copyright 2022 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package main
 

+ 1 - 0
go.mod

@@ -110,6 +110,7 @@ require (
 	github.com/modern-go/reflect2 v1.0.2 // indirect
 	github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
 	github.com/ncruces/go-strftime v0.1.9 // indirect
+	github.com/pires/go-proxyproto v0.8.0 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	github.com/prometheus/client_model v0.6.1 // indirect
 	github.com/prometheus/common v0.55.0 // indirect

+ 2 - 0
go.sum

@@ -344,6 +344,8 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ
 github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo=
 github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
 github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
+github.com/pires/go-proxyproto v0.8.0 h1:5unRmEAPbHXHuLjDg01CxJWf91cw3lKHc/0xzKpXEe0=
+github.com/pires/go-proxyproto v0.8.0/go.mod h1:iknsfgnH8EkjrMeMyvfKByp9TiBZCKZM0jx2xmKqnVY=
 github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
 github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ=
 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=

+ 1 - 1
gogs.go

@@ -2,7 +2,7 @@
 
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 // Gogs is a painless self-hosted Git Service.
 package main

+ 1 - 1
internal/app/api.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package app
 

+ 1 - 1
internal/app/api_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package app
 

+ 1 - 1
internal/app/metrics.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package app
 

+ 1 - 1
internal/auth/auth.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package auth
 

+ 1 - 1
internal/auth/github/config.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package github
 

+ 1 - 1
internal/auth/github/provider.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package github
 

+ 1 - 1
internal/auth/ldap/config.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 // Package ldap provide functions & structure to query a LDAP ldap directory.
 // For now, it's mainly tested again an MS Active Directory service, see README.md for more information.

+ 1 - 1
internal/auth/ldap/provider.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package ldap
 

+ 1 - 1
internal/auth/pam/config.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package pam
 

+ 1 - 1
internal/auth/pam/pam.go

@@ -2,7 +2,7 @@
 
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package pam
 

+ 1 - 1
internal/auth/pam/pam_stub.go

@@ -2,7 +2,7 @@
 
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package pam
 

+ 1 - 1
internal/auth/pam/provider.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package pam
 

+ 1 - 1
internal/auth/smtp/config.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package smtp
 

+ 1 - 1
internal/auth/smtp/provider.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package smtp
 

+ 1 - 1
internal/authutil/basic.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package authutil
 

+ 1 - 1
internal/authutil/basic_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package authutil
 

+ 1 - 1
internal/avatar/avatar.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package avatar
 

+ 1 - 1
internal/avatar/avatar_test.go

@@ -1,6 +1,6 @@
 // Copyright 2016 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package avatar
 

+ 1 - 1
internal/cmd/admin.go

@@ -1,6 +1,6 @@
 // Copyright 2016 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cmd
 

+ 1 - 1
internal/cmd/backup.go

@@ -1,6 +1,6 @@
 // Copyright 2017 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cmd
 

+ 1 - 1
internal/cmd/cert.go

@@ -1,7 +1,7 @@
 // Copyright 2009 The Go Authors. All rights reserved.
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cmd
 

+ 1 - 1
internal/cmd/cmd.go

@@ -1,6 +1,6 @@
 // Copyright 2015 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cmd
 

+ 1 - 1
internal/cmd/hook.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cmd
 

+ 1 - 1
internal/cmd/import.go

@@ -1,6 +1,6 @@
 // Copyright 2016 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cmd
 

+ 1 - 1
internal/cmd/restore.go

@@ -1,6 +1,6 @@
 // Copyright 2017 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cmd
 

+ 1 - 1
internal/cmd/serv.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cmd
 

+ 77 - 18
internal/cmd/web.go

@@ -1,12 +1,13 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cmd
 
 import (
 	"crypto/tls"
 	"fmt"
+	"github.com/pires/go-proxyproto"
 	"io"
 	"net"
 	"net/http"
@@ -14,6 +15,7 @@ import (
 	"os"
 	"path/filepath"
 	"strings"
+	"time"
 
 	"github.com/go-macaron/binding"
 	"github.com/go-macaron/cache"
@@ -716,7 +718,32 @@ func runWeb(c *cli.Context) error {
 
 	switch conf.Server.Protocol {
 	case "http":
-		err = http.ListenAndServe(listenAddr, m)
+		server := http.Server{
+			Addr:    listenAddr,
+			Handler: m,
+		}
+
+		var ln net.Listener
+		ln, err = net.Listen("tcp", server.Addr)
+		if err != nil {
+			log.Fatal("Failed to start server: %v", err)
+			return nil
+		}
+
+		var proxyListener net.Listener
+		if conf.Server.ProxyProto {
+			proxyListener = &proxyproto.Listener{
+				Listener:          ln,
+				ReadHeaderTimeout: 10 * time.Second,
+			}
+		} else {
+			proxyListener = ln
+		}
+		defer func() {
+			_ = proxyListener.Close()
+		}()
+
+		err = server.Serve(proxyListener)
 
 	case "https":
 		tlsMinVersion := tls.VersionTLS12
@@ -730,23 +757,55 @@ func runWeb(c *cli.Context) error {
 		case "TLS10":
 			tlsMinVersion = tls.VersionTLS10
 		}
-		server := &http.Server{
-			Addr: listenAddr,
-			TLSConfig: &tls.Config{
-				MinVersion:               uint16(tlsMinVersion),
-				CurvePreferences:         []tls.CurveID{tls.X25519, tls.CurveP256, tls.CurveP384, tls.CurveP521},
-				PreferServerCipherSuites: true,
-				CipherSuites: []uint16{
-					tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
-					tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
-					tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
-					tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
-					tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
-					tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
-				},
-			}, Handler: m,
+
+		var cert tls.Certificate
+		cert, err = tls.LoadX509KeyPair(conf.Server.CertFile, conf.Server.KeyFile)
+		if err != nil {
+			log.Fatal("Failed to start server: %v", err)
+			return nil
 		}
-		err = server.ListenAndServeTLS(conf.Server.CertFile, conf.Server.KeyFile)
+
+		tlsConfig := &tls.Config{
+			MinVersion:       uint16(tlsMinVersion),
+			CurvePreferences: []tls.CurveID{tls.X25519, tls.CurveP256, tls.CurveP384, tls.CurveP521},
+			Certificates:     []tls.Certificate{cert},
+			CipherSuites: []uint16{
+				tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
+				tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
+				tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
+				tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
+				tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,
+				tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,
+			},
+		}
+
+		server := http.Server{
+			Addr:    listenAddr,
+			Handler: m,
+		}
+
+		var ln net.Listener
+		ln, err = net.Listen("tcp", server.Addr)
+		if err != nil {
+			panic(err)
+		}
+
+		var proxyListener net.Listener
+		if conf.Server.ProxyProto {
+			proxyListener = &proxyproto.Listener{
+				Listener:          ln,
+				ReadHeaderTimeout: 10 * time.Second,
+			}
+		} else {
+			proxyListener = ln
+		}
+
+		tlsListener := tls.NewListener(proxyListener, tlsConfig)
+		defer func() {
+			_ = tlsListener.Close()
+		}()
+
+		err = server.Serve(tlsListener)
 
 	case "fcgi":
 		err = fcgi.Serve(nil, m)

+ 1 - 1
internal/conf/computed.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
internal/conf/computed_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
internal/conf/conf.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
internal/conf/conf_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
internal/conf/log.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
internal/conf/log_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
internal/conf/mocks.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 17 - 13
internal/conf/static.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 
@@ -157,7 +157,8 @@ var (
 
 	// Admin settings
 	Admin struct {
-		DisableRegularOrgCreation bool
+		DisableRegularOrgCreation bool `ini:"DISABLE_REGULAR_ORG_CREATION"`
+		DisableRegularExploreUser bool `ini:"DISABLE_REGULAR_EXPLORE_USER"`
 	}
 
 	// Cron tasks
@@ -260,6 +261,7 @@ var Auth AuthOpts
 
 type ServerOpts struct {
 	ExternalURL          string `ini:"EXTERNAL_URL"`
+	ProxyProto           bool   `ini:"PROXY_PROTO"`
 	Domain               string
 	Protocol             string
 	HTTPAddr             string `ini:"HTTP_ADDR"`
@@ -312,17 +314,19 @@ type SSHOpts struct {
 var SSH SSHOpts
 
 type RepositoryOpts struct {
-	Root                     string
-	ScriptType               string
-	ANSICharset              string `ini:"ANSI_CHARSET"`
-	ForcePrivate             bool
-	MaxCreationLimit         int
-	PreferredLicenses        []string
-	DisableHTTPGit           bool `ini:"DISABLE_HTTP_GIT"`
-	EnableLocalPathMigration bool
-	EnableRawFileRenderMode  bool
-	CommitsFetchConcurrency  int
-	DefaultBranch            string
+	Root                         string
+	ScriptType                   string
+	ANSICharset                  string `ini:"ANSI_CHARSET"`
+	ForcePrivate                 bool
+	AdminNotCreationLimit        bool `ini:"ADMIN_NOT_CREATION_LIMIT"`
+	OrganizationNotCreationLimit bool `ini:"ORGANIZATION_NOT_CREATION_LIMIT"`
+	MaxCreationLimit             int
+	PreferredLicenses            []string
+	DisableHTTPGit               bool `ini:"DISABLE_HTTP_GIT"`
+	EnableLocalPathMigration     bool
+	EnableRawFileRenderMode      bool
+	CommitsFetchConcurrency      int
+	DefaultBranch                string
 
 	// Repository editor settings
 	Editor struct {

+ 1 - 1
internal/conf/static_minwinsvc.go

@@ -2,7 +2,7 @@
 
 // Copyright 2015 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
internal/conf/static_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 4 - 0
internal/conf/testdata/TestInit.golden.ini

@@ -5,6 +5,7 @@ RUN_MODE=test
 [server]
 EXTERNAL_URL=http://localhost:3080/
 DOMAIN=localhost
+PROXY_PROTO=true
 PROTOCOL=http
 HTTP_ADDR=0.0.0.0
 HTTP_PORT=3000
@@ -39,6 +40,9 @@ ROOT=/tmp/gogs-repositories
 SCRIPT_TYPE=bash
 ANSI_CHARSET=
 FORCE_PRIVATE=false
+ADMIN_NOT_CREATION_LIMIT=true
+ONLY_ADMIN_CAN_CREATE_ORGANIZATION=true
+ORGANIZATION_NOT_CREATION_LIMIT=true
 MAX_CREATION_LIMIT=-1
 PREFERRED_LICENSES=Apache License 2.0,MIT License
 DISABLE_HTTP_GIT=false

+ 1 - 1
internal/conf/utils.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
internal/conf/utils_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package conf
 

+ 1 - 1
internal/context/api.go

@@ -1,6 +1,6 @@
 // Copyright 2016 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package context
 

+ 1 - 1
internal/context/api_org.go

@@ -1,6 +1,6 @@
 // Copyright 2016 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package context
 

+ 1 - 1
internal/context/auth.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package context
 

+ 1 - 1
internal/context/context.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package context
 

+ 1 - 1
internal/context/notice.go

@@ -1,6 +1,6 @@
 // Copyright 2019 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package context
 

+ 1 - 1
internal/context/org.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package context
 

+ 1 - 1
internal/context/repo.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package context
 

+ 1 - 1
internal/context/user.go

@@ -1,6 +1,6 @@
 // Copyright 2018 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package context
 

+ 1 - 1
internal/cron/cron.go

@@ -1,6 +1,6 @@
 // Copyright 2014 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cron
 

+ 1 - 1
internal/cryptoutil/aes.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cryptoutil
 

+ 1 - 1
internal/cryptoutil/aes_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cryptoutil
 

+ 1 - 1
internal/cryptoutil/md5.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cryptoutil
 

+ 1 - 1
internal/cryptoutil/md5_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cryptoutil
 

+ 1 - 1
internal/cryptoutil/sha.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cryptoutil
 

+ 1 - 1
internal/cryptoutil/sha_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package cryptoutil
 

+ 1 - 1
internal/database/access_tokens.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package database
 

+ 1 - 1
internal/database/access_tokens_test.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package database
 

+ 1 - 1
internal/database/actions.go

@@ -1,6 +1,6 @@
 // Copyright 2020 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package database
 

+ 1 - 1
internal/database/actions_test.go

@@ -1,6 +1,6 @@
 // Copyright 2022 The Gogs Authors. All rights reserved.
 // Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
+// license that can be found in the LICENSE.gogs file.
 
 package database
 

Vissa filer visades inte eftersom för många filer har ändrats