Skip to content

Commit e336a1e

Browse files
committed
Merge branch 'main' into milestone-labels
* main: (90 commits) Refactor rename user and rename organization (go-gitea#24052) Use `CommentList` instead of `[]*Comment` (go-gitea#24828) Fix topics deleted via API not being deleted in org page (go-gitea#24825) Return `404` in the API if the requested webhooks were not found (go-gitea#24823) Decouple the different contexts from each other (go-gitea#24786) [skip ci] Updated translations via Crowdin Add RTL rendering support to Markdown (go-gitea#24816) [skip ci] Updated translations via Crowdin Update JS dependencies (go-gitea#24815) Fix duplicate tooltip hiding (go-gitea#24814) Mute repo names in dashboard repo list (go-gitea#24811) Rework label colors (go-gitea#24790) Fix max width and margin of comment box on conversation page (go-gitea#24809) Allow all URL schemes in Markdown links by default (go-gitea#24805) Some refactors for issues stats (go-gitea#24793) Implement actions artifacts (go-gitea#22738) Fix Actions being enabled accidentally (go-gitea#24802) Change `add_on` in `keys_ssh.tmpl` (go-gitea#24803) replace `drone exec` to `act_runner exec` in test README.md (go-gitea#24791) Fix OAuth loading state (go-gitea#24788) ...
2 parents c71bbd8 + c59a057 commit e336a1e

File tree

326 files changed

+10413
-6443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+10413
-6443
lines changed

.eslintrc.yaml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ parserOptions:
99
ecmaVersion: latest
1010

1111
plugins:
12-
- eslint-plugin-unicorn
12+
- "@eslint-community/eslint-plugin-eslint-comments"
13+
- eslint-plugin-array-func
14+
- eslint-plugin-custom-elements
1315
- eslint-plugin-import
1416
- eslint-plugin-jquery
1517
- eslint-plugin-no-jquery
16-
- eslint-plugin-sonarjs
17-
- eslint-plugin-custom-elements
18+
- eslint-plugin-no-use-extend-native
1819
- eslint-plugin-regexp
20+
- eslint-plugin-sonarjs
21+
- eslint-plugin-unicorn
22+
- eslint-plugin-wc
1923

2024
env:
2125
es2022: true
@@ -43,11 +47,26 @@ overrides:
4347
import/no-unused-modules: [0]
4448

4549
rules:
50+
"@eslint-community/eslint-comments/disable-enable-pair": [2]
51+
"@eslint-community/eslint-comments/no-aggregating-enable": [2]
52+
"@eslint-community/eslint-comments/no-duplicate-disable": [2]
53+
"@eslint-community/eslint-comments/no-restricted-disable": [0]
54+
"@eslint-community/eslint-comments/no-unlimited-disable": [2]
55+
"@eslint-community/eslint-comments/no-unused-disable": [2]
56+
"@eslint-community/eslint-comments/no-unused-enable": [2]
57+
"@eslint-community/eslint-comments/no-use": [0]
58+
"@eslint-community/eslint-comments/require-description": [0]
4659
accessor-pairs: [2]
4760
array-bracket-newline: [0]
4861
array-bracket-spacing: [2, never]
4962
array-callback-return: [2, {checkForEach: true}]
5063
array-element-newline: [0]
64+
array-func/avoid-reverse: [2]
65+
array-func/from-map: [2]
66+
array-func/no-unnecessary-this-arg: [2]
67+
array-func/prefer-array-from: [2]
68+
array-func/prefer-flat-map: [0] # handled by unicorn/prefer-array-flat-map
69+
array-func/prefer-flat: [0] # handled by unicorn/prefer-array-flat
5170
arrow-body-style: [0]
5271
arrow-parens: [2, always]
5372
arrow-spacing: [2, {before: true, after: true}]
@@ -433,6 +452,7 @@ rules:
433452
no-unused-private-class-members: [2]
434453
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
435454
no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
455+
no-use-extend-native/no-use-extend-native: [2]
436456
no-useless-backreference: [2]
437457
no-useless-call: [2]
438458
no-useless-catch: [2]
@@ -717,6 +737,15 @@ rules:
717737
use-isnan: [2]
718738
valid-typeof: [2, {requireStringLiterals: true}]
719739
vars-on-top: [0]
740+
wc/attach-shadow-constructor: [2]
741+
wc/guard-super-call: [2]
742+
wc/no-closed-shadow-root: [2]
743+
wc/no-constructor-attributes: [2]
744+
wc/no-constructor-params: [2]
745+
wc/no-invalid-element-name: [0] # covered by custom-elements/valid-tag-name
746+
wc/no-self-class: [2]
747+
wc/no-typos: [2]
748+
wc/require-listener-teardown: [2]
720749
wrap-iife: [2, inside]
721750
wrap-regex: [0]
722751
yield-star-spacing: [2, after]

.github/workflows/cron-licenses.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66

77
jobs:
88
cron-licenses:
9-
if: github.repository == "go-gitea/gitea"
109
runs-on: ubuntu-latest
10+
if: github.repository == 'go-gitea/gitea'
1111
steps:
1212
- uses: actions/checkout@v3
1313
- uses: actions/setup-go@v3

.github/workflows/cron-lock.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ concurrency:
1515
jobs:
1616
action:
1717
runs-on: ubuntu-latest
18+
if: github.repository == 'go-gitea/gitea'
1819
steps:
1920
- uses: dessant/lock-threads@v4
2021
with:

.github/workflows/cron-translations.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
jobs:
88
crowdin-pull:
99
runs-on: ubuntu-latest
10+
if: github.repository == 'go-gitea/gitea'
1011
steps:
1112
- uses: actions/checkout@v3
1213
- name: download from crowdin
@@ -31,13 +32,15 @@ jobs:
3132
ssh_key: ${{ secrets.DEPLOY_KEY }}
3233
crowdin-push:
3334
runs-on: ubuntu-latest
35+
if: github.repository == 'go-gitea/gitea'
3436
steps:
3537
- uses: actions/checkout@v3
3638
- name: push translations to crowdin
3739
uses: docker://jonasfranz/crowdin
3840
env:
3941
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }}
4042
PLUGIN_UPLOAD: true
43+
PLUGIN_EXPORT_DIR: options/locale/
4144
PLUGIN_IGNORE_BRANCH: true
4245
PLUGIN_PROJECT_IDENTIFIER: gitea
4346
PLUGIN_FILES: |
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: compliance
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "docs/**"
7+
- "*.md"
8+
9+
jobs:
10+
compliance-docs:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- run: echo "No build required"
14+
15+
lint-backend:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- run: echo "No build required"
19+
20+
lint-go-windows:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- run: echo "No build required"
24+
25+
lint-go-gogit:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- run: echo "No build required"
29+
30+
checks-backend:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- run: echo "No build required"
34+
35+
frontend:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- run: echo "No build required"
39+
40+
backend:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- run: echo "No build required"

.github/workflows/pull-compliance.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: compliance
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- "docs/**"
7+
- "*.md"
48

59
concurrency:
610
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: db-tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "docs/**"
7+
- "*.md"
8+
9+
jobs:
10+
test-pgsql:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- run: echo "No build required"
14+
15+
test-sqlite:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- run: echo "No build required"
19+
20+
test-unit:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- run: echo "No build required"
24+
25+
test-mysql5:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- run: echo "No build required"
29+
30+
test-mysql8:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- run: echo "No build required"
34+
35+
test-mssql:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- run: echo "No build required"

.github/workflows/pull-db-tests.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: db-tests
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- "docs/**"
7+
- "*.md"
48

59
concurrency:
610
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -37,7 +41,7 @@ jobs:
3741
with:
3842
go-version: ">=1.20.0"
3943
- name: Add hosts to /etc/hosts
40-
run: echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts
44+
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 pgsql ldap minio" | sudo tee -a /etc/hosts'
4145
- run: make deps-backend
4246
- run: make backend
4347
env:
@@ -102,13 +106,20 @@ jobs:
102106
--health-retries 10
103107
ports:
104108
- 6379:6379
109+
minio:
110+
image: bitnami/minio:2021.3.17
111+
env:
112+
MINIO_ACCESS_KEY: 123456
113+
MINIO_SECRET_KEY: 12345678
114+
ports:
115+
- "9000:9000"
105116
steps:
106117
- uses: actions/checkout@v3
107118
- uses: actions/setup-go@v4
108119
with:
109120
go-version: ">=1.20.0"
110121
- name: Add hosts to /etc/hosts
111-
run: echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts
122+
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
112123
- run: make deps-backend
113124
- run: make backend
114125
env:
@@ -155,7 +166,7 @@ jobs:
155166
with:
156167
go-version: ">=1.20.0"
157168
- name: Add hosts to /etc/hosts
158-
run: echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts
169+
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
159170
- run: make deps-backend
160171
- run: make backend
161172
env:
@@ -184,7 +195,7 @@ jobs:
184195
with:
185196
go-version: ">=1.20.0"
186197
- name: Add hosts to /etc/hosts
187-
run: echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts
198+
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql8" | sudo tee -a /etc/hosts'
188199
- run: make deps-backend
189200
- run: make backend
190201
env:
@@ -212,7 +223,7 @@ jobs:
212223
with:
213224
go-version: ">=1.20.0"
214225
- name: Add hosts to /etc/hosts
215-
run: echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts
226+
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mssql" | sudo tee -a /etc/hosts'
216227
- run: make deps-backend
217228
- run: make backend
218229
env:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: docker-dryrun
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "docs/**"
7+
- "*.md"
8+
9+
jobs:
10+
docker-dryrun:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- run: echo "No build required"

.github/workflows/pull-docker-dryrun.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: docker-dryrun
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- "docs/**"
7+
- "*.md"
48

59
concurrency:
610
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: e2e-tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "docs/**"
7+
- "*.md"
8+
9+
jobs:
10+
test-e2e:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- run: echo "No build required"

.github/workflows/pull-e2e-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: e2e-tests
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
5+
paths-ignore:
6+
- "docs/**"
7+
- "*.md"
48

59
concurrency:
610
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

.stylelintrc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ignoreFiles:
55
- "**/*.go"
66

77
overrides:
8-
- files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console/*"]
8+
- files: ["**/chroma/*", "**/codemirror/*", "**/standalone/*", "**/console.css"]
99
rules:
1010
scale-unlimited/declaration-strict-value: null
1111
- files: ["**/chroma/*", "**/codemirror/*"]

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Build stage
2-
FROM docker.io/library/golang:1.20-alpine3.17 AS build-env
2+
FROM docker.io/library/golang:1.20-alpine3.18 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY ${GOPROXY:-direct}
@@ -23,7 +23,7 @@ RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
2323
# Begin env-to-ini build
2424
RUN go build contrib/environment-to-ini/environment-to-ini.go
2525

26-
FROM docker.io/library/alpine:3.17
26+
FROM docker.io/library/alpine:3.18
2727
LABEL maintainer="[email protected]"
2828

2929
EXPOSE 22 3000

Dockerfile.rootless

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Build stage
2-
FROM docker.io/library/golang:1.20-alpine3.17 AS build-env
2+
FROM docker.io/library/golang:1.20-alpine3.18 AS build-env
33

44
ARG GOPROXY
55
ENV GOPROXY ${GOPROXY:-direct}
@@ -23,7 +23,7 @@ RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \
2323
# Begin env-to-ini build
2424
RUN go build contrib/environment-to-ini/environment-to-ini.go
2525

26-
FROM docker.io/library/alpine:3.17
26+
FROM docker.io/library/alpine:3.18
2727
LABEL maintainer="[email protected]"
2828

2929
EXPOSE 2222 3000

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ Eddie Yang <[email protected]> (@yp05327)
5050
Dong Ge <[email protected]> (@sillyguodong)
5151
Xinyi Gong <[email protected]> (@HesterG)
5252
wxiaoguang <[email protected]> (@wxiaoguang)
53+
Gary Moon <[email protected]> (@garymoon)

0 commit comments

Comments
 (0)