Skip to content

Commit 798a5ec

Browse files
committed
Merge branch 'main' into git-credential-oauth
2 parents 97d30ec + fc6c3d6 commit 798a5ec

File tree

195 files changed

+4789
-1952
lines changed

Some content is hidden

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

195 files changed

+4789
-1952
lines changed

.eslintrc.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ rules:
422422
no-restricted-imports: [0]
423423
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement, SequenceExpression]
424424
no-return-assign: [0]
425-
no-return-await: [0]
426425
no-script-url: [2]
427426
no-self-assign: [2, {props: true}]
428427
no-self-compare: [2]

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ jobs:
9898
discovery.type: single-node
9999
ports:
100100
- "9200:9200"
101+
meilisearch:
102+
image: getmeili/meilisearch:v1.2.0
103+
env:
104+
MEILI_ENV: development # disable auth
105+
ports:
106+
- "7700:7700"
101107
smtpimap:
102108
image: tabascoterrier/docker-imap-devel:latest
103109
ports:
@@ -128,7 +134,7 @@ jobs:
128134
go-version: ">=1.20"
129135
check-latest: true
130136
- name: Add hosts to /etc/hosts
131-
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch smtpimap" | sudo tee -a /etc/hosts'
137+
run: '[ -e "/.dockerenv" ] || [ -e "/run/.containerenv" ] || echo "127.0.0.1 mysql elasticsearch meilisearch smtpimap" | sudo tee -a /etc/hosts'
132138
- run: make deps-backend
133139
- run: make backend
134140
env:

.ignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
/modules/public/bindata.go
66
/modules/templates/bindata.go
77
/vendor
8+
/public/assets
89
node_modules

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@ 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.20.2](https://github.com/go-gitea/gitea/releases/tag/1.20.2) - 2023-07-29
8+
9+
* ENHANCEMENTS
10+
* Calculate MAX_WORKERS default value by CPU number (#26177) (#26183)
11+
* Display deprecated warning in admin panel pages as well as in the log file (#26094) (#26154)
12+
* BUGFIXES
13+
* Fix allowed user types setting problem (#26200) (#26206)
14+
* Fix handling of plenty Nuget package versions (#26075) (#26173)
15+
* Fix UI regression of asciinema player (#26159) (#26162)
16+
* Fix LFS object list style (#26133) (#26147)
17+
* Fix allowed user types setting problem (#26200) (#26206)
18+
* Prevent primary key update on migration (#26192) (#26199)
19+
* Fix bug when pushing to a pull request which enabled dismiss approval automatically (#25882) (#26158)
20+
* Fix bugs in LFS meta garbage collection (#26122) (#26157)
21+
* Update xorm version (#26128) (#26150)
22+
* Remove "misc" scope check from public API endpoints (#26134) (#26149)
23+
* Fix CLI allowing creation of access tokens with existing name (#26071) (#26144)
24+
* Fix incorrect router logger (#26137) (#26143)
25+
* Improve commit graph alignment and truncating (#26112) (#26127)
26+
* Avoid writing config file if not installed (#26107) (#26113)
27+
* Fix escape problems in the branch selector (#25875) (#26103)
28+
* Fix handling of Debian files with trailing slash (#26087) (#26098)
29+
* Fix Missing 404 swagger response docs for /admin/users/{username} (#26086) (#26089)
30+
* Use stderr as fallback if the log file can't be opened (#26074) (#26083)
31+
* Increase table cell horizontal padding (#26140) (#26142)
32+
* Fix wrong workflow status when rerun a job in an already finished workflow (#26119) (#26124)
33+
* Fix duplicated url prefix on issue context menu (#26066) (#26067)
34+
735
## [1.20.1](https://github.com/go-gitea/gitea/releases/tag/1.20.1) - 2023-07-22
836

937
* SECURITY

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ AIR_PACKAGE ?= github.com/cosmtrek/[email protected]
2929
EDITORCONFIG_CHECKER_PACKAGE ?= github.com/editorconfig-checker/editorconfig-checker/cmd/[email protected]
3030
GOFUMPT_PACKAGE ?= mvdan.cc/[email protected]
3131
GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/[email protected]
32-
GXZ_PAGAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
32+
GXZ_PACKAGE ?= github.com/ulikunitz/xz/cmd/[email protected]
3333
MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/[email protected]
3434
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/[email protected]
3535
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
3636
GO_LICENSES_PACKAGE ?= github.com/google/[email protected]
37-
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v0.2.0
37+
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1.0.0
3838
ACTIONLINT_PACKAGE ?= github.com/rhysd/actionlint/cmd/[email protected]
3939

4040
DOCKER_IMAGE ?= gitea/gitea
@@ -864,7 +864,7 @@ release-check: | $(DIST_DIRS)
864864

865865
.PHONY: release-compress
866866
release-compress: | $(DIST_DIRS)
867-
cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && $(GO) run $(GXZ_PAGAGE) -k -9 $${file}; done;
867+
cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && $(GO) run $(GXZ_PACKAGE) -k -9 $${file}; done;
868868

869869
.PHONY: release-sources
870870
release-sources: | $(DIST_DIRS)
@@ -903,7 +903,7 @@ deps-tools:
903903
$(GO) install $(EDITORCONFIG_CHECKER_PACKAGE)
904904
$(GO) install $(GOFUMPT_PACKAGE)
905905
$(GO) install $(GOLANGCI_LINT_PACKAGE)
906-
$(GO) install $(GXZ_PAGAGE)
906+
$(GO) install $(GXZ_PACKAGE)
907907
$(GO) install $(MISSPELL_PACKAGE)
908908
$(GO) install $(SWAGGER_PACKAGE)
909909
$(GO) install $(XGO_PACKAGE)

custom/conf/app.example.ini

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,15 @@ LEVEL = Info
830830
;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting.
831831
;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true
832832
;;
833+
;; Default map service. No external API support has been included. A service has to allow
834+
;; searching using URL parameters, the location will be appended to the URL as escaped query parameter.
835+
;; Disabled by default, some example values are:
836+
;; - OpenStreetMap: https://www.openstreetmap.org/search?query=
837+
;; - Google Maps: https://www.google.com/maps/place/
838+
;; - MapQuest: https://www.mapquest.com/search/
839+
;; - Bing Maps: https://www.bing.com/maps?where1=
840+
; USER_LOCATION_MAP_URL =
841+
;;
833842
;; Enable heatmap on users profiles.
834843
;ENABLE_USER_HEATMAP = true
835844
;;
@@ -1423,8 +1432,8 @@ LEVEL = Info
14231432
;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections.
14241433
;SET_NAME = "_unique"
14251434
;;
1426-
;; Dynamically scale the worker pool to at this many workers
1427-
;MAX_WORKERS = 10
1435+
;; Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
1436+
;MAX_WORKERS = ; (dynamic)
14281437

14291438
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14301439
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/content/administration/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ Configuration at `[queue]` will set defaults for queues with overrides for indiv
488488
- `CONN_STR`: **redis://127.0.0.1:6379/0**: Connection string for the redis queue type. For `redis-cluster` use `redis+cluster://127.0.0.1:6379/0`. Options can be set using query params. Similarly, LevelDB options can also be set using: **leveldb://relative/path?option=value** or **leveldb:///absolute/path?option=value**, and will override `DATADIR`
489489
- `QUEUE_NAME`: **_queue**: The suffix for default redis and disk queue name. Individual queues will default to **`name`**`QUEUE_NAME` but can be overridden in the specific `queue.name` section.
490490
- `SET_NAME`: **_unique**: The suffix that will be added to the default redis and disk queue `set` name for unique queues. Individual queues will default to **`name`**`QUEUE_NAME`_`SET_NAME`_ but can be overridden in the specific `queue.name` section.
491-
- `MAX_WORKERS`: **10**: Maximum number of worker go-routines for the queue.
491+
- `MAX_WORKERS`: **(dynamic)**: Maximum number of worker go-routines for the queue. Default value is "CpuNum/2" clipped to between 1 and 10.
492492

493493
Gitea creates the following non-unique queues:
494494

@@ -648,6 +648,7 @@ And the following unique queues:
648648
- `DEFAULT_USER_IS_RESTRICTED`: **false**: Give new users restricted permissions by default
649649
- `DEFAULT_ENABLE_DEPENDENCIES`: **true**: Enable this to have dependencies enabled by default.
650650
- `ALLOW_CROSS_REPOSITORY_DEPENDENCIES` : **true** Enable this to allow dependencies on issues from any repository where the user is granted access.
651+
- `USER_LOCATION_MAP_URL`: **""**: A map service URL to show user's location on a map. The location will be appended to the URL as escaped query parameter.
651652
- `ENABLE_USER_HEATMAP`: **true**: Enable this to display the heatmap on users profiles.
652653
- `ENABLE_TIMETRACKING`: **true**: Enable Timetracking feature.
653654
- `DEFAULT_ENABLE_TIMETRACKING`: **true**: Allow repositories to use timetracking by default.

docs/content/contributing/guidelines-frontend.en-us.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,7 @@ A lot of legacy code already existed before this document's written. It's recomm
133133
### Vue3 and JSX
134134

135135
Gitea is using Vue3 now. We decided not to introduce JSX to keep the HTML and the JavaScript code separated.
136+
137+
### UI Examples
138+
139+
Gitea uses some self-made UI elements and customizes others to integrate them better into the general UI approach. When running Gitea in development mode (`RUN_MODE=dev`), a page with some standardized UI examples is available under `http(s)://your-gitea-url:port/devtest`.

models/db/common.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,20 @@ func BuildCaseInsensitiveLike(key, value string) builder.Cond {
2020
}
2121
return builder.Like{"UPPER(" + key + ")", strings.ToUpper(value)}
2222
}
23+
24+
// BuildCaseInsensitiveIn returns a condition to check if the given value is in the given values case-insensitively.
25+
// Handles especially SQLite correctly as UPPER there only transforms ASCII letters.
26+
func BuildCaseInsensitiveIn(key string, values []string) builder.Cond {
27+
uppers := make([]string, 0, len(values))
28+
if setting.Database.Type.IsSQLite3() {
29+
for _, value := range values {
30+
uppers = append(uppers, util.ToUpperASCII(value))
31+
}
32+
} else {
33+
for _, value := range values {
34+
uppers = append(uppers, strings.ToUpper(value))
35+
}
36+
}
37+
38+
return builder.In("UPPER("+key+")", uppers)
39+
}

models/fixtures/issue.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,3 +304,20 @@
304304
created_unix: 946684830
305305
updated_unix: 978307200
306306
is_locked: false
307+
308+
-
309+
id: 19
310+
repo_id: 58
311+
index: 1
312+
poster_id: 2
313+
original_author_id: 0
314+
name: issue for pr
315+
content: content
316+
milestone_id: 0
317+
priority: 0
318+
is_closed: false
319+
is_pull: true
320+
num_comments: 0
321+
created_unix: 946684830
322+
updated_unix: 978307200
323+
is_locked: false

0 commit comments

Comments
 (0)