Skip to content

Commit eddeb3f

Browse files
committed
Merge remote-tracking branch 'origin/main' into acticons
* origin/main: (41 commits) refactor: only reset a database table when the table's data was changed (go-gitea#37573) refactor: lint bare `fill`/`stroke` colors, add vars for git graph color series (go-gitea#37543) fix(actions): report individual step status in workflow job API response (go-gitea#37592) ci: allow `chore` type in PR title lint (go-gitea#37575) refactor: remove obsolete export (go-gitea#37579) fix: Invalid UTF-8 commit messages in JSON API responses (go-gitea#37542) fix: use consistent GetUser family functions (go-gitea#37553) fix(api): return 409 message instead of empty JSON for wrong commit id (go-gitea#37572) fix(actions): prevent panic when workflow contains null jobs (go-gitea#37570) [skip ci] Updated translations via Crowdin refactor: use modernc sqlite driver as default (go-gitea#37562) refactor(templates): remove ctxData from tmpl files, use ctx.RootData instead (go-gitea#37567) ci: increase renovate frequency and fix RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS (go-gitea#37565) fix(deps): update go dependencies (go-gitea#37541) refactor(deps): migrate from `nektos/act` fork to `gitea/runner` (go-gitea#37557) ci: lint PR titles with commitlint (go-gitea#37498) Make ServeSetHeaders default to download attachment if filename exists (go-gitea#37552) fix(actions): validate workflow param to prevent 500 error (go-gitea#37546) Fix various problems (go-gitea#37547) docs: fix 4 typos in CHANGELOG.md (go-gitea#37549) ... # Conflicts: # templates/repo/actions/runs_list.tmpl # templates/repo/issue/view_content/pull_merge_box.tmpl # templates/repo/pulls/status.tmpl
2 parents 95d29a7 + 2b93eaf commit eddeb3f

430 files changed

Lines changed: 5919 additions & 4335 deletions

File tree

Some content is hidden

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

.github/pull_request_template.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<!-- start tips -->
22
Please check the following:
33
1. Make sure you are targeting the `main` branch, pull requests on release branches are only allowed for backports.
4-
2. Make sure you have read contributing guidelines: https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md .
5-
3. For documentations contribution, please go to https://gitea.com/gitea/docs
6-
4. Describe what your pull request does and which issue you're targeting (if any).
7-
5. It is recommended to enable "Allow edits by maintainers", so maintainers can help more easily.
8-
6. Your input here will be included in the commit message when this PR has been merged. If you don't want some content to be included, please separate them with a line like `---`.
9-
7. Delete all these tips before posting.
4+
2. Use a Conventional Commits PR title, for example `fix(repo): handle empty branch names`.
5+
3. Make sure you have read contributing guidelines: https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md .
6+
4. For documentations contribution, please go to https://gitea.com/gitea/docs
7+
5. Describe what your pull request does and which issue you're targeting (if any).
8+
6. It is recommended to enable "Allow edits by maintainers", so maintainers can help more easily.
9+
7. Your input here will be included in the commit message when this PR has been merged. If you don't want some content to be included, please separate them with a line like `---`.
10+
8. Delete all these tips before posting.
1011
<!-- end tips -->

.github/workflows/cache-seeder.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,17 @@ jobs:
4545
cache-name: seed
4646
- run: make deps-backend
4747
- run: TAGS="bindata" make backend
48-
- run: TAGS="bindata sqlite sqlite_unlock_notify" make backend
49-
- run: TAGS="bindata gogit sqlite sqlite_unlock_notify" GOEXPERIMENT="" make backend
48+
- run: TAGS="bindata gogit" GOEXPERIMENT="" make backend
5049

5150
lint:
5251
runs-on: ubuntu-latest
5352
strategy:
5453
fail-fast: false
5554
matrix:
5655
include:
57-
- { job: lint-backend, tags: "bindata sqlite sqlite_unlock_notify", target: "lint-backend" }
58-
- { job: lint-go-windows, tags: "bindata sqlite sqlite_unlock_notify", target: "lint-go-windows" }
59-
- { job: lint-go-gogit, tags: "bindata gogit sqlite sqlite_unlock_notify", target: "lint-go" }
56+
- { job: lint-backend, tags: "bindata", target: "lint-backend" }
57+
- { job: lint-go-windows, tags: "bindata", target: "lint-go-windows" }
58+
- { job: lint-go-gogit, tags: "bindata gogit", target: "lint-go" }
6059
steps:
6160
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6261
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0

.github/workflows/cron-renovate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: cron-renovate
22

33
on:
44
schedule:
5-
- cron: "0 1 * * *" # daily at 01:00 UTC
5+
- cron: "23 * * * *" # hourly at :23
66
workflow_dispatch:
77

88
concurrency:
@@ -21,12 +21,12 @@ jobs:
2121
timeout-minutes: 30
2222
steps:
2323
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24-
- uses: renovatebot/github-action@83ec54fee49ab67d9cd201084c1ff325b4b462e4 # v46.1.10
24+
- uses: renovatebot/github-action@f66d8679fcfcfa051abde6e7a623007173bf5164 # v46.1.12
2525
with:
2626
renovate-version: ${{ env.RENOVATE_VERSION }}
2727
configurationFile: renovate.json5
2828
token: ${{ secrets.RENOVATE_TOKEN }}
2929
env:
3030
RENOVATE_BINARY_SOURCE: install # auto-install go/node toolchains needed by post-upgrade tasks.
31-
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^make (tidy|svg)$"]'
31+
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '["^make (tidy|svg nolyfill)$"]'
3232
RENOVATE_REPOSITORIES: '["go-gitea/gitea"]'

.github/workflows/pull-compliance.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- run: make deps-backend deps-tools
3333
- run: make lint-backend
3434
env:
35-
TAGS: bindata sqlite sqlite_unlock_notify
35+
TAGS: bindata
3636

3737
lint-on-demand:
3838
needs: files-changed
@@ -82,7 +82,7 @@ jobs:
8282
- run: make deps-backend deps-tools
8383
- run: make lint-go-windows
8484
env:
85-
TAGS: bindata sqlite sqlite_unlock_notify
85+
TAGS: bindata
8686
GOOS: windows
8787
GOARCH: amd64
8888

@@ -104,7 +104,7 @@ jobs:
104104
- run: make deps-backend deps-tools
105105
- run: make lint-go
106106
env:
107-
TAGS: bindata gogit sqlite sqlite_unlock_notify
107+
TAGS: bindata gogit
108108

109109
checks-backend:
110110
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
minio:
3535
# as github actions doesn't support "entrypoint", we need to use a non-official image
3636
# that has a custom entrypoint set to "minio server /data"
37-
image: bitnamilegacy/minio:2023.8.31
37+
image: bitnamilegacy/minio:2023.12.23
3838
env:
3939
MINIO_ROOT_USER: 123456
4040
MINIO_ROOT_PASSWORD: 12345678
@@ -62,6 +62,8 @@ jobs:
6262
run: GITEA_TEST_DATABASE=pgsql make test-integration
6363
timeout-minutes: 50
6464
env:
65+
# pgsql is chosen to be the unlucky one to run with the slow "race detector", it is about 60% slower.
66+
GOTEST_FLAGS: -race -timeout=40m
6567
TAGS: bindata gogit
6668
TEST_LDAP: 1
6769

@@ -82,7 +84,7 @@ jobs:
8284
- run: make deps-backend
8385
- run: make backend
8486
env:
85-
TAGS: bindata gogit sqlite sqlite_unlock_notify
87+
TAGS: bindata gogit
8688
GOEXPERIMENT:
8789
- name: run migration tests
8890
run: GITEA_TEST_DATABASE=sqlite make test-migration
@@ -92,19 +94,21 @@ jobs:
9294
run: GITEA_TEST_DATABASE=sqlite make test-integration
9395
timeout-minutes: 50
9496
env:
97+
# sqlite driver can contain large amount of Golang code, so don't use race detector for it, otherwise, extremely slow
98+
GOTEST_FLAGS: -timeout=40m
9599
TAGS: bindata gogit
96100
GOEXPERIMENT:
97-
GOTEST_FLAGS: -race -timeout=40m
98101

99102
test-unit:
100103
if: needs.files-changed.outputs.backend == 'true' || needs.files-changed.outputs.actions == 'true'
101104
needs: files-changed
102105
runs-on: ubuntu-latest
103106
services:
104107
elasticsearch:
105-
image: elasticsearch:7.5.0
108+
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.14
106109
env:
107110
discovery.type: single-node
111+
xpack.security.enabled: false
108112
ports:
109113
- "9200:9200"
110114
meilisearch:
@@ -123,7 +127,7 @@ jobs:
123127
ports:
124128
- 6379:6379
125129
minio:
126-
image: bitnamilegacy/minio:2021.3.17
130+
image: bitnamilegacy/minio:2021.12.29
127131
env:
128132
MINIO_ACCESS_KEY: 123456
129133
MINIO_SECRET_KEY: 12345678
@@ -153,15 +157,15 @@ jobs:
153157
- name: unit-tests
154158
run: make test-backend test-check
155159
env:
156-
TAGS: bindata sqlite sqlite_unlock_notify
157160
GOTEST_FLAGS: -race -timeout=20m
161+
TAGS: bindata
158162
GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }}
159163
- name: unit-tests-gogit
160164
run: make test-backend test-check
161165
env:
162-
TAGS: bindata gogit sqlite sqlite_unlock_notify
163-
GOEXPERIMENT:
164166
GOTEST_FLAGS: -race -timeout=20m
167+
TAGS: bindata gogit
168+
GOEXPERIMENT:
165169
GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }}
166170

167171
test-mysql:
@@ -171,7 +175,7 @@ jobs:
171175
services:
172176
mysql:
173177
# the bitnami mysql image has more options than the official one, it's easier to customize
174-
image: bitnamilegacy/mysql:8.0
178+
image: bitnamilegacy/mysql:8.4
175179
env:
176180
ALLOW_EMPTY_PASSWORD: true
177181
MYSQL_DATABASE: testgitea
@@ -180,9 +184,10 @@ jobs:
180184
options: >-
181185
--mount type=tmpfs,destination=/bitnami/mysql/data
182186
elasticsearch:
183-
image: elasticsearch:7.5.0
187+
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.14
184188
env:
185189
discovery.type: single-node
190+
xpack.security.enabled: false
186191
ports:
187192
- "9200:9200"
188193
smtpimap:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ jobs:
4040
- run: make deps-backend
4141
- run: make backend
4242
env:
43-
TAGS: bindata sqlite sqlite_unlock_notify
43+
TAGS: bindata
4444
- run: make playwright
4545
- run: make test-e2e
4646
timeout-minutes: 10
4747
env:
48-
TAGS: bindata sqlite sqlite_unlock_notify
48+
TAGS: bindata
4949
FORCE_COLOR: 1
5050
GITEA_TEST_E2E_DEBUG: 1
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: pr-title
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- reopened
9+
- synchronize
10+
- ready_for_review
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
lint-pr-title:
21+
if: github.event.pull_request.draft == false
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 5
24+
steps:
25+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
26+
- run: make lint-pr-title
27+
env:
28+
PR_TITLE: ${{ github.event.pull_request.title }}

.github/workflows/release-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# xgo build
3333
- run: make release
3434
env:
35-
TAGS: bindata sqlite sqlite_unlock_notify
35+
TAGS: bindata
3636
- name: import gpg key
3737
id: import_gpg
3838
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0

.github/workflows/release-tag-rc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
# xgo build
3434
- run: make release
3535
env:
36-
TAGS: bindata sqlite sqlite_unlock_notify
36+
TAGS: bindata
3737
- name: import gpg key
3838
id: import_gpg
3939
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0

.github/workflows/release-tag-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
# xgo build
3737
- run: make release
3838
env:
39-
TAGS: bindata sqlite sqlite_unlock_notify
39+
TAGS: bindata
4040
- name: import gpg key
4141
id: import_gpg
4242
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0

0 commit comments

Comments
 (0)