Skip to content

Commit f335dd1

Browse files
authored
Merge branch 'main' into feature/load-referencing-branches-and-tags
2 parents 6818614 + c42b718 commit f335dd1

File tree

12 files changed

+55
-55
lines changed

12 files changed

+55
-55
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,34 @@ 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.20.1](https://github.com/go-gitea/gitea/releases/tag/1.20.1) - 2023-07-22
8+
9+
* SECURITY
10+
* Disallow dangerous URL schemes (#25960) (#25964)
11+
* ENHANCEMENTS
12+
* Show the mismatched ROOT_URL warning on the sign-in page if OAuth2 is enabled (#25947) (#25972)
13+
* Make pending commit status yellow again (#25935) (#25968)
14+
* BUGFIXES
15+
* Fix version in rpm repodata/primary.xml.gz (#26009) (#26048)
16+
* Fix env config parsing for "GITEA____APP_NAME" (#26001) (#26013)
17+
* ParseScope with owner/repo always sets owner to zero (#25987) (#25989)
18+
* Fix SSPI auth panic (#25955) (#25969)
19+
* Avoid creating directories when loading config (#25944) (#25957)
20+
* Make environment-to-ini work with INSTALL_LOCK=true (#25926) (#25937)
21+
* Ignore `runs-on` with expressions when warning no matched runners (#25917) (#25933)
22+
* Avoid opening/closing PRs which are already merged (#25883) (#25903)
23+
* DOCS
24+
* RPM Registry: Show zypper commands for SUSE based distros as well (#25981) (#26020)
25+
* Correctly refer to dev tags as nightly in the docker docs (#26004) (#26019)
26+
* Update path related documents (#25417) (#25982)
27+
* MISC
28+
* Adding remaining enum for migration repo model type. (#26021) (#26034)
29+
* Fix the route for pull-request's authors (#26016) (#26018)
30+
* Fix commit status color on dashboard repolist (#25993) (#25998)
31+
* Avoid hard-coding height in language dropdown menu (#25986) (#25997)
32+
* Add shutting down notice (#25920) (#25922)
33+
* Fix incorrect milestone count when provide a keyword (#25880) (#25904)
34+
735
## [1.20.0](https://github.com/go-gitea/gitea/releases/tag/v1.20.0) - 2023-07-16
836

937
* BREAKING

docs/content/doc/usage/secrets.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ menu:
1818
# Secrets
1919

2020
Secrets allow you to store sensitive information in your user, organization or repository.
21-
Secrets are available on Gitea 1.19+.
21+
Secrets are available on Gitea 1.19+ and are only visible in 1.20+ when ACTIONS are enabled
2222

2323
# Naming your secrets
2424

options/locale/locale_en-US.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ issues.context.quote_reply = Quote Reply
14511451
issues.context.reference_issue = Reference in New Issue
14521452
issues.context.edit = Edit
14531453
issues.context.delete = Delete
1454-
issues.no_content = There is no content yet.
1454+
issues.no_content = No description provided.
14551455
issues.close = Close Issue
14561456
issues.comment_pull_merged_at = merged commit %[1]s into %[2]s %[3]s
14571457
issues.comment_manually_pull_merged_at = manually merged commit %[1]s into %[2]s %[3]s

routers/web/web.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,6 @@ func registerRoutes(m *web.Route) {
10911091
}, context.RepoRef(), canEnableEditor, context.RepoMustNotBeArchived())
10921092

10931093
m.Group("/branches", func() {
1094-
m.Get("/list", repo.GetBranchesList)
10951094
m.Group("/_new", func() {
10961095
m.Post("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.CreateBranch)
10971096
m.Post("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.CreateBranch)
@@ -1248,6 +1247,7 @@ func registerRoutes(m *web.Route) {
12481247
}, repo.MustBeNotEmpty, dlSourceEnabled, reqRepoCodeReader)
12491248

12501249
m.Group("/branches", func() {
1250+
m.Get("/list", repo.GetBranchesList)
12511251
m.Get("", repo.Branches)
12521252
}, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader)
12531253

services/packages/rpm/repository.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ func buildPrimary(pv *packages_model.PackageVersion, pfs []*packages_model.Packa
378378
Architecture: pd.FileMetadata.Architecture,
379379
Version: Version{
380380
Epoch: pd.FileMetadata.Epoch,
381-
Version: pd.Version.Version,
381+
Version: pd.FileMetadata.Version,
382382
Release: pd.FileMetadata.Release,
383383
},
384384
Checksum: Checksum{
@@ -466,7 +466,7 @@ func buildFilelists(pv *packages_model.PackageVersion, pfs []*packages_model.Pac
466466
Architecture: pd.FileMetadata.Architecture,
467467
Version: Version{
468468
Epoch: pd.FileMetadata.Epoch,
469-
Version: pd.Version.Version,
469+
Version: pd.FileMetadata.Version,
470470
Release: pd.FileMetadata.Release,
471471
},
472472
Files: pd.FileMetadata.Files,
@@ -513,7 +513,7 @@ func buildOther(pv *packages_model.PackageVersion, pfs []*packages_model.Package
513513
Architecture: pd.FileMetadata.Architecture,
514514
Version: Version{
515515
Epoch: pd.FileMetadata.Epoch,
516-
Version: pd.Version.Version,
516+
Version: pd.FileMetadata.Version,
517517
Release: pd.FileMetadata.Release,
518518
},
519519
Changelogs: pd.FileMetadata.Changelogs,

templates/admin/emails/list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
{{range .Emails}}
4848
<tr>
4949
<td><a href="{{AppSubUrl}}/{{.Name | PathEscape}}">{{.Name}}</a></td>
50-
<td><span class="text truncate">{{.FullName}}</span></td>
51-
<td><span class="text email">{{.Email}}</span></td>
50+
<td class="gt-ellipsis gt-max-width-12rem">{{.FullName}}</td>
51+
<td class="gt-ellipsis gt-max-width-12rem">{{.Email}}</td>
5252
<td>{{if .IsPrimary}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
5353
<td>
5454
{{if .CanChange}}

templates/admin/packages/list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
{{end}}
5757
</td>
5858
<td>{{.Package.Type.Name}}</td>
59-
<td class="text truncate email">{{.Package.Name}}</td>
60-
<td><a href="{{.FullWebLink}}" class="text truncate email">{{.Version.Version}}</a></td>
59+
<td class="gt-ellipsis gt-max-width-12rem">{{.Package.Name}}</td>
60+
<td class="gt-ellipsis gt-max-width-12rem"><a href="{{.FullWebLink}}">{{.Version.Version}}</a></td>
6161
<td><a href="{{.Creator.HomeLink}}">{{.Creator.Name}}</a></td>
6262
<td>
6363
{{if .Repository}}

templates/admin/user/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<tr>
8686
<td>{{.ID}}</td>
8787
<td><a href="{{.HomeLink}}">{{.Name}}</a></td>
88-
<td><span class="text truncate email">{{.Email}}</span></td>
88+
<td class="gt-ellipsis gt-max-width-12rem">{{.Email}}</td>
8989
<td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
9090
<td>{{if .IsAdmin}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>
9191
<td>{{if .IsRestricted}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td>

tests/integration/api_packages_rpm_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,15 @@ gpgkey=%sapi/packages/%s/rpm/repository.key`, user.Name, user.Name, setting.AppN
196196
switch d.Type {
197197
case "primary":
198198
assert.EqualValues(t, 718, d.Size)
199-
assert.EqualValues(t, 1731, d.OpenSize)
199+
assert.EqualValues(t, 1729, d.OpenSize)
200200
assert.Equal(t, "repodata/primary.xml.gz", d.Location.Href)
201201
case "filelists":
202-
assert.EqualValues(t, 258, d.Size)
203-
assert.EqualValues(t, 328, d.OpenSize)
202+
assert.EqualValues(t, 257, d.Size)
203+
assert.EqualValues(t, 326, d.OpenSize)
204204
assert.Equal(t, "repodata/filelists.xml.gz", d.Location.Href)
205205
case "other":
206-
assert.EqualValues(t, 308, d.Size)
207-
assert.EqualValues(t, 396, d.OpenSize)
206+
assert.EqualValues(t, 306, d.Size)
207+
assert.EqualValues(t, 394, d.OpenSize)
208208
assert.Equal(t, "repodata/other.xml.gz", d.Location.Href)
209209
}
210210
}

tests/integration/auth_ldap_test.go

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -226,45 +226,20 @@ func TestLDAPUserSync(t *testing.T) {
226226
addAuthSourceLDAP(t, "", "")
227227
auth.SyncExternalUsers(context.Background(), true)
228228

229-
session := loginUser(t, "user1")
230229
// Check if users exists
231-
for _, u := range gitLDAPUsers {
232-
req := NewRequest(t, "GET", "/admin/users?q="+u.UserName)
233-
resp := session.MakeRequest(t, req, http.StatusOK)
234-
235-
htmlDoc := NewHTMLParser(t, resp.Body)
236-
237-
tr := htmlDoc.doc.Find("table.table tbody tr")
238-
if !assert.True(t, tr.Length() == 1) {
239-
continue
240-
}
241-
tds := tr.Find("td")
242-
if !assert.True(t, tds.Length() > 0) {
243-
continue
244-
}
245-
assert.Equal(t, u.UserName, strings.TrimSpace(tds.Find("td:nth-child(2) a").Text()))
246-
assert.Equal(t, u.Email, strings.TrimSpace(tds.Find("td:nth-child(3) span").Text()))
247-
if u.IsAdmin {
248-
assert.True(t, tds.Find("td:nth-child(5) svg").HasClass("octicon-check"))
249-
} else {
250-
assert.True(t, tds.Find("td:nth-child(5) svg").HasClass("octicon-x"))
251-
}
252-
if u.IsRestricted {
253-
assert.True(t, tds.Find("td:nth-child(6) svg").HasClass("octicon-check"))
254-
} else {
255-
assert.True(t, tds.Find("td:nth-child(6) svg").HasClass("octicon-x"))
256-
}
230+
for _, gitLDAPUser := range gitLDAPUsers {
231+
dbUser, err := user_model.GetUserByName(db.DefaultContext, gitLDAPUser.UserName)
232+
assert.NoError(t, err)
233+
assert.Equal(t, gitLDAPUser.UserName, dbUser.Name)
234+
assert.Equal(t, gitLDAPUser.Email, dbUser.Email)
235+
assert.Equal(t, gitLDAPUser.IsAdmin, dbUser.IsAdmin)
236+
assert.Equal(t, gitLDAPUser.IsRestricted, dbUser.IsRestricted)
257237
}
258238

259239
// Check if no users exist
260-
for _, u := range otherLDAPUsers {
261-
req := NewRequest(t, "GET", "/admin/users?q="+u.UserName)
262-
resp := session.MakeRequest(t, req, http.StatusOK)
263-
264-
htmlDoc := NewHTMLParser(t, resp.Body)
265-
266-
tr := htmlDoc.doc.Find("table.table tbody tr")
267-
assert.True(t, tr.Length() == 0)
240+
for _, otherLDAPUser := range otherLDAPUsers {
241+
_, err := user_model.GetUserByName(db.DefaultContext, otherLDAPUser.UserName)
242+
assert.True(t, user_model.IsErrUserNotExist(err))
268243
}
269244
}
270245

web_src/css/admin.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
2626
margin: 12px -1rem -1rem;
2727
}
2828

29-
.admin.user table.table .email {
30-
max-width: 200px;
31-
}
32-
3329
.admin dl.admin-dl-horizontal {
3430
padding: 1em;
3531
margin: 0;

web_src/css/helpers.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Gitea's private styles use `g-` prefix.
5252
text-overflow: ellipsis;
5353
}
5454

55+
.gt-max-width-12rem { max-width: 12rem !important; }
5556
.gt-max-width-24rem { max-width: 24rem !important; }
5657

5758
/* below class names match Tailwind CSS */

0 commit comments

Comments
 (0)