Welcome to mirror list, hosted at ThFree Co, Russian Federation.

13_comments.rb « development « fixtures « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 626aba200d15b60253757520466bbe3929aa7126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Gitlab::Seeder.quiet do
  Issue.all.limit(10).each_with_index do |issue, i|
    5.times do
      user = issue.project.team.users.sample

      Gitlab::Seeder.by_user(user) do
        Note.seed(:id, [{
          project_id: issue.project.id,
          author_id: user.id,
          note: Faker::Lorem.sentence,
          noteable_id: issue.id,
          noteable_type: 'Issue'
        }])

        print '.'
      end
    end
  end
end