Get only assigned issues
# File app/controllers/groups_controller.rb, line 26 def issues @user = current_user @issues = current_user.assigned_issues.opened @issues = @issues.of_group(@group).recent.page(params[:page]).per(20) @issues = @issues.includes(:author, :project) respond_to do |format| format.html format.atom { render layout: false } end end
Get authored or assigned open merge requests
# File app/controllers/groups_controller.rb, line 20 def merge_requests @merge_requests = current_user.cared_merge_requests @merge_requests = @merge_requests.of_group(@group).recent.page(params[:page]).per(20) end
# File app/controllers/groups_controller.rb, line 46 def people @users = group.users.all end
# File app/controllers/groups_controller.rb, line 38 def search result = SearchContext.new(project_ids, params).execute @projects = result[:projects] @merge_requests = result[:merge_requests] @issues = result[:issues] end
# File app/controllers/groups_controller.rb, line 8 def show @events = Event.in_projects(project_ids).limit(20).offset(params[:offset] || 0) @last_push = current_user.recent_push respond_to do |format| format.html format.js format.atom { render layout: false } end end
# File app/controllers/groups_controller.rb, line 52 def group @group ||= Group.find_by_code(params[:id]) end
# File app/controllers/groups_controller.rb, line 60 def project_ids projects.map(&:id) end
# File app/controllers/groups_controller.rb, line 56 def projects @projects ||= current_user.projects_with_events.where(group_id: @group.id) end