Skip to content

Commit baea445

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: (26 commits) Add 'Show on a map' button to Location in profile, fix layout (go-gitea#26214) Use shared template for webhook icons (go-gitea#26242) Reduce margins on user settings page, introduce `flex-container` (go-gitea#26046) Refactor and enhance issue indexer to support both searching, filtering and paging (go-gitea#26012) Show image size on view page (go-gitea#25884) Fix pull request check list is limited (go-gitea#26179) Fix API leaking Usermail if not logged in (go-gitea#25097) [skip ci] Updated licenses and gitignores Fix typo in metadata (go-gitea#26207) Update js and py dependencies (go-gitea#26243) De-emphasize issue sidebar buttons (go-gitea#26171) Don't autosize textarea in diff view (go-gitea#26233) Add `/public/assets` to `.ignore` (go-gitea#26232) Fix attachment clipboard copy on insecure origin (go-gitea#26224) Fix commit compare style (go-gitea#26209) Fix unable to display individual-level project (go-gitea#26198) Fix access check for org-level project (go-gitea#26182) Fixed incorrect locale references (go-gitea#26218) Use calendar icon for `Joined on...` in profiles (go-gitea#26215) Add changelog for 1.20.2 (go-gitea#26208) ...
2 parents 086bf7c + d58c542 commit baea445

File tree

172 files changed

+4469
-1832
lines changed

Some content is hidden

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

172 files changed

+4469
-1832
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

custom/conf/app.example.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,15 @@ LEVEL = Info
827827
;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting.
828828
;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true
829829
;;
830+
;; Default map service. No external API support has been included. A service has to allow
831+
;; searching using URL parameters, the location will be appended to the URL as escaped query parameter.
832+
;; Disabled by default, some example values are:
833+
;; - OpenStreetMap: https://www.openstreetmap.org/search?query=
834+
;; - Google Maps: https://www.google.com/maps/place/
835+
;; - MapQuest: https://www.mapquest.com/search/
836+
;; - Bing Maps: https://www.bing.com/maps?where1=
837+
; USER_LOCATION_MAP_URL =
838+
;;
830839
;; Enable heatmap on users profiles.
831840
;ENABLE_USER_HEATMAP = true
832841
;;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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.

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

models/fixtures/pull_request.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,16 @@
7676
base_branch: master
7777
merge_base: 2a47ca4b614a9f5a
7878
has_merged: false
79+
80+
-
81+
id: 7
82+
type: 0 # gitea pull request
83+
status: 2 # mergable
84+
issue_id: 19
85+
index: 1
86+
head_repo_id: 58
87+
base_repo_id: 58
88+
head_branch: branch1
89+
base_branch: main
90+
merge_base: cbff181af4c9c7fee3cf6c106699e07d9a3f54e6
91+
has_merged: false

models/fixtures/repo_unit.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,3 +607,33 @@
607607
repo_id: 52
608608
type: 1
609609
created_unix: 946684810
610+
611+
-
612+
id: 91
613+
repo_id: 58
614+
type: 1
615+
created_unix: 946684810
616+
617+
-
618+
id: 92
619+
repo_id: 58
620+
type: 2
621+
created_unix: 946684810
622+
623+
-
624+
id: 93
625+
repo_id: 58
626+
type: 3
627+
created_unix: 946684810
628+
629+
-
630+
id: 94
631+
repo_id: 58
632+
type: 4
633+
created_unix: 946684810
634+
635+
-
636+
id: 95
637+
repo_id: 58
638+
type: 5
639+
created_unix: 946684810

0 commit comments

Comments
 (0)