Add an easy way to access the diff when triaging a merge request
@kushalpandya mentioned: (ref: internal https://gitlab.slack.com/archives/C2T9APP9C/p1538736172000100)
Is it possible for GitLab Bot to identify diff of an MR which is labelled as
Community Contribution
and then also add labels likefrontend
and/orbackend
based on file paths involved?
I think this is a good idea. We could try to make sure all MR (Community contribution or not) have backend or frontend, or just have both. The policy file could look like:
merge_requests:
rules:
- name: Add ~backend and/or ~frontend
conditions:
forbidden_labels:
- backend
- frontend
state: opened
actions:
comment: |
#{"/label ~backend" if changed_files.grep(/\.rb/).any?}
#{"/label ~frontend" if changed_files.grep(/\.js/).any?}