Skip to content

Commit 78fb7f3

Browse files
committed
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: Display all user types and org types on admin management UI (go-gitea#27050) Apply lng2020 to maintainers (go-gitea#27068) Fix incorrect default branch label while switching between branches (go-gitea#27053) set version in snapcraft yaml Replace 'userxx' with 'orgxx' in all test files when the user type is org (go-gitea#27052) [skip ci] Updated translations via Crowdin Load reviewer before sending notification (go-gitea#27063) bump all nightly builds to 16gb Show the repo count in code tab on both user profile and org page. (go-gitea#27048) Fix Fomantic's line-height causing vertical scrollbars to appear (go-gitea#26961) Dashboard context dropdown position fix on landing page in mobile view. (go-gitea#27047)
2 parents 8251797 + 198a9ca commit 78fb7f3

File tree

108 files changed

+348
-304
lines changed

Some content is hidden

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

108 files changed

+348
-304
lines changed

.github/workflows/release-nightly.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
branches: [ main, release/v* ]
66

77
concurrency:
8-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
8+
group: ${{ github.workflow }}-${{ github.ref }}
99
cancel-in-progress: true
1010

1111
jobs:
1212
nightly-binary:
13-
runs-on: actuated-4cpu-8gb
13+
runs-on: actuated-4cpu-16gb
1414
steps:
1515
- uses: actions/checkout@v3
1616
# fetch all commits instead of only the last as some branches are long lived and could have many between versions
@@ -93,7 +93,7 @@ jobs:
9393
push: true
9494
tags: gitea/gitea:${{ steps.clean_name.outputs.branch }}
9595
nightly-docker-rootless:
96-
runs-on: actuated-4cpu-8gb
96+
runs-on: actuated-4cpu-16gb
9797
steps:
9898
- uses: actions/checkout@v3
9999
# fetch all commits instead of only the last as some branches are long lived and could have many between versions

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ Denys Konovalov <kontakt@denyskon.de> (@denyskon)
5656
Punit Inani <punitinani1@gmail.com> (@puni9869)
5757
CaiCandong <1290147055@qq.com> (@caicandong)
5858
Rui Chen <rui@chenrui.dev> (@chenrui333)
59+
Nanguan Lin <nanguanlin6@gmail.com> (@lng2020)

models/fixtures/email_address.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373
-
7474
id: 10
7575
uid: 3
76-
email: user3@example.com
77-
lower_email: user3@example.com
76+
email: org3@example.com
77+
lower_email: org3@example.com
7878
is_activated: true
7979
is_primary: true
8080

@@ -97,16 +97,16 @@
9797
-
9898
id: 13
9999
uid: 6
100-
email: user6@example.com
101-
lower_email: user6@example.com
100+
email: org6@example.com
101+
lower_email: org6@example.com
102102
is_activated: true
103103
is_primary: true
104104

105105
-
106106
id: 14
107107
uid: 7
108-
email: user7@example.com
109-
lower_email: user7@example.com
108+
email: org7@example.com
109+
lower_email: org7@example.com
110110
is_activated: true
111111
is_primary: true
112112

@@ -153,8 +153,8 @@
153153
-
154154
id: 20
155155
uid: 17
156-
email: user17@example.com
157-
lower_email: user17@example.com
156+
email: org17@example.com
157+
lower_email: org17@example.com
158158
is_activated: true
159159
is_primary: true
160160

@@ -169,8 +169,8 @@
169169
-
170170
id: 22
171171
uid: 19
172-
email: user19@example.com
173-
lower_email: user19@example.com
172+
email: org19@example.com
173+
lower_email: org19@example.com
174174
is_activated: true
175175
is_primary: true
176176

models/fixtures/repository.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
-
6565
id: 3
6666
owner_id: 3
67-
owner_name: user3
67+
owner_name: org3
6868
lower_name: repo3
6969
name: repo3
7070
default_branch: master
@@ -126,7 +126,7 @@
126126
-
127127
id: 5
128128
owner_id: 3
129-
owner_name: user3
129+
owner_name: org3
130130
lower_name: repo5
131131
name: repo5
132132
num_watches: 0
@@ -671,7 +671,7 @@
671671
-
672672
id: 23
673673
owner_id: 17
674-
owner_name: user17
674+
owner_name: org17
675675
lower_name: big_test_public_4
676676
name: big_test_public_4
677677
num_watches: 0
@@ -701,7 +701,7 @@
701701
-
702702
id: 24
703703
owner_id: 17
704-
owner_name: user17
704+
owner_name: org17
705705
lower_name: big_test_private_4
706706
name: big_test_private_4
707707
num_watches: 0
@@ -791,7 +791,7 @@
791791
-
792792
id: 27
793793
owner_id: 19
794-
owner_name: user19
794+
owner_name: org19
795795
lower_name: big_test_public_mirror_6
796796
name: big_test_public_mirror_6
797797
num_watches: 0
@@ -821,7 +821,7 @@
821821
-
822822
id: 28
823823
owner_id: 19
824-
owner_name: user19
824+
owner_name: org19
825825
lower_name: big_test_private_mirror_6
826826
name: big_test_private_mirror_6
827827
num_watches: 0
@@ -942,7 +942,7 @@
942942
-
943943
id: 32 # org public repo
944944
owner_id: 3
945-
owner_name: user3
945+
owner_name: org3
946946
lower_name: repo21
947947
name: repo21
948948
num_watches: 0

models/fixtures/review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,6 @@
129129
type: 1
130130
reviewer_id: 6
131131
issue_id: 11
132-
content: "singular review from user6 and final review for this pr"
132+
content: "singular review from org6 and final review for this pr"
133133
updated_unix: 946684831
134134
created_unix: 946684831

models/fixtures/user.yml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,17 @@
7676

7777
-
7878
id: 3
79-
lower_name: user3
80-
name: user3
79+
lower_name: org3
80+
name: org3
8181
full_name: ' <<<< >> >> > >> > >>> >> '
82-
email: user3@example.com
82+
email: org3@example.com
8383
keep_email_private: false
8484
email_notifications_preference: onmention
8585
passwd: ZogKvWdyEx:password
8686
passwd_hash_algo: dummy
8787
must_change_password: false
8888
login_source: 0
89-
login_name: user3
89+
login_name: org3
9090
type: 1
9191
salt: ZogKvWdyEx
9292
max_repo_creation: -1
@@ -98,7 +98,7 @@
9898
allow_create_organization: true
9999
prohibit_login: false
100100
avatar: avatar3
101-
avatar_email: user3@example.com
101+
avatar_email: org3@example.com
102102
use_custom_avatar: false
103103
num_followers: 0
104104
num_following: 0
@@ -187,17 +187,17 @@
187187

188188
-
189189
id: 6
190-
lower_name: user6
191-
name: user6
192-
full_name: User Six
193-
email: user6@example.com
190+
lower_name: org6
191+
name: org6
192+
full_name: Org Six
193+
email: org6@example.com
194194
keep_email_private: false
195195
email_notifications_preference: enabled
196196
passwd: ZogKvWdyEx:password
197197
passwd_hash_algo: dummy
198198
must_change_password: false
199199
login_source: 0
200-
login_name: user6
200+
login_name: org6
201201
type: 1
202202
salt: ZogKvWdyEx
203203
max_repo_creation: -1
@@ -209,7 +209,7 @@
209209
allow_create_organization: true
210210
prohibit_login: false
211211
avatar: avatar6
212-
avatar_email: user6@example.com
212+
avatar_email: org6@example.com
213213
use_custom_avatar: false
214214
num_followers: 0
215215
num_following: 0
@@ -224,17 +224,17 @@
224224

225225
-
226226
id: 7
227-
lower_name: user7
228-
name: user7
229-
full_name: User Seven
230-
email: user7@example.com
227+
lower_name: org7
228+
name: org7
229+
full_name: Org Seven
230+
email: org7@example.com
231231
keep_email_private: false
232232
email_notifications_preference: disabled
233233
passwd: ZogKvWdyEx:password
234234
passwd_hash_algo: dummy
235235
must_change_password: false
236236
login_source: 0
237-
login_name: user7
237+
login_name: org7
238238
type: 1
239239
salt: ZogKvWdyEx
240240
max_repo_creation: -1
@@ -246,7 +246,7 @@
246246
allow_create_organization: true
247247
prohibit_login: false
248248
avatar: avatar7
249-
avatar_email: user7@example.com
249+
avatar_email: org7@example.com
250250
use_custom_avatar: false
251251
num_followers: 0
252252
num_following: 0
@@ -594,17 +594,17 @@
594594

595595
-
596596
id: 17
597-
lower_name: user17
598-
name: user17
599-
full_name: User 17
600-
email: user17@example.com
597+
lower_name: org17
598+
name: org17
599+
full_name: org 17
600+
email: org17@example.com
601601
keep_email_private: false
602602
email_notifications_preference: enabled
603603
passwd: ZogKvWdyEx:password
604604
passwd_hash_algo: dummy
605605
must_change_password: false
606606
login_source: 0
607-
login_name: user17
607+
login_name: org17
608608
type: 1
609609
salt: ZogKvWdyEx
610610
max_repo_creation: -1
@@ -616,7 +616,7 @@
616616
allow_create_organization: true
617617
prohibit_login: false
618618
avatar: avatar17
619-
avatar_email: user17@example.com
619+
avatar_email: org17@example.com
620620
use_custom_avatar: false
621621
num_followers: 0
622622
num_following: 0
@@ -668,17 +668,17 @@
668668

669669
-
670670
id: 19
671-
lower_name: user19
672-
name: user19
673-
full_name: User 19
674-
email: user19@example.com
671+
lower_name: org19
672+
name: org19
673+
full_name: Org 19
674+
email: org19@example.com
675675
keep_email_private: false
676676
email_notifications_preference: enabled
677677
passwd: ZogKvWdyEx:password
678678
passwd_hash_algo: dummy
679679
must_change_password: false
680680
login_source: 0
681-
login_name: user19
681+
login_name: org19
682682
type: 1
683683
salt: ZogKvWdyEx
684684
max_repo_creation: -1
@@ -690,7 +690,7 @@
690690
allow_create_organization: true
691691
prohibit_login: false
692692
avatar: avatar19
693-
avatar_email: user19@example.com
693+
avatar_email: org19@example.com
694694
use_custom_avatar: false
695695
num_followers: 0
696696
num_following: 0

models/issues/assignees_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ func TestUpdateAssignee(t *testing.T) {
2727
_, _, err = issues_model.ToggleIssueAssignee(db.DefaultContext, issue, &user_model.User{ID: 1}, user2.ID)
2828
assert.NoError(t, err)
2929

30-
user3, err := user_model.GetUserByID(db.DefaultContext, 3)
30+
org3, err := user_model.GetUserByID(db.DefaultContext, 3)
3131
assert.NoError(t, err)
32-
_, _, err = issues_model.ToggleIssueAssignee(db.DefaultContext, issue, &user_model.User{ID: 1}, user3.ID)
32+
_, _, err = issues_model.ToggleIssueAssignee(db.DefaultContext, issue, &user_model.User{ID: 1}, org3.ID)
3333
assert.NoError(t, err)
3434

3535
user1, err := user_model.GetUserByID(db.DefaultContext, 1) // This user is already assigned (see the definition in fixtures), so running UpdateAssignee should unassign him
@@ -47,7 +47,7 @@ func TestUpdateAssignee(t *testing.T) {
4747
assert.NoError(t, err)
4848

4949
var expectedAssignees []*user_model.User
50-
expectedAssignees = append(expectedAssignees, user2, user3)
50+
expectedAssignees = append(expectedAssignees, user2, org3)
5151

5252
for in, assignee := range issue.Assignees {
5353
assert.Equal(t, assignee.ID, expectedAssignees[in].ID)

models/issues/issue_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,11 @@ func TestIssue_ResolveMentions(t *testing.T) {
430430
// Public repo, doer
431431
testSuccess("user2", "repo1", "user1", []string{"user1"}, []int64{})
432432
// Private repo, team member
433-
testSuccess("user17", "big_test_private_4", "user20", []string{"user2"}, []int64{2})
433+
testSuccess("org17", "big_test_private_4", "user20", []string{"user2"}, []int64{2})
434434
// Private repo, not a team member
435-
testSuccess("user17", "big_test_private_4", "user20", []string{"user5"}, []int64{})
435+
testSuccess("org17", "big_test_private_4", "user20", []string{"user5"}, []int64{})
436436
// Private repo, whole team
437-
testSuccess("user17", "big_test_private_4", "user15", []string{"user17/owners"}, []int64{18})
437+
testSuccess("org17", "big_test_private_4", "user15", []string{"org17/owners"}, []int64{18})
438438
}
439439

440440
func TestResourceIndex(t *testing.T) {

models/issues/issue_xref_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func TestXRef_AddCrossReferences(t *testing.T) {
5454
itarget = testCreateIssue(t, 3, 3, "title4", "content4", false)
5555

5656
// Cross-reference to issue #4 by admin
57-
content = fmt.Sprintf("content5, mentions user3/repo3#%d", itarget.Index)
57+
content = fmt.Sprintf("content5, mentions org3/repo3#%d", itarget.Index)
5858
i = testCreateIssue(t, 2, 1, "title5", content, false)
5959
ref = unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0})
6060
assert.Equal(t, issues_model.CommentTypeIssueRef, ref.Type)
@@ -63,7 +63,7 @@ func TestXRef_AddCrossReferences(t *testing.T) {
6363
assert.Equal(t, references.XRefActionNone, ref.RefAction)
6464

6565
// Cross-reference to issue #4 with no permission
66-
content = fmt.Sprintf("content6, mentions user3/repo3#%d", itarget.Index)
66+
content = fmt.Sprintf("content6, mentions org3/repo3#%d", itarget.Index)
6767
i = testCreateIssue(t, 4, 5, "title6", content, false)
6868
unittest.AssertNotExistsBean(t, &issues_model.Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0})
6969
}

models/issues/pull_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ func TestParseCodeOwnersLine(t *testing.T) {
317317
{Line: "# comment", Tokens: []string{}},
318318
{Line: "!.* @user1 @org1/team1", Tokens: []string{"!.*", "@user1", "@org1/team1"}},
319319
{Line: `.*\\.js @user2 #comment`, Tokens: []string{`.*\.js`, "@user2"}},
320-
{Line: `docs/(aws|google|azure)/[^/]*\\.(md|txt) @user3 @org2/team2`, Tokens: []string{`docs/(aws|google|azure)/[^/]*\.(md|txt)`, "@user3", "@org2/team2"}},
321-
{Line: `\#path @user3`, Tokens: []string{`#path`, "@user3"}},
322-
{Line: `path\ with\ spaces/ @user3`, Tokens: []string{`path with spaces/`, "@user3"}},
320+
{Line: `docs/(aws|google|azure)/[^/]*\\.(md|txt) @org3 @org2/team2`, Tokens: []string{`docs/(aws|google|azure)/[^/]*\.(md|txt)`, "@org3", "@org2/team2"}},
321+
{Line: `\#path @org3`, Tokens: []string{`#path`, "@org3"}},
322+
{Line: `path\ with\ spaces/ @org3`, Tokens: []string{`path with spaces/`, "@org3"}},
323323
}
324324

325325
for _, g := range given {
@@ -335,7 +335,7 @@ func TestGetApprovers(t *testing.T) {
335335
// to assert that there are no duplicated approvers.
336336
setting.Repository.PullRequest.DefaultMergeMessageOfficialApproversOnly = false
337337
approvers := pr.GetApprovers()
338-
expected := "Reviewed-by: User Five <user5@example.com>\nReviewed-by: User Six <user6@example.com>\n"
338+
expected := "Reviewed-by: User Five <user5@example.com>\nReviewed-by: Org Six <org6@example.com>\n"
339339
assert.EqualValues(t, expected, approvers)
340340
}
341341

0 commit comments

Comments
 (0)