From ea20adaa84cbff762fcaa7f2d5fa6b7bf56706ec Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Thu, 13 Sep 2018 10:33:48 +0800 Subject: feat(repo): support search repository by topic name (#4505) * feat(repo): support search repository by topic name --- models/fixtures/repo_topic.yml | 8 ++++++++ models/fixtures/repository.yml | 22 ++++++++++++++++++++++ models/fixtures/topic.yml | 6 +++++- models/fixtures/user.yml | 15 +++++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) (limited to 'models/fixtures') diff --git a/models/fixtures/repo_topic.yml b/models/fixtures/repo_topic.yml index 58937031cd..7041ccfd09 100644 --- a/models/fixtures/repo_topic.yml +++ b/models/fixtures/repo_topic.yml @@ -9,3 +9,11 @@ - repo_id: 1 topic_id: 3 + +- + repo_id: 33 + topic_id: 1 + +- + repo_id: 33 + topic_id: 4 diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml index 54f3ed7b09..c2987b9658 100644 --- a/models/fixtures/repository.yml +++ b/models/fixtures/repository.yml @@ -407,3 +407,25 @@ lower_name: utf8 name: utf8 is_private: false + +- + id: 34 + owner_id: 21 + lower_name: golang + name: golang + is_private: false + num_stars: 0 + num_forks: 0 + num_issues: 0 + is_mirror: false + +- + id: 35 + owner_id: 21 + lower_name: graphql + name: graphql + is_private: false + num_stars: 0 + num_forks: 0 + num_issues: 0 + is_mirror: false diff --git a/models/fixtures/topic.yml b/models/fixtures/topic.yml index b6b94ff4d9..c868b207cb 100644 --- a/models/fixtures/topic.yml +++ b/models/fixtures/topic.yml @@ -1,7 +1,7 @@ - id: 1 name: golang - repo_count: 1 + repo_count: 2 - id: 2 @@ -11,3 +11,7 @@ - id: 3 name: SQL repo_count: 1 + +- id: 4 + name: graphql + repo_count: 1 diff --git a/models/fixtures/user.yml b/models/fixtures/user.yml index 55606e42b9..b3850e3599 100644 --- a/models/fixtures/user.yml +++ b/models/fixtures/user.yml @@ -314,3 +314,18 @@ avatar_email: user20@example.com num_repos: 4 is_active: true + +- + id: 21 + lower_name: user21 + name: user21 + full_name: User 21 + email: user21@example.com + passwd: 7d93daa0d1e6f2305cc8fa496847d61dc7320bb16262f9c55dd753480207234cdd96a93194e408341971742f4701772a025a # password + type: 0 # individual + salt: ZogKvWdyEx + is_admin: false + avatar: avatar21 + avatar_email: user21@example.com + num_repos: 2 + is_active: true -- cgit v1.2.3