Skip to content

Commit e10a04e

Browse files
committed
Merge branch 'main' of https://github.com/go-gitea/gitea into oauth-client-type
2 parents d7f3ccb + 69fc510 commit e10a04e

File tree

40 files changed

+460
-172
lines changed

40 files changed

+460
-172
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ steps:
573573
- name: test-e2e
574574
image: mcr.microsoft.com/playwright:v1.24.0-focal
575575
commands:
576-
- curl -sLO https://go.dev/dl/go1.18.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz
576+
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
577577
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
578578
- apt-get -qq update && apt-get -qqy install build-essential
579579
- export TEST_PGSQL_SCHEMA=''

assets/go-licenses.json

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

custom/conf/app.example.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ ROUTER = console
887887
;USE_COMPAT_SSH_URI = false
888888
;;
889889
;; Close issues as long as a commit on any branch marks it as fixed
890-
;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki
890+
;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki, repo.projects
891891
;DISABLED_REPO_UNITS =
892892
;;
893893
;; Comma separated list of default repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects.

docs/content/doc/upgrade/from-gitea.en-us.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
22
date: "2021-09-02T16:00:00+08:00"
33
title: "Upgrade from an old Gitea"
4+
aliases:
5+
- /en-us/upgrade/
46
slug: "upgrade-from-gitea"
57
weight: 10
68
toc: false

docs/static/_redirects

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ https://gitea-docs.netlify.com/* https://docs.gitea.io/:splat 302!
1010
/en-us/ci-cd/ /en-us/integrations/ 302!
1111
/en-us/third-party-tools/ /en-us/integrations/ 302!
1212
/en-us/make/ /en-us/hacking-on-gitea/ 302!
13+
/en-us/upgrade/ /en-us/upgrade-from-gitea/ 302!
14+
/fr-fr/upgrade/ /fr-fr/upgrade-from-gitea/ 302!
15+
/zh-cn/upgrade/ /zh-cn/upgrade-from-gitea/ 302!
16+
/zh-tw/upgrade/ /zh-tw/upgrade-from-gitea/ 302!

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ require (
3535
github.com/go-ap/jsonld v0.0.0-20220917142617-76bf51585778
3636
github.com/go-chi/chi/v5 v5.0.7
3737
github.com/go-chi/cors v1.2.1
38-
github.com/go-enry/go-enry/v2 v2.8.2
38+
github.com/go-enry/go-enry/v2 v2.8.3
3939
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e
4040
github.com/go-git/go-billy/v5 v5.3.1
4141
github.com/go-git/go-git/v5 v5.4.3-0.20220529141257-bc1f419cebcf

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,8 @@ github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8=
485485
github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
486486
github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4=
487487
github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
488-
github.com/go-enry/go-enry/v2 v2.8.2 h1:uiGmC+3K8sVd/6DOe2AOJEOihJdqda83nPyJNtMR8RI=
489-
github.com/go-enry/go-enry/v2 v2.8.2/go.mod h1:GVzIiAytiS5uT/QiuakK7TF1u4xDab87Y8V5EJRpsIQ=
488+
github.com/go-enry/go-enry/v2 v2.8.3 h1:BwvNrN58JqBJhyyVdZSl5QD3xoxEEGYUrRyPh31FGhw=
489+
github.com/go-enry/go-enry/v2 v2.8.3/go.mod h1:GVzIiAytiS5uT/QiuakK7TF1u4xDab87Y8V5EJRpsIQ=
490490
github.com/go-enry/go-oniguruma v1.2.1 h1:k8aAMuJfMrqm/56SG2lV9Cfti6tC4x8673aHCcBk+eo=
491491
github.com/go-enry/go-oniguruma v1.2.1/go.mod h1:bWDhYP+S6xZQgiRL7wlTScFYBe023B6ilRZbCAD5Hf4=
492492
github.com/go-fed/httpsig v1.1.1-0.20201223112313-55836744818e h1:oRq/fiirun5HqlEWMLIcDmLpIELlG4iGbd0s8iqgPi8=

models/migrations/migrations.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,8 @@ var migrations = []Migration{
414414
// v225 -> v226
415415
NewMigration("Alter gpg_key/public_key content TEXT fields to MEDIUMTEXT", alterPublicGPGKeyContentFieldsToMediumText),
416416
// v226 -> v227
417+
NewMigration("Conan and generic packages do not need to be semantically versioned", fixPackageSemverField),
418+
// v227 -> v228
417419
NewMigration("Add confidential column default true to OAuth2Application table", addConfidentialColumnToOAuth2ApplicationTable),
418420
}
419421

models/migrations/v226.go

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,11 @@
55
package migrations
66

77
import (
8-
"code.gitea.io/gitea/modules/timeutil"
8+
"xorm.io/builder"
99
"xorm.io/xorm"
1010
)
1111

12-
// addConfidentialColumnToOAuth2ApplicationTable: add Confidential column, setting existing rows to true
13-
func addConfidentialColumnToOAuth2ApplicationTable(x *xorm.Engine) error {
14-
type OAuth2Application struct {
15-
ID int64 `xorm:"pk autoincr"`
16-
UID int64 `xorm:"INDEX"`
17-
Name string
18-
ClientID string `xorm:"unique"`
19-
ClientSecret string
20-
Confidential bool `xorm:"NOT NULL DEFAULT TRUE"`
21-
RedirectURIs []string `xorm:"redirect_uris JSON TEXT"`
22-
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
23-
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
24-
}
25-
26-
return x.Sync(new(OAuth2Application))
12+
func fixPackageSemverField(x *xorm.Engine) error {
13+
_, err := x.Exec(builder.Update(builder.Eq{"semver_compatible": false}).From("`package`").Where(builder.In("`type`", "conan", "generic")))
14+
return err
2715
}

models/migrations/v227.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Copyright 2022 The Gitea Authors. All rights reserved.
2+
// Use of this source code is governed by a MIT-style
3+
// license that can be found in the LICENSE file.
4+
5+
package migrations
6+
7+
import (
8+
"code.gitea.io/gitea/modules/timeutil"
9+
"xorm.io/xorm"
10+
)
11+
12+
// addConfidentialColumnToOAuth2ApplicationTable: add Confidential column, setting existing rows to true
13+
func addConfidentialColumnToOAuth2ApplicationTable(x *xorm.Engine) error {
14+
type OAuth2Application struct {
15+
ID int64 `xorm:"pk autoincr"`
16+
UID int64 `xorm:"INDEX"`
17+
Name string
18+
ClientID string `xorm:"unique"`
19+
ClientSecret string
20+
Confidential bool `xorm:"NOT NULL DEFAULT TRUE"`
21+
RedirectURIs []string `xorm:"redirect_uris JSON TEXT"`
22+
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"`
23+
UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"`
24+
}
25+
26+
return x.Sync(new(OAuth2Application))
27+
}

0 commit comments

Comments
 (0)