Sha256: 5618fd8dae14aba01c00ef94f5fdd63c951d1e2ac4791bd9f29c277fc3253920
Contents?: true
Size: 696 Bytes
Versions: 32
Compression:
Stored size: 696 Bytes
Contents
# This rule is the (almost) last one since we want to add all the labels to add at once, # so we let other rules adding to `helper.labels_to_add` before actually adding them via the API here. # Don't try to post anything locally. return unless helper.ci? def post_labels(labels) gitlab.api.update_merge_request(helper.mr_target_project_id, helper.mr_iid, add_labels: labels.join(",")) rescue Gitlab::Error::Forbidden warn("This Merge Request needs to be labelled with #{helper.labels_list(labels)}. Please request a reviewer or maintainer to add them.") end post_labels(helper.labels_to_add) if helper.labels_to_add.any?
Version data entries
32 entries across 32 versions & 1 rubygems