lib/gitlab/dangerfiles/category.rb in gitlab-dangerfiles-3.12.0 vs lib/gitlab/dangerfiles/category.rb in gitlab-dangerfiles-3.13.0

- old
+ new

@@ -76,29 +76,21 @@ class UX < Category def has_capability?(teammate) super && if labels.any?("Community contribution") - can_review_wider_community_contribution?(teammate) + # We want the designer for the team to review the wider community + # contribution because they're more familiar with that area. + the_designer_for_the_team?(teammate) else - can_review_team_memeber_contribution?(teammate) + # We don't want the designer for the team to review merge + # requests for the same team which is designed by themselves. + # So they can only review if they're not the designer for the team. + !the_designer_for_the_team?(teammate) end end private - - def can_review_wider_community_contribution?(teammate) - # We want the designer for the team to review the wider community - # contribution because they're more familiar with that area. - the_designer_for_the_team?(teammate) - end - - def can_review_team_memeber_contribution?(teammate) - # We don't want the designer for the team to review merge - # requests for the same team which is designed by themselves. - # So they can only review if they're not the designer for the team. - !the_designer_for_the_team?(teammate) - end def the_designer_for_the_team?(teammate) # Pick corresponding group for community contribution # Specialty can be: # Source Code