Skip to content

Check MR contents before adding Docs labels

Sarah German requested to merge 431799-tw-danger-fixes into master

What does this MR do and why?

In !136768 (merged) we updated the documentation Dangerfile to post section-specific labels on MRs that include files from either the Development or Solutions sections.

Unfortunately this code caused the labels to be added to all docs MRs.

To fix this, we need to only run the helper.labels_to_add function when the right conditions are met rather than as part of setting the message variable. In the MR above, we had the label function firing without checking the conditions first.

Closes #431799 (closed)

How to set up and validate locally

n/a (this only happens on actual MRs)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #431799 (closed)

Edited by Sarah German

Merge request reports