Skip to content

Commit 5cea177

Browse files
committed
Merge branch 'master' into custom-repo-buttons
2 parents 8f10b46 + 6ea6e2b commit 5cea177

File tree

739 files changed

+54779
-32198
lines changed

Some content is hidden

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

739 files changed

+54779
-32198
lines changed

.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]

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

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})

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
582582
## Session (`session`)
583583

584584
- `PROVIDER`: **memory**: Session engine provider \[memory, file, redis, db, mysql, couchbase, memcache, postgres\].
585-
- `PROVIDER_CONFIG`: **data/sessions**: For file, the root path; for others, the connection string.
585+
- `PROVIDER_CONFIG`: **data/sessions**: For file, the root path; for db, empty (database config will be used); for others, the connection string.
586586
- `COOKIE_SECURE`: **false**: Enable this to force using HTTPS for all session access.
587587
- `COOKIE_NAME`: **i\_like\_gitea**: The name of the cookie used for the session ID.
588588
- `GC_INTERVAL_TIME`: **86400**: GC interval in seconds.

docs/content/doc/developers/api-usage.en-us.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ API Reference guide is auto-generated by swagger and available on:
7979
or on
8080
[gitea demo instance](https://try.gitea.io/api/swagger)
8181

82+
The OpenAPI document is at:
83+
`https://gitea.your.host/swagger.v1.json`
84+
8285
## Listing your issued tokens via the API
8386

8487
As mentioned in

docs/content/doc/installation/with-docker-rootless.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ services:
8989
server:
9090
image: gitea/gitea:latest-rootless
9191
+ environment:
92-
+ - GITEA__database__TYPE=mysql
92+
+ - GITEA__database__DB_TYPE=mysql
9393
+ - GITEA__database__HOST=db:3306
9494
+ - GITEA__database__NAME=gitea
9595
+ - GITEA__database__USER=gitea
@@ -130,7 +130,7 @@ services:
130130
server:
131131
image: gitea/gitea:latest-rootless
132132
environment:
133-
+ - GITEA__database__TYPE=postgres
133+
+ - GITEA__database__DB_TYPE=postgres
134134
+ - GITEA__database__HOST=db:5432
135135
+ - GITEA__database__NAME=gitea
136136
+ - GITEA__database__USER=gitea

docs/content/doc/installation/with-docker.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ services:
118118
environment:
119119
- USER_UID=1000
120120
- USER_GID=1000
121-
+ - GITEA__database__TYPE=mysql
121+
+ - GITEA__database__DB_TYPE=mysql
122122
+ - GITEA__database__HOST=db:3306
123123
+ - GITEA__database__NAME=gitea
124124
+ - GITEA__database__USER=gitea
@@ -169,7 +169,7 @@ services:
169169
environment:
170170
- USER_UID=1000
171171
- USER_GID=1000
172-
+ - GITEA__database__TYPE=postgres
172+
+ - GITEA__database__DB_TYPE=postgres
173173
+ - GITEA__database__HOST=db:5432
174174
+ - GITEA__database__NAME=gitea
175175
+ - GITEA__database__USER=gitea

go.mod

Lines changed: 39 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,82 +11,73 @@ require (
1111
gitea.com/go-chi/captcha v0.0.0-20210110083842-e7696c336a1e
1212
gitea.com/go-chi/session v0.0.0-20210108030337-0cb48c5ba8ee
1313
gitea.com/lunny/levelqueue v0.3.0
14-
github.com/Microsoft/go-winio v0.4.16 // indirect
14+
github.com/Microsoft/go-winio v0.4.18 // indirect
1515
github.com/NYTimes/gziphandler v1.1.1
1616
github.com/PuerkitoBio/goquery v1.5.1
17-
github.com/RoaringBitmap/roaring v0.5.5 // indirect
17+
github.com/RoaringBitmap/roaring v0.6.0 // indirect
1818
github.com/alecthomas/chroma v0.8.2
1919
github.com/andybalholm/brotli v1.0.1 // indirect
2020
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect
21-
github.com/blevesearch/bleve/v2 v2.0.2
21+
github.com/blevesearch/bleve/v2 v2.0.3
2222
github.com/boombuler/barcode v1.0.1 // indirect
2323
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b // indirect
24-
github.com/caddyserver/certmagic v0.12.0
24+
github.com/caddyserver/certmagic v0.13.0
25+
github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect
2526
github.com/chi-middleware/proxy v1.1.1
2627
github.com/couchbase/go-couchbase v0.0.0-20210224140812-5740cd35f448 // indirect
2728
github.com/couchbase/gomemcached v0.1.2 // indirect
2829
github.com/couchbase/goutils v0.0.0-20210118111533-e33d3ffb5401 // indirect
29-
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
30-
github.com/denisenkom/go-mssqldb v0.9.0
30+
github.com/denisenkom/go-mssqldb v0.10.0
3131
github.com/dgrijalva/jwt-go v3.2.0+incompatible
3232
github.com/dlclark/regexp2 v1.4.0 // indirect
3333
github.com/dustin/go-humanize v1.0.0
34-
github.com/editorconfig/editorconfig-core-go/v2 v2.4.1
34+
github.com/editorconfig/editorconfig-core-go/v2 v2.4.2
3535
github.com/emirpasic/gods v1.12.0
3636
github.com/ethantkoenig/rupture v1.0.0
3737
github.com/gliderlabs/ssh v0.3.2
38-
github.com/glycerine/go-unsnap-stream v0.0.0-20210130063903-47dfef350d96 // indirect
3938
github.com/go-asn1-ber/asn1-ber v1.5.3 // indirect
4039
github.com/go-chi/chi v1.5.4
41-
github.com/go-chi/cors v1.1.1
40+
github.com/go-chi/cors v1.2.0
4241
github.com/go-enry/go-enry/v2 v2.6.1
43-
github.com/go-git/go-billy/v5 v5.0.0
44-
github.com/go-git/go-git/v5 v5.2.0
45-
github.com/go-ldap/ldap/v3 v3.2.4
46-
github.com/go-openapi/errors v0.20.0 // indirect
47-
github.com/go-openapi/validate v0.20.2 // indirect
48-
github.com/go-redis/redis/v8 v8.6.0
49-
github.com/go-sql-driver/mysql v1.5.0
50-
github.com/go-swagger/go-swagger v0.26.1
51-
github.com/go-testfixtures/testfixtures/v3 v3.5.0
42+
github.com/go-git/go-billy/v5 v5.1.0
43+
github.com/go-git/go-git/v5 v5.3.0
44+
github.com/go-ldap/ldap/v3 v3.3.0
45+
github.com/go-redis/redis/v8 v8.8.2
46+
github.com/go-sql-driver/mysql v1.6.0
47+
github.com/go-swagger/go-swagger v0.27.0
48+
github.com/go-testfixtures/testfixtures/v3 v3.6.0
5249
github.com/gobwas/glob v0.2.3
5350
github.com/gogs/chardet v0.0.0-20191104214054-4b6791f73a28
5451
github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14
5552
github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85
56-
github.com/golang/snappy v0.0.3 // indirect
5753
github.com/google/go-github/v32 v32.1.0
54+
github.com/google/go-querystring v1.1.0 // indirect
5855
github.com/google/uuid v1.2.0
5956
github.com/gorilla/context v1.1.1
6057
github.com/gorilla/mux v1.8.0 // indirect
6158
github.com/gorilla/sessions v1.2.1 // indirect
6259
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
63-
github.com/hashicorp/go-retryablehttp v0.6.8 // indirect
64-
github.com/hashicorp/go-version v1.2.1
60+
github.com/hashicorp/go-version v1.3.1
6561
github.com/huandu/xstrings v1.3.2
66-
github.com/imdario/mergo v0.3.11 // indirect
67-
github.com/issue9/assert v1.3.2 // indirect
68-
github.com/issue9/identicon v1.0.1
62+
github.com/issue9/identicon v1.2.0
6963
github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7
7064
github.com/json-iterator/go v1.1.10
7165
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
72-
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
66+
github.com/kevinburke/ssh_config v1.1.0 // indirect
7367
github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4
74-
github.com/klauspost/compress v1.11.8
68+
github.com/klauspost/compress v1.12.1
7569
github.com/klauspost/pgzip v1.2.5 // indirect
7670
github.com/lafriks/xormstore v1.4.0
77-
github.com/lib/pq v1.9.0
78-
github.com/libdns/libdns v0.2.0 // indirect
71+
github.com/lib/pq v1.10.1
7972
github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96
80-
github.com/mailru/easyjson v0.7.7 // indirect
8173
github.com/markbates/goth v1.67.1
8274
github.com/mattn/go-isatty v0.0.12
83-
github.com/mattn/go-runewidth v0.0.10 // indirect
84-
github.com/mattn/go-sqlite3 v1.14.6
75+
github.com/mattn/go-runewidth v0.0.12 // indirect
76+
github.com/mattn/go-sqlite3 v1.14.7
8577
github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81
86-
github.com/mgechev/revive v1.0.3
87-
github.com/mholt/acmez v0.1.3 // indirect
78+
github.com/mgechev/revive v1.0.6
8879
github.com/mholt/archiver/v3 v3.5.0
89-
github.com/microcosm-cc/bluemonday v1.0.7
80+
github.com/microcosm-cc/bluemonday v1.0.8
9081
github.com/miekg/dns v1.1.40 // indirect
9182
github.com/minio/md5-simd v1.1.2 // indirect
9283
github.com/minio/minio-go/v7 v7.0.10
@@ -95,51 +86,45 @@ require (
9586
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect
9687
github.com/msteinert/pam v0.0.0-20201130170657-e61372126161
9788
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
98-
github.com/niklasfasching/go-org v1.4.0
99-
github.com/olekukonko/tablewriter v0.0.5 // indirect
89+
github.com/niklasfasching/go-org v1.5.0
10090
github.com/oliamb/cutter v0.2.2
101-
github.com/olivere/elastic/v7 v7.0.22
102-
github.com/pelletier/go-toml v1.8.1
91+
github.com/olivere/elastic/v7 v7.0.24
92+
github.com/pelletier/go-toml v1.9.0
10393
github.com/pierrec/lz4/v4 v4.1.3 // indirect
10494
github.com/pkg/errors v0.9.1
10595
github.com/pquerna/otp v1.3.0
106-
github.com/prometheus/client_golang v1.9.0
107-
github.com/prometheus/common v0.18.0 // indirect
108-
github.com/prometheus/procfs v0.6.0 // indirect
96+
github.com/prometheus/client_golang v1.10.0
10997
github.com/quasoft/websspi v1.0.0
11098
github.com/rivo/uniseg v0.2.0 // indirect
11199
github.com/russross/blackfriday/v2 v2.1.0 // indirect
112-
github.com/sergi/go-diff v1.1.0
100+
github.com/sergi/go-diff v1.2.0
113101
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
114102
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546
115-
github.com/spf13/afero v1.5.1 // indirect
116103
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
117104
github.com/stretchr/testify v1.7.0
118105
github.com/syndtr/goleveldb v1.0.0
119-
github.com/tinylib/msgp v1.1.5 // indirect
120106
github.com/tstranex/u2f v1.0.0
121107
github.com/ulikunitz/xz v0.5.10 // indirect
122108
github.com/unknwon/com v1.0.1
123109
github.com/unknwon/i18n v0.0.0-20210321134014-0ebbf2df1c44
124110
github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae
125-
github.com/unrolled/render v1.0.3
111+
github.com/unrolled/render v1.1.0
126112
github.com/urfave/cli v1.22.5
127113
github.com/willf/bitset v1.1.11 // indirect
128-
github.com/xanzy/go-gitlab v0.44.0
129-
github.com/xanzy/ssh-agent v0.3.0 // indirect
114+
github.com/xanzy/go-gitlab v0.48.0
130115
github.com/yohcop/openid-go v1.0.0
131-
github.com/yuin/goldmark v1.3.3
116+
github.com/yuin/goldmark v1.3.5
132117
github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691
133118
github.com/yuin/goldmark-meta v1.0.0
134119
go.jolheiser.com/hcaptcha v0.0.4
135120
go.jolheiser.com/pwn v0.0.3
136121
go.uber.org/multierr v1.6.0 // indirect
137122
go.uber.org/zap v1.16.0 // indirect
138-
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
139-
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4
140-
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93
141-
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44
142-
golang.org/x/text v0.3.5
123+
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b
124+
golang.org/x/net v0.0.0-20210421230115-4e50805a0758
125+
golang.org/x/oauth2 v0.0.0-20210413134643-5e61552d6c78
126+
golang.org/x/sys v0.0.0-20210421221651-33663a62ff08
127+
golang.org/x/text v0.3.6
143128
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
144129
golang.org/x/tools v0.1.0
145130
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
@@ -152,4 +137,4 @@ require (
152137
xorm.io/xorm v1.0.7
153138
)
154139

155-
replace github.com/hashicorp/go-version => github.com/6543/go-version v1.2.4
140+
replace github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1

0 commit comments

Comments
 (0)