Skip to content

Commit 294a64d

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Add missing public user visibility in user details page (go-gitea#27246) Use mask-based fade-out effect for `.new-menu` (go-gitea#27181) [skip ci] Updated translations via Crowdin Fix z-index on markdown completion (go-gitea#27237) Update database-preparation and add note re: MariaDB (go-gitea#27232) cleanup locale function usage (go-gitea#27227) Fix EOL handling in web editor (go-gitea#27141) Fix PushEvent NullPointerException jenkinsci/github-plugin (go-gitea#27203) fix issues on action runners page (go-gitea#27226) Fix Fomantic UI dropdown icon bug when there is a search input in menu (go-gitea#27225) Update go-enry to 2.8.5 (go-gitea#27215) Update nodejs installation method in release container (go-gitea#27207) Quote table `release` in sql queries (go-gitea#27205) Fix push mirror, wrong timestamp format (go-gitea#27153) Allow copying issue comment link on archived repos and when not logged in (go-gitea#27193) fix: text decorator on issue sidebar menu label (go-gitea#27206) Update JS and Poetry dependencies and eslint (go-gitea#27200) Remove some dead code (go-gitea#27196) # Conflicts: # templates/repo/issue/view_content/context_menu.tmpl
2 parents 442ec40 + 65d0b7c commit 294a64d

File tree

86 files changed

+881
-787
lines changed

Some content is hidden

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

86 files changed

+881
-787
lines changed

.drone.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ steps:
4444
image: techknowlogick/xgo:go-1.21.x
4545
pull: always
4646
commands:
47-
- curl -sL https://deb.nodesource.com/setup_20.x | bash - && apt-get -qqy install nodejs
47+
- apt-get update && apt-get -qqy install ca-certificates curl gnupg
48+
- mkdir -p /etc/apt/keyrings && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
49+
- echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" > /etc/apt/sources.list.d/nodesource.list
50+
- apt-get update && apt-get -qqy install nodejs
4851
- export PATH=$PATH:$GOPATH/bin
4952
- make release
5053
environment:

.eslintrc.yaml

+14-15
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ parserOptions:
1111
plugins:
1212
- "@eslint-community/eslint-plugin-eslint-comments"
1313
- eslint-plugin-array-func
14-
- eslint-plugin-custom-elements
1514
- eslint-plugin-import
1615
- eslint-plugin-jquery
1716
- eslint-plugin-no-jquery
@@ -88,19 +87,6 @@ rules:
8887
consistent-this: [0]
8988
constructor-super: [2]
9089
curly: [0]
91-
custom-elements/expose-class-on-global: [0]
92-
custom-elements/extends-correct-class: [2]
93-
custom-elements/file-name-matches-element: [2]
94-
custom-elements/no-constructor: [2]
95-
custom-elements/no-customized-built-in-elements: [2]
96-
custom-elements/no-dom-traversal-in-attributechangedcallback: [2]
97-
custom-elements/no-dom-traversal-in-connectedcallback: [2]
98-
custom-elements/no-exports-with-element: [2]
99-
custom-elements/no-method-prefixed-with-on: [2]
100-
custom-elements/no-unchecked-define: [0]
101-
custom-elements/one-element-per-file: [0]
102-
custom-elements/tag-name-matches-class: [2]
103-
custom-elements/valid-tag-name: [2]
10490
default-case-last: [2]
10591
default-case: [0]
10692
default-param-last: [0]
@@ -740,14 +726,27 @@ rules:
740726
valid-typeof: [2, {requireStringLiterals: true}]
741727
vars-on-top: [0]
742728
wc/attach-shadow-constructor: [2]
729+
wc/define-tag-after-class-definition: [0]
730+
wc/expose-class-on-global: [0]
731+
wc/file-name-matches-element: [2]
732+
wc/guard-define-call: [0]
743733
wc/guard-super-call: [2]
734+
wc/max-elements-per-file: [0]
735+
wc/no-child-traversal-in-attributechangedcallback: [2]
736+
wc/no-child-traversal-in-connectedcallback: [2]
744737
wc/no-closed-shadow-root: [2]
745738
wc/no-constructor-attributes: [2]
746739
wc/no-constructor-params: [2]
747-
wc/no-invalid-element-name: [0] # covered by custom-elements/valid-tag-name
740+
wc/no-constructor: [2]
741+
wc/no-customized-built-in-elements: [2]
742+
wc/no-exports-with-element: [2]
743+
wc/no-invalid-element-name: [2]
744+
wc/no-invalid-extends: [2]
745+
wc/no-method-prefixed-with-on: [2]
748746
wc/no-self-class: [2]
749747
wc/no-typos: [2]
750748
wc/require-listener-teardown: [2]
749+
wc/tag-name-matches-class: [2]
751750
wrap-iife: [2, inside]
752751
wrap-regex: [0]
753752
yield-star-spacing: [2, after]

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ help:
226226
@echo " - test-frontend test frontend files"
227227
@echo " - test-backend test backend files"
228228
@echo " - test-e2e[\#TestSpecificName] test end to end using playwright"
229+
@echo " - update update js and py dependencies"
229230
@echo " - update-js update js dependencies"
230231
@echo " - update-py update py dependencies"
231232
@echo " - webpack build webpack files"
@@ -924,6 +925,9 @@ node_modules: package-lock.json
924925
poetry install
925926
@touch .venv
926927

928+
.PHONY: update
929+
update: update-js update-py
930+
927931
.PHONY: update-js
928932
update-js: node-check | node_modules
929933
npx updates -u -f package.json

docs/content/installation/database-preparation.en-us.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ menu:
1717

1818
# Database Preparation
1919

20-
You need a database to use Gitea. Gitea supports PostgreSQL (>=10), MySQL (>=5.7), SQLite, and MSSQL (>=2008R2 SP3). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter.
20+
You need a database to use Gitea. Gitea supports PostgreSQL (>=10), MySQL (>=5.7), MariaDB, SQLite, and MSSQL (>=2008R2 SP3). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter.
2121

2222
Database instance can be on same machine as Gitea (local database setup), or on different machine (remote database).
2323

2424
Note: All steps below requires that the database engine of your choice is installed on your system. For remote database setup, install the server application on database instance and client program on your Gitea server. The client program is used to test connection to the database from Gitea server, while Gitea itself use database driver provided by Go to accomplish the same thing. In addition, make sure you use same engine version for both server and client for some engine features to work. For security reason, protect `root` (MySQL) or `postgres` (PostgreSQL) database superuser with secure password. The steps assumes that you run Linux for both database and Gitea servers.
2525

26-
## MySQL
26+
## MySQL/MariaDB
2727

2828
1. For remote database setup, you will need to make MySQL listen to your IP address. Edit `bind-address` option on `/etc/mysql/my.cnf` on database instance to:
2929

@@ -45,7 +45,7 @@ Note: All steps below requires that the database engine of your choice is instal
4545

4646
```sql
4747
SET old_passwords=0;
48-
CREATE USER 'gitea' IDENTIFIED BY 'gitea';
48+
CREATE USER 'gitea'@'%' IDENTIFIED BY 'gitea';
4949
```
5050

5151
For remote database:

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ require (
4242
github.com/go-chi/chi/v5 v5.0.10
4343
github.com/go-chi/cors v1.2.1
4444
github.com/go-co-op/gocron v1.31.1
45-
github.com/go-enry/go-enry/v2 v2.8.4
45+
github.com/go-enry/go-enry/v2 v2.8.5
4646
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
4747
github.com/go-git/go-billy/v5 v5.4.1
4848
github.com/go-git/go-git/v5 v5.8.1

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,8 @@ github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4=
347347
github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
348348
github.com/go-co-op/gocron v1.31.1 h1:LZAuBlU0t3SPGUMJGhrJ6VuCc3CsrYzkzicygvVWlfA=
349349
github.com/go-co-op/gocron v1.31.1/go.mod h1:39f6KNSGVOU1LO/ZOoZfcSxwlsJDQOKSu8erN0SH48Y=
350-
github.com/go-enry/go-enry/v2 v2.8.4 h1:QrY3hx/RiqCJJRbdU0MOcjfTM1a586J0WSooqdlJIhs=
351-
github.com/go-enry/go-enry/v2 v2.8.4/go.mod h1:9yrj4ES1YrbNb1Wb7/PWYr2bpaCXUGRt0uafN0ISyG8=
350+
github.com/go-enry/go-enry/v2 v2.8.5 h1:jtYXblst2+d9k7ZgEgkv6Q5hKRKPf0qHRjt715BZEX4=
351+
github.com/go-enry/go-enry/v2 v2.8.5/go.mod h1:9yrj4ES1YrbNb1Wb7/PWYr2bpaCXUGRt0uafN0ISyG8=
352352
github.com/go-enry/go-oniguruma v1.2.1 h1:k8aAMuJfMrqm/56SG2lV9Cfti6tC4x8673aHCcBk+eo=
353353
github.com/go-enry/go-oniguruma v1.2.1/go.mod h1:bWDhYP+S6xZQgiRL7wlTScFYBe023B6ilRZbCAD5Hf4=
354354
github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw=

models/activities/repo_activity.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -342,15 +342,15 @@ func (stats *ActivityStats) FillReleases(ctx context.Context, repoID int64, from
342342

343343
// Published releases list
344344
sess := releasesForActivityStatement(ctx, repoID, fromTime)
345-
sess.OrderBy("release.created_unix DESC")
345+
sess.OrderBy("`release`.created_unix DESC")
346346
stats.PublishedReleases = make([]*repo_model.Release, 0)
347347
if err = sess.Find(&stats.PublishedReleases); err != nil {
348348
return err
349349
}
350350

351351
// Published releases authors
352352
sess = releasesForActivityStatement(ctx, repoID, fromTime)
353-
if _, err = sess.Select("count(distinct release.publisher_id) as `count`").Table("release").Get(&count); err != nil {
353+
if _, err = sess.Select("count(distinct `release`.publisher_id) as `count`").Table("release").Get(&count); err != nil {
354354
return err
355355
}
356356
stats.PublishedReleaseAuthorCount = count
@@ -359,7 +359,7 @@ func (stats *ActivityStats) FillReleases(ctx context.Context, repoID int64, from
359359
}
360360

361361
func releasesForActivityStatement(ctx context.Context, repoID int64, fromTime time.Time) *xorm.Session {
362-
return db.GetEngine(ctx).Where("release.repo_id = ?", repoID).
363-
And("release.is_draft = ?", false).
364-
And("release.created_unix >= ?", fromTime.Unix())
362+
return db.GetEngine(ctx).Where("`release`.repo_id = ?", repoID).
363+
And("`release`.is_draft = ?", false).
364+
And("`release`.created_unix >= ?", fromTime.Unix())
365365
}

modules/doctor/dbconsistency.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func checkDBConsistency(ctx context.Context, logger log.Logger, autofix bool) er
101101
},
102102
// find releases without existing repository
103103
genericOrphanCheck("Orphaned Releases without existing repository",
104-
"release", "repository", "release.repo_id=repository.id"),
104+
"release", "repository", "`release`.repo_id=repository.id"),
105105
// find pulls without existing issues
106106
genericOrphanCheck("Orphaned PullRequests without existing issue",
107107
"pull_request", "issue", "pull_request.issue_id=issue.id"),

modules/setting/server.go

-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ var (
8181
StaticCacheTime time.Duration
8282
EnableGzip bool
8383
LandingPageURL LandingPage
84-
LandingPageCustom string
8584
UnixSocketPermission uint32
8685
EnablePprof bool
8786
PprofDataPath string
@@ -103,7 +102,6 @@ var (
103102
StaticURLPrefix string
104103
AbsoluteAssetURL string
105104

106-
HasRobotsTxt bool
107105
ManifestData string
108106
)
109107

modules/structs/mirror.go

+12-8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
package structs
55

6+
import "time"
7+
68
// CreatePushMirrorOption represents need information to create a push mirror of a repository.
79
type CreatePushMirrorOption struct {
810
RemoteAddress string `json:"remote_address"`
@@ -15,12 +17,14 @@ type CreatePushMirrorOption struct {
1517
// PushMirror represents information of a push mirror
1618
// swagger:model
1719
type PushMirror struct {
18-
RepoName string `json:"repo_name"`
19-
RemoteName string `json:"remote_name"`
20-
RemoteAddress string `json:"remote_address"`
21-
CreatedUnix string `json:"created"`
22-
LastUpdateUnix string `json:"last_update"`
23-
LastError string `json:"last_error"`
24-
Interval string `json:"interval"`
25-
SyncOnCommit bool `json:"sync_on_commit"`
20+
RepoName string `json:"repo_name"`
21+
RemoteName string `json:"remote_name"`
22+
RemoteAddress string `json:"remote_address"`
23+
// swagger:strfmt date-time
24+
CreatedUnix time.Time `json:"created"`
25+
// swagger:strfmt date-time
26+
LastUpdateUnix *time.Time `json:"last_update"`
27+
LastError string `json:"last_error"`
28+
Interval string `json:"interval"`
29+
SyncOnCommit bool `json:"sync_on_commit"`
2630
}

modules/structs/repo.go

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ type Repository struct {
6363
Language string `json:"language"`
6464
LanguagesURL string `json:"languages_url"`
6565
HTMLURL string `json:"html_url"`
66+
URL string `json:"url"`
6667
Link string `json:"link"`
6768
SSHURL string `json:"ssh_url"`
6869
CloneURL string `json:"clone_url"`

modules/web/middleware/data.go

-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ func GetContextData(c context.Context) ContextData {
4747

4848
func CommonTemplateContextData() ContextData {
4949
return ContextData{
50-
"IsLandingPageHome": setting.LandingPageURL == setting.LandingPageHome,
51-
"IsLandingPageExplore": setting.LandingPageURL == setting.LandingPageExplore,
5250
"IsLandingPageOrganizations": setting.LandingPageURL == setting.LandingPageOrganizations,
5351

5452
"ShowRegistrationButton": setting.Service.ShowRegistrationButton,

options/locale/locale_en-US.ini

+1
Original file line numberDiff line numberDiff line change
@@ -3507,6 +3507,7 @@ runners.status.idle = Idle
35073507
runners.status.active = Active
35083508
runners.status.offline = Offline
35093509
runners.version = Version
3510+
runners.reset_registration_token = Reset registration token
35103511
runners.reset_registration_token_success = Runner registration token reset successfully
35113512
35123513
runs.all_workflows = All Workflows

options/locale/locale_fr-FR.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ settings.mirror_settings.last_update=Dernière mise à jour
19771977
settings.mirror_settings.push_mirror.none=Aucun miroir push configuré
19781978
settings.mirror_settings.push_mirror.remote_url=URL du dépôt distant Git
19791979
settings.mirror_settings.push_mirror.add=Ajouter un miroir push
1980-
settings.mirror_settings.push_mirror.edit_sync_time=Modifier la fréquence de réflexion
1980+
settings.mirror_settings.push_mirror.edit_sync_time=Modifier la fréquence de synchronisation du miroir
19811981

19821982
settings.sync_mirror=Synchroniser maintenant
19831983
settings.mirror_sync_in_progress=La synchronisation est en cours. Revenez dans une minute.

0 commit comments

Comments
 (0)