Skip to content

Commit afa931e

Browse files
committed
Merge remote-tracking branch 'origin/main' into tsconfig
* origin/main: (21 commits) Fix deprecated Dockerfile ENV format (go-gitea#31450) README Badge maintenance (go-gitea#31441) Improve markdown textarea for indentation and lists (go-gitea#31406) Split common-global.js into separate files (go-gitea#31438) Fix the link for .git-blame-ignore-revs bypass (go-gitea#31432) Bump htmx to 2.0.0 (go-gitea#31413) Fix the wrong line number in the diff view page when expanded twice. (go-gitea#31431) Fix labels and projects menu overflow on issue page (go-gitea#31435) [Fix] Account Linking UpdateMigrationsByType (go-gitea#31428) Fix markdown math brackets render problem (go-gitea#31420) Reduce `air` verbosity (go-gitea#31417) Fix new issue/pr avatar (go-gitea#31419) Increase max length of org team names from 30 to 255 characters (go-gitea#31410) [skip ci] Updated translations via Crowdin Refactor names (go-gitea#31405) Update JS dependencies, remove `eslint-plugin-jquery` (go-gitea#31402) Switch to upstream of `gorilla/feeds` (go-gitea#31400) Fix rendered wiki page link (go-gitea#31398) Refactor repo unit "disabled" check (go-gitea#31389) Refactor route path normalization (go-gitea#31381) ...
2 parents 8b429c1 + 996037f commit afa931e

File tree

234 files changed

+2237
-2311
lines changed

Some content is hidden

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

234 files changed

+2237
-2311
lines changed

.air.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ exclude_dir = [
2121
]
2222
exclude_regex = ["_test.go$", "_gen.go$"]
2323
stop_on_error = true
24+
25+
[log]
26+
main_only = true

.eslintrc.yaml

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ plugins:
2727
- eslint-plugin-array-func
2828
- eslint-plugin-github
2929
- eslint-plugin-i
30-
- eslint-plugin-jquery
3130
- eslint-plugin-no-jquery
3231
- eslint-plugin-no-use-extend-native
3332
- eslint-plugin-regexp
@@ -45,6 +44,7 @@ overrides:
4544
- files: ["web_src/**/*"]
4645
globals:
4746
__webpack_public_path__: true
47+
htmx: true
4848
process: false # https://github.com/webpack/webpack/issues/15833
4949
- files: ["web_src/**/*", "docs/**/*"]
5050
env:
@@ -308,55 +308,6 @@ rules:
308308
i/prefer-default-export: [0]
309309
i/unambiguous: [0]
310310
init-declarations: [0]
311-
jquery/no-ajax-events: [2]
312-
jquery/no-ajax: [2]
313-
jquery/no-animate: [2]
314-
jquery/no-attr: [2]
315-
jquery/no-bind: [2]
316-
jquery/no-class: [0]
317-
jquery/no-clone: [2]
318-
jquery/no-closest: [0]
319-
jquery/no-css: [2]
320-
jquery/no-data: [0]
321-
jquery/no-deferred: [2]
322-
jquery/no-delegate: [2]
323-
jquery/no-each: [0]
324-
jquery/no-extend: [2]
325-
jquery/no-fade: [2]
326-
jquery/no-filter: [0]
327-
jquery/no-find: [0]
328-
jquery/no-global-eval: [2]
329-
jquery/no-grep: [2]
330-
jquery/no-has: [2]
331-
jquery/no-hide: [2]
332-
jquery/no-html: [0]
333-
jquery/no-in-array: [2]
334-
jquery/no-is-array: [2]
335-
jquery/no-is-function: [2]
336-
jquery/no-is: [2]
337-
jquery/no-load: [2]
338-
jquery/no-map: [2]
339-
jquery/no-merge: [2]
340-
jquery/no-param: [2]
341-
jquery/no-parent: [0]
342-
jquery/no-parents: [2]
343-
jquery/no-parse-html: [2]
344-
jquery/no-prop: [2]
345-
jquery/no-proxy: [2]
346-
jquery/no-ready: [2]
347-
jquery/no-serialize: [2]
348-
jquery/no-show: [2]
349-
jquery/no-size: [2]
350-
jquery/no-sizzle: [2]
351-
jquery/no-slide: [2]
352-
jquery/no-submit: [2]
353-
jquery/no-text: [2]
354-
jquery/no-toggle: [2]
355-
jquery/no-trigger: [0]
356-
jquery/no-trim: [2]
357-
jquery/no-val: [0]
358-
jquery/no-when: [2]
359-
jquery/no-wrap: [2]
360311
line-comment-position: [0]
361312
logical-assignment-operators: [0]
362313
max-classes-per-file: [0]
@@ -766,6 +717,7 @@ rules:
766717
unicorn/no-lonely-if: [2]
767718
unicorn/no-magic-array-flat-depth: [0]
768719
unicorn/no-negated-condition: [0]
720+
unicorn/no-negation-in-equality-check: [2]
769721
unicorn/no-nested-ternary: [0]
770722
unicorn/no-new-array: [0]
771723
unicorn/no-new-buffer: [0]

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
FROM docker.io/library/golang:1.22-alpine3.20 AS build-env
33

44
ARG GOPROXY
5-
ENV GOPROXY ${GOPROXY:-direct}
5+
ENV GOPROXY=${GOPROXY:-direct}
66

77
ARG GITEA_VERSION
88
ARG TAGS="sqlite sqlite_unlock_notify"
9-
ENV TAGS "bindata timetzdata $TAGS"
9+
ENV TAGS="bindata timetzdata $TAGS"
1010
ARG CGO_EXTRA_CFLAGS
1111

1212
# Build deps
@@ -72,8 +72,8 @@ RUN addgroup \
7272
git && \
7373
echo "git:*" | chpasswd -e
7474

75-
ENV USER git
76-
ENV GITEA_CUSTOM /data/gitea
75+
ENV USER=git
76+
ENV GITEA_CUSTOM=/data/gitea
7777

7878
VOLUME ["/data"]
7979

Dockerfile.rootless

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
FROM docker.io/library/golang:1.22-alpine3.20 AS build-env
33

44
ARG GOPROXY
5-
ENV GOPROXY ${GOPROXY:-direct}
5+
ENV GOPROXY=${GOPROXY:-direct}
66

77
ARG GITEA_VERSION
88
ARG TAGS="sqlite sqlite_unlock_notify"
9-
ENV TAGS "bindata timetzdata $TAGS"
9+
ENV TAGS="bindata timetzdata $TAGS"
1010
ARG CGO_EXTRA_CFLAGS
1111

1212
#Build deps
@@ -75,14 +75,14 @@ COPY --from=build-env /go/src/code.gitea.io/gitea/contrib/autocompletion/bash_au
7575

7676
# git:git
7777
USER 1000:1000
78-
ENV GITEA_WORK_DIR /var/lib/gitea
79-
ENV GITEA_CUSTOM /var/lib/gitea/custom
80-
ENV GITEA_TEMP /tmp/gitea
81-
ENV TMPDIR /tmp/gitea
78+
ENV GITEA_WORK_DIR=/var/lib/gitea
79+
ENV GITEA_CUSTOM=/var/lib/gitea/custom
80+
ENV GITEA_TEMP=/tmp/gitea
81+
ENV TMPDIR=/tmp/gitea
8282

8383
# TODO add to docs the ability to define the ini to load (useful to test and revert a config)
84-
ENV GITEA_APP_INI /etc/gitea/app.ini
85-
ENV HOME "/var/lib/gitea/git"
84+
ENV GITEA_APP_INI=/etc/gitea/app.ini
85+
ENV HOME="/var/lib/gitea/git"
8686
VOLUME ["/var/lib/gitea", "/etc/gitea"]
8787
WORKDIR /var/lib/gitea
8888

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
[![](https://www.codetriage.com/go-gitea/gitea/badges/users.svg)](https://www.codetriage.com/go-gitea/gitea "Help Contribute to Open Source")
99
[![](https://opencollective.com/gitea/tiers/backers/badge.svg?label=backers&color=brightgreen)](https://opencollective.com/gitea "Become a backer/sponsor of gitea")
1010
[![](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT "License: MIT")
11-
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/go-gitea/gitea)
11+
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green)](https://gitpod.io/#https://github.com/go-gitea/gitea)
1212
[![](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea "Crowdin")
13-
[![](https://badgen.net/https/api.tickgit.com/badgen/github.com/go-gitea/gitea/main)](https://www.tickgit.com/browse?repo=github.com/go-gitea/gitea&branch=main "TODOs")
1413

1514
[View this document in Chinese](./README_ZH.md)
1615

README_ZH.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
[![](https://www.codetriage.com/go-gitea/gitea/badges/users.svg)](https://www.codetriage.com/go-gitea/gitea "Help Contribute to Open Source")
99
[![](https://opencollective.com/gitea/tiers/backers/badge.svg?label=backers&color=brightgreen)](https://opencollective.com/gitea "Become a backer/sponsor of gitea")
1010
[![](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT "License: MIT")
11-
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/go-gitea/gitea)
11+
[![Contribute with Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod&color=green)](https://gitpod.io/#https://github.com/go-gitea/gitea)
1212
[![](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea "Crowdin")
13-
[![](https://badgen.net/https/api.tickgit.com/badgen/github.com/go-gitea/gitea/main)](https://www.tickgit.com/browse?repo=github.com/go-gitea/gitea&branch=main "TODOs")
1413

1514
[View this document in English](./README.md)
1615

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ require (
5959
github.com/google/go-github/v61 v61.0.0
6060
github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7
6161
github.com/google/uuid v1.6.0
62-
github.com/gorilla/feeds v1.1.2
62+
github.com/gorilla/feeds v1.2.0
6363
github.com/gorilla/sessions v1.2.2
6464
github.com/h2non/gock v1.2.0
6565
github.com/hashicorp/go-version v1.6.0
@@ -309,8 +309,6 @@ replace github.com/shurcooL/vfsgen => github.com/lunny/vfsgen v0.0.0-20220105142
309309

310310
replace github.com/nektos/act => gitea.com/gitea/act v0.259.1
311311

312-
replace github.com/gorilla/feeds => github.com/yardenshoham/feeds v0.0.0-20240110072658-f3d0c21c0bd5
313-
314312
// TODO: This could be removed after https://github.com/mholt/archiver/pull/396 merged
315313
replace github.com/mholt/archiver/v3 => github.com/anchore/archiver/v3 v3.5.2
316314

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,8 @@ github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8
426426
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
427427
github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8=
428428
github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0=
429+
github.com/gorilla/feeds v1.2.0 h1:O6pBiXJ5JHhPvqy53NsjKOThq+dNFm8+DFrxBEdzSCc=
430+
github.com/gorilla/feeds v1.2.0/go.mod h1:WMib8uJP3BbY+X8Szd1rA5Pzhdfh+HCCAYT2z7Fza6Y=
429431
github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE=
430432
github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w=
431433
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
@@ -811,8 +813,6 @@ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMx
811813
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
812814
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw=
813815
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk=
814-
github.com/yardenshoham/feeds v0.0.0-20240110072658-f3d0c21c0bd5 h1:3seWKGVhGoc66Ht5QlhQsr4xT2caDnFegsnh2NqvENU=
815-
github.com/yardenshoham/feeds v0.0.0-20240110072658-f3d0c21c0bd5/go.mod h1:WMib8uJP3BbY+X8Szd1rA5Pzhdfh+HCCAYT2z7Fza6Y=
816816
github.com/yohcop/openid-go v1.0.1 h1:DPRd3iPO5F6O5zX2e62XpVAbPT6wV51cuucH0z9g3js=
817817
github.com/yohcop/openid-go v1.0.1/go.mod h1:b/AvD03P0KHj4yuihb+VtLD6bYYgsy0zqBzPCRjkCNs=
818818
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=

models/repo/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ func (repo *Repository) LoadUnits(ctx context.Context) (err error) {
362362
if log.IsTrace() {
363363
unitTypeStrings := make([]string, len(repo.Units))
364364
for i, unit := range repo.Units {
365-
unitTypeStrings[i] = unit.Type.String()
365+
unitTypeStrings[i] = unit.Type.LogString()
366366
}
367367
log.Trace("repo.Units, ID=%d, Types: [%s]", repo.ID, strings.Join(unitTypeStrings, ", "))
368368
}

models/repo/repo_unit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func IsErrUnitTypeNotExist(err error) bool {
3333
}
3434

3535
func (err ErrUnitTypeNotExist) Error() string {
36-
return fmt.Sprintf("Unit type does not exist: %s", err.UT.String())
36+
return fmt.Sprintf("Unit type does not exist: %s", err.UT.LogString())
3737
}
3838

3939
func (err ErrUnitTypeNotExist) Unwrap() error {

0 commit comments

Comments
 (0)