New processor: Apply ~"Support Team Contributions" label automatically
What does this MR do and why?
This is a re-implementation of !1953 (closed) as a processor instead of a policy.
The goal is to add the Support Team Contributions label to any MR that is opened by a Support Team member in any GitLab project besides internal Support projects. We use this label to track contributions from the Support Team, but it's easy to forget adding it. Considering that we can easily determine if someone is a Support Team member, adding this label can and should be automated.
Notes:
- As I originally implemented this as a policy in !1953 (closed) and continued working based off that branch, this still includes the new
has_department()
method inlib/team_member_helper.rb
(andspec/lib/team_member_helper_spec.rb
). I used that in the policy to determine if someone was a Support Team member. In the processor, I'm usinggitlab-com/support
membership instead, so this helper method is not needed anymore. I figured I'd leave it in as it might be useful for others in the future, but I'm absolulely fine with dropping it from the MR. -
Direct
gitlab-com/support
membership is a good enough criteria to determine Support Team members (probably even better than relying on the team YAML). I basically copied the approach I saw inapproved_by_appsec()
intriage/processor/appsec_processor.rb
to implement this.
Expected impact & dry-runs
I think for a processor I can't do dry-runs (in the sandbox)? Would the right approach here be to follow these instructions and run it against a test instance?
The expected impact is pretty straightforward: For any MR that a Support Team Member opens within a project in the gitlab-org
namespace, the Support Team Contributions label should be added if not already present. It should not affect anyone who's not working in Support.
Action items
-
If adding environment variables for reactive processors, update config/triage-web.yaml
and.gitlab/ci/triage-web.yml
-
(If applicable) Add documentation to the handbook pages for Triage Operations => - (If applicable) Identify the affected groups and how to communicate to them:
-
/cc @ person_or_group
=> -
Relevant Slack channels => -
Engineering week-in-review
-