Skip to content

Commit

Permalink
Merge remote-tracking branch 'giteaofficial/main'
Browse files Browse the repository at this point in the history
* giteaofficial/main: (26 commits)
  Refactor docs (go-gitea#23752)
  Fix layouts of admin table / adapt repo / email test  (go-gitea#24370)
  Move secrets and runners settings to actions settings (go-gitea#24200)
  Gitea Actions add `base_ref`, `head_ref`, `api_url`, `ref_type` fields (go-gitea#24356)
  Fix auth check bug (go-gitea#24382)
  Display 'Unknown' when runner.version is empty (go-gitea#24378)
  Fix incorrect last online time in runner_edit.tmpl (go-gitea#24376)
  Refactor "route" related code, fix Safari cookie bug (go-gitea#24330)
  Add custom helm repo name generated from url (go-gitea#24363)
  Add API for gitignore templates (go-gitea#22783)
  Add eslint-plugin-regexp (go-gitea#24361)
  Support uploading file to empty repo by API (go-gitea#24357)
  [skip ci] Updated translations via Crowdin
  Require repo scope for PATs for private repos and basic authentication (go-gitea#24362)
  Alert error message if open dependencies are included in the issues that try to batch close (go-gitea#24329)
  Fix 404 error when leaving the last private org team (go-gitea#24322)
  Modify width of ui container, fine tune css for settings pages and org header (go-gitea#24315)
  Add .livemd as a markdown extension (go-gitea#22730)
  Display when a repo was archived (go-gitea#22664)
  Fix wrong error info in RepoRefForAPI (go-gitea#24344)
  ...
  • Loading branch information
zjjhot committed Apr 28, 2023
2 parents 3be44b5 + bb25f85 commit 85e30e2
Show file tree
Hide file tree
Showing 287 changed files with 2,152 additions and 1,100 deletions.
75 changes: 75 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ plugins:
- eslint-plugin-no-jquery
- eslint-plugin-sonarjs
- eslint-plugin-custom-elements
- eslint-plugin-regexp

env:
es2022: true
Expand Down Expand Up @@ -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]
Expand Down
11 changes: 5 additions & 6 deletions custom/conf/app.example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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,

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down Expand Up @@ -1203,10 +1203,9 @@ ROUTER = console
;; Number of line of codes shown for a code comment
;CODE_COMMENT_LINES = 4
;;
;; Value of `theme-color` meta tag, used by Android >= 5.0
;; An invalid color like "none" or "disable" will have the default style
;; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
;THEME_COLOR_META_TAG = `#6cc644`
;; Value of `theme-color` meta tag, used by some mobile browers for chrome and
;; out-of-viewport areas. Default is unset which uses body color.
;THEME_COLOR_META_TAG =
;;
;; Max size of files to be displayed (default is 8MiB)
;MAX_DISPLAY_FILE_SIZE = 8388608
Expand Down Expand Up @@ -1335,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
Expand Down
4 changes: 2 additions & 2 deletions docs/assets/js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]]) {
Expand Down
2 changes: 1 addition & 1 deletion docs/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ enableEmoji: true

permalinks:
post: /:year/:month/:title/
doc: /:slug/
doc: /:sections[1:]/:slug/
page: /:slug/
default: /:slug/

Expand Down
Empty file.
Empty file.
Empty file.
2 changes: 2 additions & 0 deletions docs/content/doc/administration/adding-legal-pages.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: adding-legal-pages
weight: 110
toc: false
draft: false
aliases:
- /en-us/adding-legal-pages
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/backup-and-restore.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "backup-and-restore"
weight: 11
toc: false
draft: false
aliases:
- /en-us/backup-and-restore
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/backup-and-restore.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "backup-and-restore"
weight: 11
toc: false
draft: false
aliases:
- /zh-cn/backup-and-restore
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/backup-and-restore.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "backup-and-restore"
weight: 11
toc: false
draft: false
aliases:
- /zh-tw/backup-and-restore
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/cmd-embedded.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "cmd-embedded"
weight: 20
toc: false
draft: false
aliases:
- /en-us/cmd-embedded
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/command-line.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "command-line"
weight: 1
toc: false
draft: false
aliases:
- /en-us/command-line
menu:
sidebar:
parent: "administration"
Expand Down
7 changes: 5 additions & 2 deletions docs/content/doc/administration/config-cheat-sheet.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "config-cheat-sheet"
weight: 30
toc: false
draft: false
aliases:
- /en-us/config-cheat-sheet
menu:
sidebar:
parent: "administration"
Expand Down Expand Up @@ -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`)
Expand Down Expand Up @@ -220,7 +222,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
- `SHOW_USER_EMAIL`: **true**: Whether the email of the user should be shown in the Explore Users page.
- `THEMES`: **auto,gitea,arc-green**: All available themes. Allow users select personalized themes.
regardless of the value of `DEFAULT_THEME`.
- `THEME_COLOR_META_TAG`: **#6cc644**: Value of `theme-color` meta tag, used by Android >= 5.0. An invalid color like "none" or "disable" will have the default style. More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
- `THEME_COLOR_META_TAG`: **\<empty\>**: Value of `theme-color` meta tag, used by some mobile browers for chrome and out-of-viewport areas. Default is unset which uses body color.
- `MAX_DISPLAY_FILE_SIZE`: **8388608**: Max size of files to be displayed (default is 8MiB)
- `REACTIONS`: All available reactions users can choose on issues/prs and comments
Values can be emoji alias (:smile:) or a unicode emoji.
Expand Down Expand Up @@ -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`)
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/config-cheat-sheet.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "config-cheat-sheet"
weight: 30
toc: false
draft: false
aliases:
- /zh-cn/config-cheat-sheet
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/customizing-gitea.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "customizing-gitea"
weight: 100
toc: false
draft: false
aliases:
- /en-us/customizing-gitea
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/customizing-gitea.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "customizing-gitea"
weight: 100
toc: false
draft: false
aliases:
- /zh-cn/customizing-gitea
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/email-setup.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "email-setup"
weight: 12
toc: false
draft: false
aliases:
- /en-us/email-setup
menu:
sidebar:
parent: "administration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "environment-variables"
weight: 10
toc: false
draft: false
aliases:
- /en-us/environment-variables
menu:
sidebar:
parent: "administration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "environment-variables"
weight: 10
toc: false
draft: false
aliases:
- /zh-cn/environment-variables
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/external-renderers.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "external-renderers"
weight: 60
toc: false
draft: false
aliases:
- /en-us/external-renderers
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/fail2ban-setup.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "fail2ban-setup"
weight: 16
toc: false
draft: false
aliases:
- /en-us/fail2ban-setup
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/fail2ban-setup.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "fail2ban-setup"
weight: 16
toc: false
draft: false
aliases:
- /zh-cn/fail2ban-setup
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/git-lfs-support.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "git-lfs-setup"
weight: 12
toc: false
draft: false
aliases:
- /en-us/git-lfs-setup
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/https-support.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "https-setup"
weight: 12
toc: false
draft: false
aliases:
- /en-us/https-setup
menu:
sidebar:
parent: "administration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "logging-configuration"
weight: 40
toc: false
draft: false
aliases:
- /en-us/logging-configuration
menu:
sidebar:
parent: "administration"
Expand All @@ -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

Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/mail-templates.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "mail-templates"
weight: 45
toc: false
draft: false
aliases:
- /en-us/mail-templates
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/repo-indexer.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "repo-indexer"
weight: 45
toc: false
draft: false
aliases:
- /en-us/repo-indexer
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/reverse-proxies.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "reverse-proxies"
weight: 16
toc: false
draft: false
aliases:
- /en-us/reverse-proxies
menu:
sidebar:
parent: "administration"
Expand Down
2 changes: 2 additions & 0 deletions docs/content/doc/administration/reverse-proxies.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "reverse-proxies"
weight: 16
toc: false
draft: false
aliases:
- /zh-cn/reverse-proxies
menu:
sidebar:
parent: "administration"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ slug: "search-engines-indexation"
weight: 60
toc: false
draft: false
aliases:
- /en-us/search-engines-indexation
menu:
sidebar:
parent: "administration"
Expand Down
Loading

0 comments on commit 85e30e2

Please sign in to comment.