Skip to content

Commit 4e26e5c

Browse files
committed
Merge branch 'master' into markup
2 parents 2bef1fe + eed88dc commit 4e26e5c

File tree

830 files changed

+55775
-32576
lines changed

Some content is hidden

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

830 files changed

+55775
-32576
lines changed

.drone.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ steps:
277277
- test-mysql
278278
when:
279279
branch:
280-
- master
280+
- main
281281
event:
282282
- push
283283
- pull_request
@@ -294,7 +294,7 @@ steps:
294294
- generate-coverage
295295
when:
296296
branch:
297-
- master
297+
- main
298298
event:
299299
- push
300300
- pull_request
@@ -383,7 +383,7 @@ platform:
383383

384384
trigger:
385385
branch:
386-
- master
386+
- main
387387
event:
388388
- cron
389389
cron:
@@ -443,7 +443,7 @@ platform:
443443

444444
trigger:
445445
branch:
446-
- master
446+
- main
447447
event:
448448
- cron
449449
cron:
@@ -482,7 +482,7 @@ workspace:
482482

483483
trigger:
484484
branch:
485-
- master
485+
- main
486486
- "release/*"
487487
event:
488488
- push
@@ -545,7 +545,7 @@ steps:
545545
event:
546546
- push
547547

548-
- name: release-master
548+
- name: release-main
549549
image: plugins/s3:1
550550
settings:
551551
acl: public-read
@@ -554,15 +554,15 @@ steps:
554554
path_style: true
555555
source: "dist/release/*"
556556
strip_prefix: dist/release/
557-
target: /gitea/master
557+
target: /gitea/main
558558
environment:
559559
AWS_ACCESS_KEY_ID:
560560
from_secret: aws_access_key_id
561561
AWS_SECRET_ACCESS_KEY:
562562
from_secret: aws_secret_access_key
563563
when:
564564
branch:
565-
- master
565+
- main
566566
event:
567567
- push
568568

@@ -683,7 +683,7 @@ steps:
683683
from_secret: netlify_token
684684
when:
685685
branch:
686-
- master
686+
- main
687687
event:
688688
- push
689689

@@ -701,7 +701,7 @@ depends_on:
701701

702702
trigger:
703703
ref:
704-
- refs/heads/master
704+
- refs/heads/main
705705
- "refs/tags/**"
706706
event:
707707
exclude:
@@ -798,7 +798,7 @@ depends_on:
798798

799799
trigger:
800800
ref:
801-
- refs/heads/master
801+
- refs/heads/main
802802
- "refs/tags/**"
803803
event:
804804
exclude:
@@ -886,7 +886,7 @@ steps:
886886

887887
trigger:
888888
ref:
889-
- refs/heads/master
889+
- refs/heads/main
890890
- "refs/tags/**"
891891
event:
892892
exclude:
@@ -909,7 +909,7 @@ clone:
909909

910910
trigger:
911911
branch:
912-
- master
912+
- main
913913
- "release/*"
914914
event:
915915
- push

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ rules:
412412
unicorn/prefer-spread: [0]
413413
unicorn/prefer-starts-ends-with: [2]
414414
unicorn/prefer-string-slice: [0]
415+
unicorn/prefer-switch: [0]
415416
unicorn/prefer-ternary: [0]
416417
unicorn/prefer-text-content: [2]
417418
unicorn/prefer-trim-start-end: [2]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ RUN addgroup \
5353
-u 1000 \
5454
-G git \
5555
git && \
56-
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
56+
echo "git:*" | chpasswd -e
5757

5858
ENV USER git
5959
ENV GITEA_CUSTOM /data/gitea

Dockerfile.rootless

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ RUN addgroup \
4646
-s /bin/bash \
4747
-u 1000 \
4848
-G git \
49-
git && \
50-
echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd
49+
git
5150

5251
RUN mkdir -p /var/lib/gitea /etc/gitea
5352
RUN chown git:git /var/lib/gitea /etc/gitea

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ else
7474
ifneq ($(DRONE_BRANCH),)
7575
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
7676
else
77-
VERSION ?= master
77+
VERSION ?= main
7878
endif
7979

8080
STORED_VERSION=$(shell cat $(STORED_VERSION_FILE) 2>/dev/null)
@@ -210,9 +210,10 @@ git-check:
210210
.PHONY: node-check
211211
node-check:
212212
$(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | cut -c2- | tr '.' ' ');))
213+
$(eval MIN_NODE_VER_FMT := $(shell printf "%g.%g.%g" $(shell echo $(MIN_NODE_VERSION) | grep -o ...)))
213214
$(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1))
214215
@if [ "$(NODE_VERSION)" -lt "$(MIN_NODE_VERSION)" -o "$(NPM_MISSING)" = "1" ]; then \
215-
echo "Gitea requires Node.js 10 or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
216+
echo "Gitea requires Node.js $(MIN_NODE_VER_FMT) or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \
216217
exit 1; \
217218
fi
218219

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<p align="center">
22
<a href="https://gitea.io/">
3-
<img alt="Gitea" src="https://github.com/raw/go-gitea/gitea/master/public/img/gitea.svg" width="220"/>
3+
<img alt="Gitea" src="https://github.com/raw/go-gitea/gitea/main/public/img/gitea.svg" width="220"/>
44
</a>
55
</p>
66
<h1 align="center">Gitea - Git with a cup of tea</h1>
77

88
<p align="center">
99
<a href="https://drone.gitea.io/go-gitea/gitea" title="Build Status">
10-
<img src="https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg?ref=refs/heads/master">
10+
<img src="https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg?ref=refs/heads/main">
1111
</a>
1212
<a href="https://discord.gg/Gitea" title="Join the Discord chat at https://discord.gg/Gitea">
1313
<img src="https://img.shields.io/discord/322538954119184384.svg">
@@ -16,7 +16,7 @@
1616
<img src="https://images.microbadger.com/badges/image/gitea/gitea.svg">
1717
</a>
1818
<a href="https://codecov.io/gh/go-gitea/gitea" title="Codecov">
19-
<img src="https://codecov.io/gh/go-gitea/gitea/branch/master/graph/badge.svg">
19+
<img src="https://codecov.io/gh/go-gitea/gitea/branch/main/graph/badge.svg">
2020
</a>
2121
<a href="https://godoc.org/code.gitea.io/gitea" title="Go Report Card">
2222
<img src="https://goreportcard.com/badge/code.gitea.io/gitea">
@@ -150,7 +150,7 @@ We're [working on it](https://github.com/go-gitea/gitea/issues/1029).
150150
## License
151151

152152
This project is licensed under the MIT License.
153-
See the [LICENSE](https://github.com/go-gitea/gitea/blob/master/LICENSE) file
153+
See the [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) file
154154
for the full license text.
155155

156156
## Screenshots

README_ZH.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<p align="center">
22
<a href="https://gitea.io/">
3-
<img alt="Gitea" src="https://github.com/raw/go-gitea/gitea/master/public/img/gitea.svg" width="220"/>
3+
<img alt="Gitea" src="https://github.com/raw/go-gitea/gitea/main/public/img/gitea.svg" width="220"/>
44
</a>
55
</p>
66
<h1 align="center">Gitea - Git with a cup of tea</h1>
77

88
<p align="center">
99
<a href="https://drone.gitea.io/go-gitea/gitea" title="Build Status">
10-
<img src="https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg?ref=refs/heads/master">
10+
<img src="https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg?ref=refs/heads/main">
1111
</a>
1212
<a href="https://discord.gg/Gitea" title="Join the Discord chat at https://discord.gg/Gitea">
1313
<img src="https://img.shields.io/discord/322538954119184384.svg">
@@ -16,7 +16,7 @@
1616
<img src="https://images.microbadger.com/badges/image/gitea/gitea.svg">
1717
</a>
1818
<a href="https://codecov.io/gh/go-gitea/gitea" title="Codecov">
19-
<img src="https://codecov.io/gh/go-gitea/gitea/branch/master/graph/badge.svg">
19+
<img src="https://codecov.io/gh/go-gitea/gitea/branch/main/graph/badge.svg">
2020
</a>
2121
<a href="https://godoc.org/code.gitea.io/gitea" title="Go Report Card">
2222
<img src="https://goreportcard.com/badge/code.gitea.io/gitea">
@@ -79,7 +79,7 @@ Fork -> Patch -> Push -> Pull Request
7979

8080
## 授权许可
8181

82-
本项目采用 MIT 开源授权许可证,完整的授权说明已放置在 [LICENSE](https://github.com/go-gitea/gitea/blob/master/LICENSE) 文件中。
82+
本项目采用 MIT 开源授权许可证,完整的授权说明已放置在 [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) 文件中。
8383

8484
## 截图
8585

cmd/admin.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
pwd "code.gitea.io/gitea/modules/password"
2222
repo_module "code.gitea.io/gitea/modules/repository"
2323
"code.gitea.io/gitea/modules/setting"
24+
"code.gitea.io/gitea/modules/storage"
2425

2526
"github.com/urfave/cli"
2627
)
@@ -489,6 +490,10 @@ func runDeleteUser(c *cli.Context) error {
489490
return err
490491
}
491492

493+
if err := storage.Init(); err != nil {
494+
return err
495+
}
496+
492497
var err error
493498
var user *models.User
494499
if c.IsSet("email") {

cmd/web_letsencrypt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler)
3232
DisableTLSALPNChallenge: !enableTLSALPNChallenge,
3333
})
3434

35-
magic.Issuer = myACME
35+
magic.Issuers = []certmagic.Issuer{myACME}
3636

3737
// this obtains certificates or renews them if necessary
3838
err := magic.ManageSync([]string{domain})

custom/conf/app.example.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,14 @@ RUN_AT_START = false
11451145
NO_SUCCESS_NOTICE = false
11461146
SCHEDULE = @every 72h
11471147

1148+
; Delete all old actions from database
1149+
[cron.delete_old_actions]
1150+
ENABLED = false
1151+
RUN_AT_START = false
1152+
NO_SUCCESS_NOTICE = false
1153+
SCHEDULE = @every 168h
1154+
OLDER_THAN = 8760h
1155+
11481156
[git]
11491157
; The path of git executable. If empty, Gitea searches through the PATH environment.
11501158
PATH =

0 commit comments

Comments
 (0)