Merge remote-tracking branch 'upstream/main' into limit-repo-size

This commit is contained in:
DmitryFrolovTri
2023-05-03 14:58:32 +00:00
495 changed files with 6917 additions and 12240 deletions
+1
View File
@@ -10,3 +10,4 @@ include_file = ["main.go"]
include_dir = ["cmd", "models", "modules", "options", "routers", "services"]
exclude_dir = ["modules/git/tests", "services/gitdiff/testdata", "modules/avatar/testdata", "models/fixtures", "models/migrations/fixtures", "modules/migration/file_format_testdata", "modules/avatar/identicon/testdata"]
exclude_regex = ["_test.go$", "_gen.go$"]
stop_on_error = true
+4 -167
View File
@@ -267,35 +267,6 @@ steps:
- name: deps
path: /go
---
kind: pipeline
type: docker
name: compliance-docs
platform:
os: linux
arch: amd64
trigger:
event:
- pull_request
paths:
include:
- "docs/**"
- "*.md"
steps:
- name: deps-frontend
image: node:18
pull: always
commands:
- make deps-frontend
- name: lint-md
image: node:18
commands:
- make lint-md
---
kind: pipeline
type: docker
@@ -1033,49 +1004,6 @@ steps:
from_secret: github_token
depends_on: [gpg-sign]
---
kind: pipeline
type: docker
name: docs
platform:
os: linux
arch: arm64
depends_on:
- compliance
trigger:
event:
- push
- tag
- pull_request
paths:
include:
- "docs/**"
steps:
- name: build-docs
image: gitea/test_env:linux-1.20-arm64
commands:
- cd docs
- make trans-copy clean build
- name: publish-docs
image: techknowlogick/drone-netlify:latest
pull: always
settings:
path: docs/public/
site_id: d2260bae-7861-4c02-8646-8f6440b12672
environment:
NETLIFY_TOKEN:
from_secret: netlify_token
when:
branch:
- main
event:
- push
---
kind: pipeline
type: docker
@@ -1339,7 +1267,7 @@ steps:
pull: always
settings:
auto_tag: false
tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64
tags: ${DRONE_BRANCH##release/v}-nightly-linux-amd64
repo: gitea/gitea
build_args:
- GOPROXY=https://goproxy.io
@@ -1361,7 +1289,7 @@ steps:
settings:
dockerfile: Dockerfile.rootless
auto_tag: false
tags: ${DRONE_BRANCH##release/v}-dev-linux-amd64-rootless
tags: ${DRONE_BRANCH##release/v}-nightly-linux-amd64-rootless
repo: gitea/gitea
build_args:
- GOPROXY=https://goproxy.io
@@ -1378,43 +1306,6 @@ steps:
exclude:
- pull_request
---
kind: pipeline
type: docker
name: docker-linux-arm64-dry-run
platform:
os: linux
arch: arm64
depends_on:
- compliance
trigger:
event:
- pull_request
paths:
exclude:
- "docs/**"
steps:
- name: dryrun
image: plugins/docker:latest
pull: always
settings:
dry_run: true
repo: gitea/gitea
tags: linux-arm64
build_args:
- GOPROXY=https://goproxy.io
environment:
PLUGIN_MIRROR:
from_secret: plugin_mirror
DOCKER_BUILDKIT: 1
when:
event:
- pull_request
---
kind: pipeline
type: docker
@@ -1681,7 +1572,7 @@ steps:
pull: always
settings:
auto_tag: false
tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64
tags: ${DRONE_BRANCH##release/v}-nightly-linux-arm64
repo: gitea/gitea
build_args:
- GOPROXY=https://goproxy.io
@@ -1703,7 +1594,7 @@ steps:
settings:
dockerfile: Dockerfile.rootless
auto_tag: false
tags: ${DRONE_BRANCH##release/v}-dev-linux-arm64-rootless
tags: ${DRONE_BRANCH##release/v}-nightly-linux-arm64-rootless
repo: gitea/gitea
build_args:
- GOPROXY=https://goproxy.io
@@ -1818,57 +1709,3 @@ depends_on:
- docker-linux-arm64-release
- docker-linux-amd64-release-branch
- docker-linux-arm64-release-branch
---
kind: pipeline
type: docker
name: notifications
platform:
os: linux
arch: arm64
clone:
disable: true
trigger:
branch:
- main
- "release/*"
event:
- push
- tag
status:
- success
- failure
depends_on:
- testing-mysql
- testing-mysql8
- testing-mssql
- testing-pgsql
- testing-sqlite
- release-version
- release-latest
- docker-linux-amd64-release
- docker-linux-arm64-release
- docker-linux-amd64-release-version
- docker-linux-arm64-release-version
- docker-linux-amd64-release-candidate-version
- docker-linux-arm64-release-candidate-version
- docker-linux-amd64-release-branch
- docker-linux-arm64-release-branch
- docker-manifest
- docker-manifest-version
- docs
steps:
- name: discord
image: appleboy/drone-discord:1.2.4
pull: always
settings:
message: "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\n📝 Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n🌐 {{ build.link }} {{/success}}\n"
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
+75
View File
@@ -15,6 +15,7 @@ plugins:
- eslint-plugin-no-jquery
- eslint-plugin-sonarjs
- eslint-plugin-custom-elements
- eslint-plugin-regexp
env:
es2022: true
@@ -472,6 +473,80 @@ rules:
quote-props: [0]
quotes: [2, single, {avoidEscape: true, allowTemplateLiterals: true}]
radix: [2, as-needed]
regexp/confusing-quantifier: [2]
regexp/control-character-escape: [2]
regexp/hexadecimal-escape: [0]
regexp/letter-case: [0]
regexp/match-any: [2]
regexp/negation: [2]
regexp/no-contradiction-with-assertion: [0]
regexp/no-control-character: [0]
regexp/no-dupe-characters-character-class: [2]
regexp/no-dupe-disjunctions: [2]
regexp/no-empty-alternative: [2]
regexp/no-empty-capturing-group: [2]
regexp/no-empty-character-class: [0]
regexp/no-empty-group: [2]
regexp/no-empty-lookarounds-assertion: [2]
regexp/no-escape-backspace: [2]
regexp/no-extra-lookaround-assertions: [0]
regexp/no-invalid-regexp: [2]
regexp/no-invisible-character: [2]
regexp/no-lazy-ends: [2]
regexp/no-legacy-features: [2]
regexp/no-misleading-capturing-group: [0]
regexp/no-misleading-unicode-character: [0]
regexp/no-missing-g-flag: [2]
regexp/no-non-standard-flag: [2]
regexp/no-obscure-range: [2]
regexp/no-octal: [2]
regexp/no-optional-assertion: [2]
regexp/no-potentially-useless-backreference: [2]
regexp/no-standalone-backslash: [2]
regexp/no-super-linear-backtracking: [0]
regexp/no-super-linear-move: [0]
regexp/no-trivially-nested-assertion: [2]
regexp/no-trivially-nested-quantifier: [2]
regexp/no-unused-capturing-group: [0]
regexp/no-useless-assertions: [2]
regexp/no-useless-backreference: [2]
regexp/no-useless-character-class: [2]
regexp/no-useless-dollar-replacements: [2]
regexp/no-useless-escape: [2]
regexp/no-useless-flag: [2]
regexp/no-useless-lazy: [2]
regexp/no-useless-non-capturing-group: [2]
regexp/no-useless-quantifier: [2]
regexp/no-useless-range: [2]
regexp/no-useless-two-nums-quantifier: [2]
regexp/no-zero-quantifier: [2]
regexp/optimal-lookaround-quantifier: [2]
regexp/optimal-quantifier-concatenation: [0]
regexp/prefer-character-class: [0]
regexp/prefer-d: [0]
regexp/prefer-escape-replacement-dollar-char: [0]
regexp/prefer-lookaround: [0]
regexp/prefer-named-backreference: [0]
regexp/prefer-named-capture-group: [0]
regexp/prefer-named-replacement: [0]
regexp/prefer-plus-quantifier: [2]
regexp/prefer-predefined-assertion: [2]
regexp/prefer-quantifier: [0]
regexp/prefer-question-quantifier: [2]
regexp/prefer-range: [2]
regexp/prefer-regexp-exec: [2]
regexp/prefer-regexp-test: [2]
regexp/prefer-result-array-groups: [0]
regexp/prefer-star-quantifier: [2]
regexp/prefer-unicode-codepoint-escapes: [2]
regexp/prefer-w: [0]
regexp/require-unicode-regexp: [0]
regexp/sort-alternatives: [0]
regexp/sort-character-class-elements: [0]
regexp/sort-flags: [0]
regexp/strict: [2]
regexp/unicode-escape: [0]
regexp/use-ignore-case: [0]
require-atomic-updates: [0]
require-await: [0]
require-unicode-regexp: [0]
@@ -0,0 +1,22 @@
name: Compliance testing for documentation
on:
pull_request:
paths:
- "docs/**"
- "*.md"
jobs:
compliance-docs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup node
uses: actions/setup-node@v2
with:
node-version: 18
- name: install dependencies
run: make deps-frontend
- name: lint markdown
run: make lint-md
+19
View File
@@ -0,0 +1,19 @@
name: Docker build dry run
on: [pull_request]
jobs:
docker_dryrun:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
push: false
tags: gitea/gitea:linux-amd64
build-args: |
GOPROXY=https://goproxy.io
+31
View File
@@ -0,0 +1,31 @@
name: Publish documentation
on:
push:
paths:
- "docs/**"
branches:
- main
jobs:
compliance-docs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: setup go
uses: actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: build docs
run: |
cd docs
make trans-copy clean build
- name: publish to netlify
uses: nwtgck/actions-netlify@v2.0
with:
production-branch: main
publish-dir: docs/public/
env:
NETLIFY_SITE_ID: d2260bae-7861-4c02-8646-8f6440b12672
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
-3
View File
@@ -1,3 +0,0 @@
pattern = "(?)LGTM"
self_approval_off = true
ignore_maintainers_file = true
+1 -1
View File
@@ -96,7 +96,7 @@ rules:
property-no-vendor-prefix: null
rule-empty-line-before: null
rule-selector-property-disallowed-list: null
scale-unlimited/declaration-strict-value: [color, {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor)$/}]
scale-unlimited/declaration-strict-value: [[color, background-color, border-color], {ignoreValues: /^(inherit|transparent|unset|initial|currentcolor|none)$/, ignoreFunctions: false}]
selector-attribute-name-disallowed-list: null
selector-attribute-operator-allowed-list: null
selector-attribute-operator-disallowed-list: null
+47
View File
@@ -4,6 +4,53 @@ This changelog goes through all the changes that have been made in each release
without substantial changes to our git log; to see the highlights of what has
been added to each release, please refer to the [blog](https://blog.gitea.io).
## [1.19.2](https://github.com/go-gitea/gitea/releases/tag/1.19.2) - 2023-04-26
* SECURITY
* Require repo scope for PATs for private repos and basic authentication (#24362) (#24364)
* Only delete secrets belonging to its owner (#24284) (#24286)
* API
* Fix typo in API route (#24310) (#24332)
* Fix access token issue on some public endpoints (#24194) (#24259)
* ENHANCEMENTS
* Fix broken clone script on an empty archived repo (#24339) (#24348)
* Fix Monaco IOS keyboard button (#24341) (#24347)
* Don't set meta `theme-color` by default (#24340) (#24346)
* Wrap too long push mirror addresses (#21120) (#24334)
* Add --font-weight-bold and set previous bold to 601 (#24307) (#24331)
* Unify nightly naming across binaries and docker images (#24116) (#24308)
* Fix footer display (#24251) (#24269)
* Fix label color, fix divider in dropdown (#24215) (#24244)
* Vertical widths of containers removed (#24184) (#24211)
* Use correct locale key for forks page (#24172) (#24175)
* Sort repo topic labels by name (#24123) (#24153)
* Highlight selected file in the PR file tree (#23947) (#24126)
* BUGFIXES
* Fix auth check bug (#24382) (#24387)
* Add tags list for repos whose release setting is disabled (#23465) (#24369)
* Fix wrong error info in RepoRefForAPI (#24344) (#24351)
* Fix no edit/close/delete button in org repo project view page (#24349)
* Respect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (#24035) (#24333)
* Remove org users who belong to no teams (#24247) (#24313)
* Fix bug when deleting wiki with no code write permission (#24274) (#24295)
* Handle canceled workflow as a warning instead of a fail (#24282) (#24292)
* Load reviewer for comments when dismissing a review (#24281) (#24288)
* Show commit history for closed/merged PRs (#24238) (#24261)
* Fix owner team access mode value in team_unit table (#24224)
* Fix issue attachment handling (#24202) (#24221)
* Fix incorrect CORS default values (#24206) (#24217)
* Fix template error in pull request with deleted head repo (#24192) (#24216)
* Don't list root repository on compare page if pulls not allowed (#24183) (#24210)
* Fix calReleaseNumCommitsBehind (#24148) (#24197)
* Fix Org edit page bugs: renaming detection, maxlength (#24161) (#24171)
* Update redis library to support redis v7 (#24114) (#24156)
* Use 1.18's aria role for dropdown menus (#24144) (#24155)
* Fix 2-dot direct compare to use the right base commit (#24133) (#24150)
* Fix incorrect server error content in RunnersList (#24118) (#24121)
* Fix mismatch between hook events and github event types (#24048) (#24091)
* BUILD
* Support converting varchar to nvarchar for mssql database (#24105) (#24168)
## [1.19.1](https://github.com/go-gitea/gitea/releases/tag/v1.19.1) - 2023-04-12
* BREAKING
+1 -2
View File
@@ -121,8 +121,7 @@ See the [hacking instructions](https://docs.gitea.io/en-us/hacking-on-gitea/).
Changes to Gitea must be reviewed before they are accepted—no matter who
makes the change, even if they are an owner or a maintainer. We use GitHub's
pull request workflow to do that. And, we also use [LGTM](http://lgtm.co)
to ensure every PR is reviewed by at least 2 maintainers.
pull request workflow to do that. Every PR is reviewed by at least 2 maintainers.
Please try to make your pull request easy to review for us. And, please read
the *[How to get faster PR reviews](https://github.com/kubernetes/community/blob/261cb0fd089b64002c91e8eddceebf032462ccd6/contributors/guide/pull-requests.md#best-practices-for-faster-reviews)* guide;
+6 -1
View File
@@ -114,6 +114,11 @@
"path": "github.com/bits-and-blooms/bitset/LICENSE",
"licenseText": "Copyright (c) 2014 Will Fitzgerald. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n * Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above\ncopyright notice, this list of conditions and the following disclaimer\nin the documentation and/or other materials provided with the\ndistribution.\n * Neither the name of Google Inc. nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
},
{
"name": "github.com/blakesmith/ar",
"path": "github.com/blakesmith/ar/COPYING",
"licenseText": "Copyright (c) 2013 Blake Smith \u003cblakesmith0@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n"
},
{
"name": "github.com/blevesearch/bleve/v2",
"path": "github.com/blevesearch/bleve/v2/LICENSE",
@@ -1104,4 +1109,4 @@
"path": "xorm.io/xorm/LICENSE",
"licenseText": "Copyright (c) 2013 - 2015 The Xorm Authors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the name of the {organization} nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
}
]
]
+5
View File
@@ -82,6 +82,11 @@ func main() {
panic(err)
}
// Ensure file has a final newline
if jsonBytes[len(jsonBytes)-1] != '\n' {
jsonBytes = append(jsonBytes, '\n')
}
err = os.WriteFile(out, jsonBytes, 0o644)
if err != nil {
panic(err)
+1 -1
View File
@@ -25,7 +25,7 @@ func TestMigratePackages(t *testing.T) {
creator := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1})
content := "package main\n\nfunc main() {\nfmt.Println(\"hi\")\n}\n"
buf, err := packages_module.CreateHashedBufferFromReader(strings.NewReader(content), 1024)
buf, err := packages_module.CreateHashedBufferFromReaderWithSize(strings.NewReader(content), 1024)
assert.NoError(t, err)
defer buf.Close()
+4 -7
View File
@@ -992,7 +992,7 @@ ROUTER = console
;;
;; List of file extensions for which lines should be wrapped in the Monaco editor
;; Separate extensions with a comma. To line wrap files without an extension, just put a comma
;LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,
;LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd,.livemd,
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1334,7 +1334,7 @@ ROUTER = console
;;
;; List of file extensions that should be rendered/edited as Markdown
;; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma
;FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd
;FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd,.livemd
;;
;; Enables math inline and block detection
;ENABLE_MATH = true
@@ -1899,11 +1899,6 @@ ROUTER = console
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; Specifies the format for fully outputted dates. Defaults to RFC1123
;; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano
;; For more information about the format see http://golang.org/pkg/time/#pkg-constants
;FORMAT =
;;
;; Location the UI time display i.e. Asia/Shanghai
;; Empty means server's location setting
;DEFAULT_UI_LOCATION =
@@ -2501,6 +2496,8 @@ ROUTER = console
;LIMIT_SIZE_CONDA = -1
;; Maximum size of a Container upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
;LIMIT_SIZE_CONTAINER = -1
;; Maximum size of a Debian upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
;LIMIT_SIZE_DEBIAN = -1
;; Maximum size of a Generic upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
;LIMIT_SIZE_GENERIC = -1
;; Maximum size of a Helm upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
+2 -2
View File
@@ -138,8 +138,8 @@ function populateResults(result) {
function render(templateString, data) {
let conditionalMatches, copy;
const conditionalPattern = /\$\{\s*isset ([a-zA-Z]*) \s*\}(.*)\$\{\s*end\s*}/g;
// since loop below depends on re.lastInxdex, we use a copy to capture any manipulations whilst inside the loop
const conditionalPattern = /\$\{\s*isset ([a-zA-Z]*) \s*\}(.*)\$\{\s*end\s*\}/g;
// since loop below depends on re.lastIndex, we use a copy to capture any manipulations whilst inside the loop
copy = templateString;
while ((conditionalMatches = conditionalPattern.exec(templateString)) !== null) {
if (data[conditionalMatches[1]]) {
+1 -1
View File
@@ -10,7 +10,7 @@ enableEmoji: true
permalinks:
post: /:year/:month/:title/
doc: /:slug/
doc: /:sections[1:]/:slug/
page: /:slug/
default: /:slug/
@@ -5,6 +5,8 @@ slug: adding-legal-pages
weight: 110
toc: false
draft: false
aliases:
- /en-us/adding-legal-pages
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "backup-and-restore"
weight: 11
toc: false
draft: false
aliases:
- /en-us/backup-and-restore
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "backup-and-restore"
weight: 11
toc: false
draft: false
aliases:
- /zh-cn/backup-and-restore
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "backup-and-restore"
weight: 11
toc: false
draft: false
aliases:
- /zh-tw/backup-and-restore
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "cmd-embedded"
weight: 20
toc: false
draft: false
aliases:
- /en-us/cmd-embedded
menu:
sidebar:
parent: "administration"
@@ -38,7 +40,7 @@ gitea embedded list [--include-vendored] [patterns...]
The `--include-vendored` flag makes the command include vendored files, which are
normally excluded; that is, files from external libraries that are required for Gitea
(e.g. [font-awesome](https://fontawesome.com/), [octicons](https://octicons.github.com/), etc).
(e.g. [octicons](https://octicons.github.com/), etc).
A list of file search patterns can be provided. Gitea uses [gobwas/glob](https://github.com/gobwas/glob)
for its glob syntax. Here are some examples:
@@ -5,6 +5,8 @@ slug: "command-line"
weight: 1
toc: false
draft: false
aliases:
- /en-us/command-line
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "config-cheat-sheet"
weight: 30
toc: false
draft: false
aliases:
- /en-us/config-cheat-sheet
menu:
sidebar:
parent: "administration"
@@ -117,7 +119,7 @@ In addition there is _`StaticRootPath`_ which can be set as a built-in at build
### Repository - Editor (`repository.editor`)
- `LINE_WRAP_EXTENSIONS`: **.txt,.md,.markdown,.mdown,.mkd,**: List of file extensions for which lines should be wrapped in the Monaco editor. Separate extensions with a comma. To line wrap files without an extension, just put a comma
- `LINE_WRAP_EXTENSIONS`: **.txt,.md,.markdown,.mdown,.mkd,.livemd,**: List of file extensions for which lines should be wrapped in the Monaco editor. Separate extensions with a comma. To line wrap files without an extension, just put a comma
- `PREVIEWABLE_FILE_MODES`: **markdown**: Valid file modes that have a preview API associated with them, such as `api/v1/markdown`. Separate the values by commas. The preview tab in edit mode won't be displayed if the file extension doesn't match.
### Repository - Pull Request (`repository.pull-request`)
@@ -277,6 +279,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
- `CUSTOM_URL_SCHEMES`: Use a comma separated list (ftp,git,svn) to indicate additional
URL hyperlinks to be rendered in Markdown. URLs beginning in http and https are
always displayed
- `FILE_EXTENSIONS`: **.md,.markdown,.mdown,.mkd,.livemd**: List of file extensions that should be rendered/edited as Markdown. Separate the extensions with a comma. To render files without any extension as markdown, just put a comma.
- `ENABLE_MATH`: **true**: Enables detection of `\(...\)`, `\[...\]`, `$...$` and `$$...$$` blocks as math blocks.
## Server (`server`)
@@ -1204,7 +1207,6 @@ in this mapping or the filetype using heuristics.
## Time (`time`)
- `FORMAT`: Time format to display on UI. i.e. RFC1123 or 2006-01-02 15:04:05
- `DEFAULT_UI_LOCATION`: Default location of time on the UI, so that we can display correct user's time on UI. i.e. Asia/Shanghai
## Task (`task`)
@@ -1249,6 +1251,7 @@ Task queue configuration has been moved to `queue.task`. However, the below conf
- `LIMIT_SIZE_CONAN`: **-1**: Maximum size of a Conan upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_CONDA`: **-1**: Maximum size of a Conda upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_CONTAINER`: **-1**: Maximum size of a Container upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_DEBIAN`: **-1**: Maximum size of a Debian upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_GENERIC`: **-1**: Maximum size of a Generic upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_HELM`: **-1**: Maximum size of a Helm upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_MAVEN`: **-1**: Maximum size of a Maven upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
@@ -5,6 +5,8 @@ slug: "config-cheat-sheet"
weight: 30
toc: false
draft: false
aliases:
- /zh-cn/config-cheat-sheet
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "customizing-gitea"
weight: 100
toc: false
draft: false
aliases:
- /en-us/customizing-gitea
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "customizing-gitea"
weight: 100
toc: false
draft: false
aliases:
- /zh-cn/customizing-gitea
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "email-setup"
weight: 12
toc: false
draft: false
aliases:
- /en-us/email-setup
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "environment-variables"
weight: 10
toc: false
draft: false
aliases:
- /en-us/environment-variables
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "environment-variables"
weight: 10
toc: false
draft: false
aliases:
- /zh-cn/environment-variables
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "external-renderers"
weight: 60
toc: false
draft: false
aliases:
- /en-us/external-renderers
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "fail2ban-setup"
weight: 16
toc: false
draft: false
aliases:
- /en-us/fail2ban-setup
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "fail2ban-setup"
weight: 16
toc: false
draft: false
aliases:
- /zh-cn/fail2ban-setup
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "git-lfs-setup"
weight: 12
toc: false
draft: false
aliases:
- /en-us/git-lfs-setup
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "https-setup"
weight: 12
toc: false
draft: false
aliases:
- /en-us/https-setup
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "logging-configuration"
weight: 40
toc: false
draft: false
aliases:
- /en-us/logging-configuration
menu:
sidebar:
parent: "administration"
@@ -29,7 +31,7 @@ As mentioned below, there is a fully functional log output by default, so it is
## Collecting Logs for Help
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/support.en-us.md" >}}).
## The `[log]` section
@@ -5,6 +5,8 @@ slug: "mail-templates"
weight: 45
toc: false
draft: false
aliases:
- /en-us/mail-templates
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "repo-indexer"
weight: 45
toc: false
draft: false
aliases:
- /en-us/repo-indexer
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "reverse-proxies"
weight: 16
toc: false
draft: false
aliases:
- /en-us/reverse-proxies
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "reverse-proxies"
weight: 16
toc: false
draft: false
aliases:
- /zh-cn/reverse-proxies
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "search-engines-indexation"
weight: 60
toc: false
draft: false
aliases:
- /en-us/search-engines-indexation
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "signing"
weight: 50
toc: false
draft: false
aliases:
- /en-us/signing
menu:
sidebar:
parent: "administration"
@@ -5,6 +5,8 @@ slug: "guidelines-backend"
weight: 20
toc: false
draft: false
aliases:
- /en-us/guidelines-backend
menu:
sidebar:
parent: "contributing"
@@ -5,6 +5,8 @@ slug: "guidelines-frontend"
weight: 20
toc: false
draft: false
aliases:
- /en-us/guidelines-frontend
menu:
sidebar:
parent: "contributing"
@@ -5,6 +5,8 @@ slug: "guidelines-refactoring"
weight: 20
toc: false
draft: false
aliases:
- /en-us/guidelines-refactoring
menu:
sidebar:
parent: "contributing"
@@ -5,6 +5,8 @@ slug: "localization"
weight: 10
toc: false
draft: false
aliases:
- /en-us/localization
menu:
sidebar:
parent: "contributing"
@@ -5,6 +5,8 @@ slug: "localization"
weight: 20
toc: false
draft: false
aliases:
- /zh-cn/localization
menu:
sidebar:
parent: "contributing"
@@ -5,6 +5,8 @@ slug: "localization"
weight: 20
toc: false
draft: false
aliases:
- /zh-tw/localization
menu:
sidebar:
parent: "contributing"
@@ -5,6 +5,8 @@ slug: "api-usage"
weight: 40
toc: false
draft: false
aliases:
- /en-us/api-usage
menu:
sidebar:
parent: "development"
@@ -5,6 +5,8 @@ slug: "api-usage"
weight: 40
toc: false
draft: false
aliases:
- /zh-cn/api-usage
menu:
sidebar:
parent: "development"
@@ -5,6 +5,8 @@ slug: "hacking-on-gitea"
weight: 10
toc: false
draft: false
aliases:
- /en-us/hacking-on-gitea
menu:
sidebar:
parent: "development"
@@ -5,6 +5,8 @@ slug: "hacking-on-gitea"
weight: 10
toc: false
draft: false
aliases:
- /zh-cn/hacking-on-gitea
menu:
sidebar:
parent: "development"
@@ -5,6 +5,8 @@ slug: "integrations"
weight: 65
toc: false
draft: false
aliases:
- /en-us/integrations
menu:
sidebar:
parent: "development"
@@ -5,6 +5,8 @@ slug: "integrations"
weight: 65
toc: false
draft: false
aliases:
- /zh-tw/integrations
menu:
sidebar:
parent: "development"
@@ -5,6 +5,8 @@ slug: "migrations-interfaces"
weight: 55
toc: false
draft: false
aliases:
- /en-us/migrations-interfaces
menu:
sidebar:
parent: "development"
@@ -5,6 +5,8 @@ slug: "migrations-interfaces"
weight: 55
toc: false
draft: false
aliases:
- /zh-tw/migrations-interfaces
menu:
sidebar:
parent: "development"
@@ -5,6 +5,8 @@ slug: "oauth2-provider"
weight: 41
toc: false
draft: false
aliases:
- /en-us/oauth2-provider
menu:
sidebar:
parent: "development"
@@ -5,6 +5,8 @@ slug: "oauth2-provider"
weight: 41
toc: false
draft: false
aliases:
- /zh-cn/oauth2-provider
menu:
sidebar:
parent: "development"
@@ -5,6 +5,8 @@ slug: "oauth2-provider"
weight: 41
toc: false
draft: false
aliases:
- /zh-tw/oauth2-provider
menu:
sidebar:
parent: "development"
+4 -2
View File
@@ -5,6 +5,8 @@ slug: "faq"
weight: 5
toc: false
draft: false
aliases:
- /en-us/faq
menu:
sidebar:
parent: "help"
@@ -17,7 +19,7 @@ menu:
This page contains some common questions and answers.
For more help resources, check all [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
For more help resources, check all [Support Options]({{< relref "doc/help/support.en-us.md" >}}).
**Table of Contents**
@@ -408,7 +410,7 @@ Stdout on systemd goes to the journal by default. Try using `journalctl`, `journ
Similarly, stdout on docker can be viewed using `docker logs <container>`.
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/seek-help.en-us.md" >}}).
To collect logs for help and issue report, see [Support Options]({{< relref "doc/help/support.en-us.md" >}}).
## Initial logging
@@ -1,16 +1,18 @@
---
date: "2018-05-21T15:00:00+00:00"
title: "Support Options"
slug: "seek-help"
slug: "support"
weight: 20
toc: false
draft: false
aliases:
- /en-us/seek-help
menu:
sidebar:
parent: "help"
name: "Support Options"
weight: 20
identifier: "seek-help"
identifier: "support"
---
# Support Options
@@ -1,16 +1,18 @@
---
date: "2017-01-20T15:00:00+08:00"
title: "需要帮助"
slug: "seek-help"
slug: "support"
weight: 20
toc: false
draft: false
aliases:
- /zh-cn/seek-help
menu:
sidebar:
parent: "help"
name: "需要帮助"
weight: 20
identifier: "seek-help"
identifier: "support"
---
## 需要帮助?
@@ -1,16 +1,18 @@
---
date: "2018-05-21T15:00:00+00:00"
title: "取得協助"
slug: "seek-help"
slug: "support"
weight: 20
toc: false
draft: false
aliases:
- /zh-tw/seek-help
menu:
sidebar:
parent: "help"
name: "取得協助"
weight: 20
identifier: "seek-help"
identifier: "support"
---
# 取得協助
@@ -5,6 +5,8 @@ slug: "comparison"
weight: 5
toc: false
draft: false
aliases:
- /en-us/comparison
menu:
sidebar:
name: "Comparison"
@@ -5,6 +5,8 @@ slug: "comparison"
weight: 5
toc: false
draft: false
aliases:
- /zh-cn/comparison
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "comparison"
weight: 5
toc: false
draft: false
aliases:
- /zh-tw/comparison
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "database-prep"
weight: 10
toc: false
draft: false
aliases:
- /en-us/database-prep
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-from-binary"
weight: 15
toc: false
draft: false
aliases:
- /en-us/install-from-binary
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-from-binary"
weight: 15
toc: false
draft: false
aliases:
- /fr-fr/install-from-binary
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-from-binary"
weight: 15
toc: false
draft: false
aliases:
- /zh-cn/install-from-binary
menu:
sidebar:
parent: "installation"
@@ -161,4 +163,4 @@ GITEA_WORK_DIR=/var/lib/gitea/ /usr/local/bin/gitea web -c /etc/gitea/app.ini
> 更多经验总结,请参考英文版 [Troubleshooting](/en-us/install-from-binary/#troubleshooting)
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "support.zh-cn.md" >}})
@@ -5,6 +5,8 @@ slug: "install-from-binary"
weight: 15
toc: false
draft: false
aliases:
- /zh-tw/install-from-binary
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-from-package"
weight: 20
toc: false
draft: false
aliases:
- /en-us/install-from-package
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-from-package"
weight: 20
toc: false
draft: false
aliases:
- /fr-fr/install-from-package
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-from-package"
weight: 20
toc: false
draft: false
aliases:
- /zh-cn/install-from-package
menu:
sidebar:
parent: "installation"
@@ -107,4 +109,4 @@ make install clean
## 需要帮助?
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "support.zh-cn.md" >}})
@@ -5,6 +5,8 @@ slug: "install-from-package"
weight: 20
toc: false
draft: false
aliases:
- /zh-tw/install-from-package
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-from-source"
weight: 30
toc: false
draft: false
aliases:
- /en-us/install-from-source
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-from-source"
weight: 30
toc: false
draft: false
aliases:
- /fr-fr/install-from-source
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-from-source"
weight: 30
toc: false
draft: false
aliases:
- /zh-cn/install-from-source
menu:
sidebar:
parent: "installation"
@@ -104,4 +106,4 @@ CC=aarch64-unknown-linux-gnu-gcc GOOS=linux GOARCH=arm64 TAGS="bindata sqlite sq
## 需要帮助?
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}})
如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "support.zh-cn.md" >}})
@@ -5,6 +5,8 @@ slug: "install-from-source"
weight: 30
toc: false
draft: false
aliases:
- /zh-tw/install-from-source
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-on-cloud-provider"
weight: 90
toc: false
draft: false
aliases:
- /en-us/install-on-cloud-provider
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-on-kubernetes"
weight: 80
toc: false
draft: false
aliases:
- /en-us/install-on-kubernetes
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-on-kubernetes"
weight: 80
toc: false
draft: false
aliases:
- /zh-cn/install-on-kubernetes
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "install-on-kubernetes"
weight: 80
toc: false
draft: false
aliases:
- /zh-tw/install-on-kubernetes
menu:
sidebar:
parent: "installation"
@@ -5,6 +5,8 @@ slug: "linux-service"
weight: 40
toc: false
draft: false
aliases:
- /en-us/linux-service
menu:
sidebar:
parent: "installation"

Some files were not shown because too many files have changed in this diff Show More