Skip to content

Commit 7029e14

Browse files
committed
Merge remote-tracking branch 'giteaoffical/main'
* giteaoffical/main: (32 commits) Hide file borders on sticky diff box (go-gitea#22217) Test views of LFS files (go-gitea#22196) update docs latest to 1.17.4 Frontport 1.17.4 changelog (go-gitea#22216) Remove test session cache to reduce possible concurrent problem (go-gitea#22199) Upgrade hugo to 0.82 (go-gitea#22209) Fix container layer display overflow (go-gitea#22208) Run hugo via `go run` and lock its version (go-gitea#22206) Update bleve and zapx to fix unaligned atomic (go-gitea#22031) Allow empty assignees on pull request edit (go-gitea#22150) Add Feed for Releases and Tags (go-gitea#21696) fix: update libcurl in docs pipeline (go-gitea#22203) Fixed colour transparency regex matching in project board sorting (go-gitea#22091) (go-gitea#22092) Mobile fix for Project view: Add delay to Sortable.js on mobile, to ensure scrolling is possible. (go-gitea#22152) Normalize NuGet package version on upload (go-gitea#22186) Attempt to fix TestExportUserGPGKeys (go-gitea#22159) Specify ID in `TestAPITeam` (go-gitea#22192) Repair LFS web rendering. (go-gitea#22195) Fix misc whitespace issues in install docs (go-gitea#22189) Update JS dependencies and eslint (go-gitea#22190) ...
2 parents 8dc1017 + 41f0668 commit 7029e14

File tree

98 files changed

+2953
-1519
lines changed

Some content is hidden

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

98 files changed

+2953
-1519
lines changed

.drone.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ steps:
551551

552552
# TODO: We should probably build all dependencies into a test image
553553
- name: test-e2e
554-
image: mcr.microsoft.com/playwright:v1.28.0-focal
554+
image: mcr.microsoft.com/playwright:v1.29.0-focal
555555
commands:
556556
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
557557
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
@@ -928,10 +928,8 @@ trigger:
928928

929929
steps:
930930
- name: build-docs
931-
image: plugins/hugo:latest
932-
pull: always
931+
image: golang:1.19
933932
commands:
934-
- apk add --no-cache make bash curl
935933
- cd docs
936934
- make trans-copy clean build
937935

.eslintrc.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ rules:
255255
no-irregular-whitespace: [2]
256256
no-iterator: [2]
257257
no-label-var: [2]
258-
no-labels: [0]
258+
no-labels: [0] # handled by no-restricted-syntax
259259
no-lone-blocks: [2]
260260
no-lonely-if: [0]
261261
no-loop-func: [0]
@@ -335,7 +335,7 @@ rules:
335335
no-void: [2]
336336
no-warning-comments: [0]
337337
no-whitespace-before-property: [2]
338-
no-with: [0]
338+
no-with: [0] # handled by no-restricted-syntax
339339
nonblock-statement-body-position: [2]
340340
object-curly-newline: [0]
341341
object-curly-spacing: [2, never]
@@ -495,7 +495,7 @@ rules:
495495
unicorn/prefer-native-coercion-functions: [2]
496496
unicorn/prefer-negative-index: [2]
497497
unicorn/prefer-node-append: [0]
498-
unicorn/prefer-node-protocol: [0]
498+
unicorn/prefer-node-protocol: [2]
499499
unicorn/prefer-node-remove: [0]
500500
unicorn/prefer-number-properties: [0]
501501
unicorn/prefer-object-from-entries: [2]

CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,60 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.17.4](https://github.com/go-gitea/gitea/releases/tag/1.17.4) - 2022-12-21
8+
9+
* SECURITY
10+
* Do not allow Ghost access to limited visible user/org (#21849) (#21875)
11+
* Fix package access for admins and inactive users (#21580) (#21592)
12+
* ENHANCEMENTS
13+
* Fix button in branch list, avoid unexpected page jump before restore branch actually done (#21562) (#21927)
14+
* Fix vertical align of committer avatar rendered by email address (#21884) (#21919)
15+
* Fix setting HTTP headers after write (#21833) (#21874)
16+
* Ignore line anchor links with leading zeroes (#21728) (#21777)
17+
* Enable Monaco automaticLayout (#21516)
18+
* BUGFIXES
19+
* Do not list active repositories as unadopted (#22034) (#22167)
20+
* Correctly handle moved files in apply patch (#22118) (#22136)
21+
* Fix condition for is_internal (#22095) (#22131)
22+
* Fix permission check on issue/pull lock (#22114)
23+
* Fix sorting admin user list by last login (#22081) (#22106)
24+
* Workaround for container registry push/pull errors (#21862) (#22069)
25+
* Fix issue/PR numbers (#22037) (#22045)
26+
* Handle empty author names (#21902) (#22028)
27+
* Fix ListBranches to handle empty case (#21921) (#22025)
28+
* Fix enabling partial clones on 1.17 (#21809)
29+
* Prevent panic in doctor command when running default checks (#21791) (#21808)
30+
* Upgrade golang.org/x/crypto (#21792) (#21794)
31+
* Init git module before database migration (#21764) (#21766)
32+
* Set last login when activating account (#21731) (#21754)
33+
* Add HEAD fix to gitea doctor (#21352) (#21751)
34+
* Fix UI language switching bug (#21597) (#21748)
35+
* Remove semver compatible flag and change pypi to an array of test cases (#21708) (#21729)
36+
* Allow local package identifiers for PyPI packages (#21690) (#21726)
37+
* Fix repository adoption on Windows (#21646) (#21651)
38+
* Sync git hooks when config file path changed (#21619) (#21625)
39+
* Added check for disabled Packages (#21540) (#21614)
40+
* Fix `Timestamp.IsZero` (#21593) (#21604)
41+
* Fix issues count bug (#21600)
42+
* Support binary deploy in npm packages (#21589)
43+
* Update milestone counters when issue is deleted (#21459) (#21586)
44+
* SessionUser protection against nil pointer dereference (#21581)
45+
* Case-insensitive NuGet symbol file GUID (#21409) (#21575)
46+
* Suppress `ExternalLoginUserNotExist` error (#21504) (#21572)
47+
* Prevent Authorization header for presigned LFS urls (#21531) (#21569)
48+
* Update binding to fix bugs (#21560)
49+
* Fix generating compare link (#21519) (#21530)
50+
* Ignore error when retrieving changed PR review files (#21487) (#21524)
51+
* Fix incorrect notification commit url (#21479) (#21483)
52+
* Display total commit count in hook message (#21400) (#21481)
53+
* Enforce grouped NuGet search results (#21442) (#21480)
54+
* Return 404 when user is not found on avatar (#21476) (#21477)
55+
* Normalize NuGet package version on upload (#22186) (#22201)
56+
* MISC
57+
* Check for zero time instant in TimeStamp.IsZero() (#22171) (#22173)
58+
* Fix warn in database structs sync (#22111)
59+
* Allow for resolution of NPM registry paths that match upstream (#21568) (#21723)
60+
761
## [1.17.3](https://github.com/go-gitea/gitea/releases/tag/v1.17.3) - 2022-10-15
862

963
* SECURITY

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ To maintain understandable code and avoid circular dependencies it is important
190190
- **templates:** Golang templates for generating the html output.
191191
- **tests/e2e:** End to end tests
192192
- **tests/integration:** Integration tests
193+
- **tests/gitea-repositories-meta:** Sample repos used in integration tests. Adding a new repo requires editing `models/fixtures/repositories.yml` and `models/fixtures/repo_unit.yml` to match.
194+
- **tests/gitea-lfs-meta:** Sample LFS objects used in integration tests. Adding a new object requires editing `models/fixtures/lfs_meta_object.yml` to match.
193195
- **vendor:** External code that Gitea depends on.
194196

195197
## Documentation

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ Steven Kriegler <sk.bunsenbrenner@gmail.com> (@justusbunsi)
4545
Jimmy Praet <jimmy.praet@telenet.be> (@jpraet)
4646
Leon Hofmeister <dev.lh@web.de> (@delvh)
4747
Wim <wim@42.be> (@42wim)
48-
xinyu <xinyu@nerv.org.cn> (@penlinux)
48+
Xinyu Zhou <i@sourcehut.net> (@xin-u)
4949
Jason Song <i@wolfogre.com> (@wolfogre)
5050
Yarden Shoham <hrsi88@gmail.com> (@yardenshoham)

build/generate-images.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import imageminZopfli from 'imagemin-zopfli';
33
import {optimize} from 'svgo';
44
import {fabric} from 'fabric';
5-
import {readFile, writeFile} from 'fs/promises';
5+
import {readFile, writeFile} from 'node:fs/promises';
66

77
function exit(err) {
88
if (err) console.error(err);

build/generate-svg.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env node
22
import fastGlob from 'fast-glob';
33
import {optimize} from 'svgo';
4-
import {parse} from 'path';
5-
import {readFile, writeFile, mkdir} from 'fs/promises';
6-
import {fileURLToPath} from 'url';
4+
import {parse} from 'node:path';
5+
import {readFile, writeFile, mkdir} from 'node:fs/promises';
6+
import {fileURLToPath} from 'node:url';
77

88
const glob = (pattern) => fastGlob.sync(pattern, {
99
cwd: fileURLToPath(new URL('..', import.meta.url)),

custom/conf/app.example.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,9 @@ ROUTER = console
10361036
;;
10371037
;; Add co-authored-by and co-committed-by trailers if committer does not match author
10381038
;ADD_CO_COMMITTER_TRAILERS = true
1039+
;;
1040+
;; In addition to testing patches using the three-way merge method, re-test conflicting patches with git apply
1041+
;TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY = false
10391042

10401043
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10411044
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ THEME := themes/gitea
22
PUBLIC := public
33
ARCHIVE := https://dl.gitea.io/theme/master.tar.gz
44

5+
HUGO_PACKAGE := github.com/gohugoio/hugo@v0.82.0
6+
57
.PHONY: all
68
all: build
79

@@ -11,19 +13,19 @@ clean:
1113

1214
.PHONY: trans-copy
1315
trans-copy:
14-
@bash scripts/trans-copy
16+
bash scripts/trans-copy.sh
1517

1618
.PHONY: server
1719
server: $(THEME)
18-
hugo server
20+
go run $(HUGO_PACKAGE) server
1921

2022
.PHONY: build
2123
build: $(THEME)
22-
hugo --cleanDestinationDir
24+
go run $(HUGO_PACKAGE) --cleanDestinationDir
2325

2426
.PHONY: build-offline
2527
build-offline: $(THEME)
26-
hugo --baseURL="/" --cleanDestinationDir
28+
go run $(HUGO_PACKAGE) --baseURL="/" --cleanDestinationDir
2729

2830
.PHONY: update
2931
update: $(THEME)

docs/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ params:
1818
description: Git with a cup of tea
1919
author: The Gitea Authors
2020
website: https://docs.gitea.io
21-
version: 1.17.3
21+
version: 1.17.4
2222
minGoVersion: 1.18
2323
goVersion: 1.19
2424
minNodeVersion: 14

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ In addition there is _`StaticRootPath`_ which can be set as a built-in at build
134134
- `DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY`: **true**: In default merge messages only include approvers who are officially allowed to review.
135135
- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: In default squash-merge messages include the commit message of all commits comprising the pull request.
136136
- `ADD_CO_COMMITTER_TRAILERS`: **true**: Add co-authored-by and co-committed-by trailers to merge commit messages if committer does not match author.
137+
- `TEST_CONFLICTING_PATCHES_WITH_GIT_APPLY`: **false**: PR patches are tested using a three-way merge method to discover if there are conflicts. If this setting is set to **true**, conflicting patches will be retested using `git apply` - This was the previous behaviour in 1.18 (and earlier) but is somewhat inefficient. Please report if you find that this setting is required.
137138

138139
### Repository - Issue (`repository.issue`)
139140

docs/content/doc/installation/with-docker-rootless.en-us.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ services:
8282
restart: always
8383
volumes:
8484
- ./data:/var/lib/gitea
85-
- ./config:/etc/gitea
85+
- ./config:/etc/gitea
8686
- /etc/timezone:/etc/timezone:ro
8787
- /etc/localtime:/etc/localtime:ro
8888
ports:
@@ -112,7 +112,7 @@ services:
112112
restart: always
113113
volumes:
114114
- ./data:/var/lib/gitea
115-
- ./config:/etc/gitea
115+
- ./config:/etc/gitea
116116
- /etc/timezone:/etc/timezone:ro
117117
- /etc/localtime:/etc/localtime:ro
118118
ports:
@@ -153,7 +153,7 @@ services:
153153
restart: always
154154
volumes:
155155
- ./data:/var/lib/gitea
156-
- ./config:/etc/gitea
156+
- ./config:/etc/gitea
157157
- /etc/timezone:/etc/timezone:ro
158158
- /etc/localtime:/etc/localtime:ro
159159
ports:
@@ -293,13 +293,13 @@ These environment variables can be passed to the docker container in `docker-com
293293
services:
294294
server:
295295
environment:
296-
- GITEA__mailer__ENABLED=true
297-
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
298-
- GITEA__mailer__MAILER_TYPE=smtp
299-
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
300-
- GITEA__mailer__IS_TLS_ENABLED=true
301-
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
302-
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
296+
- GITEA__mailer__ENABLED=true
297+
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
298+
- GITEA__mailer__MAILER_TYPE=smtp
299+
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
300+
- GITEA__mailer__IS_TLS_ENABLED=true
301+
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
302+
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
303303
```
304304

305305
To set required TOKEN and SECRET values, consider using Gitea's built-in [generate utility functions](https://docs.gitea.io/en-us/command-line/#generate).

docs/content/doc/installation/with-docker.en-us.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ services:
117117
environment:
118118
- USER_UID=1000
119119
- USER_GID=1000
120-
+ - GITEA__database__DB_TYPE=mysql
121-
+ - GITEA__database__HOST=db:3306
122-
+ - GITEA__database__NAME=gitea
123-
+ - GITEA__database__USER=gitea
124-
+ - GITEA__database__PASSWD=gitea
120+
+ - GITEA__database__DB_TYPE=mysql
121+
+ - GITEA__database__HOST=db:3306
122+
+ - GITEA__database__NAME=gitea
123+
+ - GITEA__database__USER=gitea
124+
+ - GITEA__database__PASSWD=gitea
125125
restart: always
126126
networks:
127127
- gitea
@@ -168,11 +168,11 @@ services:
168168
environment:
169169
- USER_UID=1000
170170
- USER_GID=1000
171-
+ - GITEA__database__DB_TYPE=postgres
172-
+ - GITEA__database__HOST=db:5432
173-
+ - GITEA__database__NAME=gitea
174-
+ - GITEA__database__USER=gitea
175-
+ - GITEA__database__PASSWD=gitea
171+
+ - GITEA__database__DB_TYPE=postgres
172+
+ - GITEA__database__HOST=db:5432
173+
+ - GITEA__database__NAME=gitea
174+
+ - GITEA__database__USER=gitea
175+
+ - GITEA__database__PASSWD=gitea
176176
restart: always
177177
networks:
178178
- gitea
@@ -225,8 +225,8 @@ services:
225225
networks:
226226
- gitea
227227
volumes:
228-
- - ./gitea:/data
229-
+ - gitea:/data
228+
- - ./gitea:/data
229+
+ - gitea:/data
230230
- /etc/timezone:/etc/timezone:ro
231231
- /etc/localtime:/etc/localtime:ro
232232
ports:
@@ -294,13 +294,13 @@ These environment variables can be passed to the docker container in `docker-com
294294
services:
295295
server:
296296
environment:
297-
- GITEA__mailer__ENABLED=true
298-
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
299-
- GITEA__mailer__MAILER_TYPE=smtp
300-
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
301-
- GITEA__mailer__IS_TLS_ENABLED=true
302-
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
303-
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
297+
- GITEA__mailer__ENABLED=true
298+
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
299+
- GITEA__mailer__MAILER_TYPE=smtp
300+
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
301+
- GITEA__mailer__IS_TLS_ENABLED=true
302+
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
303+
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
304304
```
305305

306306
Gitea will generate new secrets/tokens for every new installation automatically and write them into the app.ini. If you want to set the secrets/tokens manually, you can use the following docker commands to use of Gitea's built-in [generate utility functions](https://docs.gitea.io/en-us/command-line/#generate). Do not lose/change your SECRET_KEY after the installation, otherwise the encrypted data can not be decrypted anymore.

docs/content/doc/installation/with-docker.zh-cn.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ services:
103103
environment:
104104
- USER_UID=1000
105105
- USER_GID=1000
106-
+ - GITEA__database__DB_TYPE=mysql
107-
+ - GITEA__database__HOST=db:3306
108-
+ - GITEA__database__NAME=gitea
109-
+ - GITEA__database__USER=gitea
110-
+ - GITEA__database__PASSWD=gitea
106+
+ - GITEA__database__DB_TYPE=mysql
107+
+ - GITEA__database__HOST=db:3306
108+
+ - GITEA__database__NAME=gitea
109+
+ - GITEA__database__USER=gitea
110+
+ - GITEA__database__PASSWD=gitea
111111
restart: always
112112
networks:
113113
- gitea
@@ -153,11 +153,11 @@ services:
153153
environment:
154154
- USER_UID=1000
155155
- USER_GID=1000
156-
+ - GITEA__database__DB_TYPE=postgres
157-
+ - GITEA__database__HOST=db:5432
158-
+ - GITEA__database__NAME=gitea
159-
+ - GITEA__database__USER=gitea
160-
+ - GITEA__database__PASSWD=gitea
156+
+ - GITEA__database__DB_TYPE=postgres
157+
+ - GITEA__database__HOST=db:5432
158+
+ - GITEA__database__NAME=gitea
159+
+ - GITEA__database__USER=gitea
160+
+ - GITEA__database__PASSWD=gitea
161161
restart: always
162162
networks:
163163
- gitea
@@ -207,8 +207,8 @@ services:
207207
networks:
208208
- gitea
209209
volumes:
210-
- - ./gitea:/data
211-
+ - gitea:/data
210+
- - ./gitea:/data
211+
+ - gitea:/data
212212
- /etc/timezone:/etc/timezone:ro
213213
- /etc/localtime:/etc/localtime:ro
214214
ports:
@@ -285,13 +285,13 @@ docker-compose up -d
285285
services:
286286
server:
287287
environment:
288-
- GITEA__mailer__ENABLED=true
289-
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
290-
- GITEA__mailer__MAILER_TYPE=smtp
291-
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
292-
- GITEA__mailer__IS_TLS_ENABLED=true
293-
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
294-
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
288+
- GITEA__mailer__ENABLED=true
289+
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
290+
- GITEA__mailer__MAILER_TYPE=smtp
291+
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
292+
- GITEA__mailer__IS_TLS_ENABLED=true
293+
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
294+
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
295295
```
296296

297297
Gitea 将为每次新安装自动生成新的 `SECRET_KEY` 并将它们写入 `app.ini`。 如果您想手动设置 `SECRET_KEY`,您可以使用以下 docker 命令来使用 Gitea 内置的[方法](https://docs.gitea.io/en-us/command-line/#generate)生成 `SECRET_KEY`。 安装后请妥善保管您的 `SECRET_KEY`,如若丢失则无法解密已加密的数据。

0 commit comments

Comments
 (0)