Skip to content

Commit 550dc02

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Changelog 1.17.1 (go-gitea#20833) (go-gitea#20919) Fix typo in backup documentation (pgdump->pg_dump) (go-gitea#20913) Increase Content field size of gpg_key and public_key to MEDIUMTEXT (go-gitea#20896) Improve single repo action for issue and pull requests (go-gitea#20730) Remove deprecated licenses (go-gitea#20222)
2 parents 99ed96c + fa8fc5d commit 550dc02

File tree

14 files changed

+93
-126
lines changed

14 files changed

+93
-126
lines changed

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,45 @@ This changelog goes through all the changes that have been made in each release
44
without substantial changes to our git log; to see the highlights of what has
55
been added to each release, please refer to the [blog](https://blog.gitea.io).
66

7+
## [1.17.1](https://github.com/go-gitea/gitea/releases/tag/1.17.1) - 2022-08-17
8+
9+
* SECURITY
10+
* Correctly escape within tribute.js (#20831) (#20832)
11+
* ENHANCEMENTS
12+
* Add support for NuGet API keys (#20721) (#20734)
13+
* Display project in issue list (#20583)
14+
* Add disable download source configuration (#20548) (#20579)
15+
* Add username check to doctor (#20140) (#20671)
16+
* Enable Wire 2 for Internal SSH Server (#20616) (#20617)
17+
* BUGFIXES
18+
* Use the total issue count for UI (#20785) (#20827)
19+
* Add proxy host into allow list (#20798) (#20819)
20+
* Add missing translation for queue flush workers (#20791) (#20792)
21+
* Improve comment header for mobile (#20781) (#20789)
22+
* Fix git.Init for doctor sub-command (#20782) (#20783)
23+
* Check webhooks slice length before calling xorm (#20642) (#20768)
24+
* Remove manual rollback for failed generated repositories (#20639) (#20762)
25+
* Use correct field name in npm template (#20675) (#20760)
26+
* Keep download count on Container tag overwrite (#20728) (#20735)
27+
* Fix v220 migration to be compatible for MSSQL 2008 r2 (#20702) (#20707)
28+
* Use request timeout for git service rpc (#20689) (#20693)
29+
* Send correct NuGet status codes (#20647) (#20677)
30+
* Use correct context to get package content (#20673) (#20676)
31+
* Fix the JS error "EventSource is not defined" caused by some non-standard browsers (#20584) (#20663)
32+
* Add default commit messages to PR for squash merge (#20618) (#20645)
33+
* Fix package upload for files >32mb (#20622) (#20635)
34+
* Fix the new-line copy-paste for rendered code (#20612)
35+
* Clean up and fix clone button script (#20415 & #20600) (#20599)
36+
* Fix default merge style (#20564) (#20565)
37+
* Add repository condition for issue count (#20454) (#20496)
38+
* Make branch icon stand out more (#20726) (#20774)
39+
* Fix loading button with invalid form (#20754) (#20759)
40+
* Fix SecToTime edge-cases (#20610) (#20611)
41+
* Executable check always returns true for windows (#20637) (#20835)
42+
* Check issue labels slice length before calling xorm Insert (#20655) (#20836)
43+
* Fix owners cannot create organization repos bug (#20841) (#20854)
44+
* Prevent 500 is head repo does not have PullRequest unit in IsUserAllowedToUpdate (#20839) (#20848)
45+
746
## [1.17.0](https://github.com/go-gitea/gitea/releases/tag/v1.17.0) - 2022-07-30
847

948
* BREAKING

build/generate-licenses.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ func main() {
3939

4040
defer util.Remove(file.Name())
4141

42+
if err := os.RemoveAll(destination); err != nil {
43+
log.Fatalf("Cannot clean destination folder: %v", err)
44+
}
45+
46+
if err := os.MkdirAll(destination, 0o755); err != nil {
47+
log.Fatalf("Cannot create destination: %v", err)
48+
}
49+
4250
req, err := http.NewRequest("GET", url, nil)
4351
if err != nil {
4452
log.Fatalf("Failed to download archive. %s", err)

docs/content/doc/usage/backup-and-restore.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The SQL dump created by `gitea dump` uses XORM and Gitea admins may prefer to us
6262
# mysql
6363
mysqldump -u$USER -p$PASS --database $DATABASE > gitea-db.sql
6464
# postgres
65-
pgdump -U $USER $DATABASE > gitea-db.sql
65+
pg_dump -U $USER $DATABASE > gitea-db.sql
6666
```
6767

6868
### Using Docker (`dump`)

models/asymkey/gpg_key.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ type GPGKey struct {
3333
OwnerID int64 `xorm:"INDEX NOT NULL"`
3434
KeyID string `xorm:"INDEX CHAR(16) NOT NULL"`
3535
PrimaryKeyID string `xorm:"CHAR(16)"`
36-
Content string `xorm:"TEXT NOT NULL"`
36+
Content string `xorm:"MEDIUMTEXT NOT NULL"`
3737
CreatedUnix timeutil.TimeStamp `xorm:"created"`
3838
ExpiredUnix timeutil.TimeStamp
3939
AddedUnix timeutil.TimeStamp

models/asymkey/ssh_key.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type PublicKey struct {
4141
OwnerID int64 `xorm:"INDEX NOT NULL"`
4242
Name string `xorm:"NOT NULL"`
4343
Fingerprint string `xorm:"INDEX NOT NULL"`
44-
Content string `xorm:"TEXT NOT NULL"`
44+
Content string `xorm:"MEDIUMTEXT NOT NULL"`
4545
Mode perm.AccessMode `xorm:"NOT NULL DEFAULT 2"`
4646
Type KeyType `xorm:"NOT NULL DEFAULT 1"`
4747
LoginSourceID int64 `xorm:"NOT NULL DEFAULT 0"`

models/migrations/migrations.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,13 @@ var migrations = []Migration{
406406
NewMigration("Drop old CredentialID column", dropOldCredentialIDColumn),
407407
// v223 -> v224
408408
NewMigration("Rename CredentialIDBytes column to CredentialID", renameCredentialIDBytes),
409+
410+
// Gitea 1.17.0 ends at v224
411+
409412
// v224 -> v225
410-
NewMigration("Add badges to users", creatUserBadgesTable),
413+
NewMigration("Add badges to users", createUserBadgesTable),
414+
// v225 -> v226
415+
NewMigration("Alter gpg_key/public_key content TEXT fields to MEDIUMTEXT", alterPublicGPGKeyContentFieldsToMediumText),
411416
}
412417

413418
// GetCurrentDBVersion returns the current db version

models/migrations/v224.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"xorm.io/xorm"
99
)
1010

11-
func creatUserBadgesTable(x *xorm.Engine) error {
11+
func createUserBadgesTable(x *xorm.Engine) error {
1212
type Badge struct {
1313
ID int64 `xorm:"pk autoincr"`
1414
Description string

models/migrations/v225.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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/setting"
9+
10+
"xorm.io/xorm"
11+
)
12+
13+
func alterPublicGPGKeyContentFieldsToMediumText(x *xorm.Engine) error {
14+
sess := x.NewSession()
15+
defer sess.Close()
16+
if err := sess.Begin(); err != nil {
17+
return err
18+
}
19+
20+
if setting.Database.UseMySQL {
21+
if _, err := sess.Exec("ALTER TABLE `gpg_key` CHANGE `content` `content` MEDIUMTEXT"); err != nil {
22+
return err
23+
}
24+
if _, err := sess.Exec("ALTER TABLE `public_key` CHANGE `content` `content` MEDIUMTEXT"); err != nil {
25+
return err
26+
}
27+
}
28+
return sess.Commit()
29+
}

0 commit comments

Comments
 (0)