mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Issues overview should not show issues from archived repos (#13220)
* Add lots of comments to user.Issues() * Answered some questions from comments * fix typo in comment * Refac user.Issues(): add func repoIDs * Refac user.Issues(): add func userRepoIDs * Refac user.Issues(): add func issueIDsFromSearch * Refac user.Issues(): improve error handling * Refac user.Issues(): add inline documentation and move variable declarations closer to their usages * Refac user.Issues(): add func repoIDMap * Refac user.Issues(): cleanup * Refac: Separate Issues from Pulls during routing * fix typo in comment * Adapt Unittests to Refactoring * Issue13171: Issue and PR Overviews now ignore archived Repositories * changed some verbatim SQL conditions to builder.Eq * models/issue.go: use OptionalBool properly Co-authored-by: 6543 <6543@obermui.de> * Use IsArchived rather than ExcludeArchivedRepos * fixed broken test after merge * added nil check * Added Unit Test securing Issue 13171 fix * Improved IsArchived filtering in issue.GetUserIssueStats * Removed unused func * Added grouping to avoid returning duplicate repo IDs Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Gitea <gitea@fake.local> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
81467e6f35
commit
564030336d
14 changed files with 494 additions and 167 deletions
|
@ -147,3 +147,28 @@
|
|||
is_pull: true
|
||||
created_unix: 1602935696
|
||||
updated_unix: 1602935696
|
||||
|
||||
|
||||
-
|
||||
id: 13
|
||||
repo_id: 50
|
||||
index: 0
|
||||
poster_id: 2
|
||||
name: issue in active repo
|
||||
content: we'll be testing github issue 13171 with this.
|
||||
is_closed: false
|
||||
is_pull: false
|
||||
created_unix: 1602935696
|
||||
updated_unix: 1602935696
|
||||
|
||||
-
|
||||
id: 14
|
||||
repo_id: 51
|
||||
index: 0
|
||||
poster_id: 2
|
||||
name: issue in archived repo
|
||||
content: we'll be testing github issue 13171 with this.
|
||||
is_closed: false
|
||||
is_pull: false
|
||||
created_unix: 1602935696
|
||||
updated_unix: 1602935696
|
||||
|
|
|
@ -532,3 +532,15 @@
|
|||
repo_id: 3
|
||||
type: 8
|
||||
created_unix: 946684810
|
||||
|
||||
-
|
||||
id: 78
|
||||
repo_id: 50
|
||||
type: 2
|
||||
created_unix: 946684810
|
||||
|
||||
-
|
||||
id: 79
|
||||
repo_id: 51
|
||||
type: 2
|
||||
created_unix: 946684810
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
owner_name: user2
|
||||
lower_name: repo1
|
||||
name: repo1
|
||||
is_archived: false
|
||||
is_empty: false
|
||||
is_private: false
|
||||
num_issues: 2
|
||||
|
@ -23,6 +24,7 @@
|
|||
owner_name: user2
|
||||
lower_name: repo2
|
||||
name: repo2
|
||||
is_archived: false
|
||||
is_private: true
|
||||
num_issues: 2
|
||||
num_closed_issues: 1
|
||||
|
@ -693,3 +695,43 @@
|
|||
num_issues: 0
|
||||
is_mirror: false
|
||||
status: 0
|
||||
|
||||
-
|
||||
id: 50
|
||||
owner_id: 30
|
||||
owner_name: user30
|
||||
lower_name: repo50
|
||||
name: repo50
|
||||
is_archived: false
|
||||
is_empty: false
|
||||
is_private: false
|
||||
num_issues: 1
|
||||
num_closed_issues: 0
|
||||
num_pulls: 0
|
||||
num_closed_pulls: 0
|
||||
num_milestones: 0
|
||||
num_closed_milestones: 0
|
||||
num_watches: 0
|
||||
num_projects: 0
|
||||
num_closed_projects: 0
|
||||
status: 0
|
||||
|
||||
-
|
||||
id: 51
|
||||
owner_id: 30
|
||||
owner_name: user30
|
||||
lower_name: repo51
|
||||
name: repo51
|
||||
is_archived: true
|
||||
is_empty: false
|
||||
is_private: false
|
||||
num_issues: 1
|
||||
num_closed_issues: 0
|
||||
num_pulls: 0
|
||||
num_closed_pulls: 0
|
||||
num_milestones: 0
|
||||
num_closed_milestones: 0
|
||||
num_watches: 0
|
||||
num_projects: 0
|
||||
num_closed_projects: 0
|
||||
status: 0
|
|
@ -507,3 +507,21 @@
|
|||
avatar_email: user29@example.com
|
||||
num_repos: 0
|
||||
is_active: true
|
||||
|
||||
|
||||
-
|
||||
id: 30
|
||||
lower_name: user30
|
||||
name: user30
|
||||
full_name: User Thirty
|
||||
email: user30@example.com
|
||||
passwd_hash_algo: argon2
|
||||
passwd: a3d5fcd92bae586c2e3dbe72daea7a0d27833a8d0227aa1704f4bbd775c1f3b03535b76dd93b0d4d8d22a519dca47df1547b # password
|
||||
type: 0 # individual
|
||||
salt: ZogKvWdyEx
|
||||
is_admin: false
|
||||
is_restricted: true
|
||||
avatar: avatar29
|
||||
avatar_email: user30@example.com
|
||||
num_repos: 2
|
||||
is_active: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue