Skip to content

Update accepting merge requests label logic

What does this MR do and why?

~"Accepting merge requests" is prematurely being added to issues that are not ready for a merge request to be created.

This change prevents that label from being added for issues in the validation track without a weight and even for issues in the build track that have already been agreed upon or started development.

Expected impact & dry-runs

  • Open the dry-run:custom job in your merge request pipeline.
  • Enter at least the TRIAGE_POLICY_FILE variable with the path of the policy file you want to test, for instance:
    • Fill the Key field with TRIAGE_POLICY_FILE.
    • Fill the Value field with policies/stages/hygiene/label-seeking-community-contributions.yml.

Last dry-run

The following comments would be posted for the rule **Apply `Accepting merge requests` label to unassigned issues that have a milestone and weight**:
.[DEBUG] query_api: https://gitlab.com/api/v4/projects/278964/labels/Accepting%20merge%20requests?per_page=100
[DEBUG] rate_limit_infos: Rate limit remaining: 1995 (reset at 2022-05-13 14:55:38 +0000)
# https://gitlab.com/gitlab-org/gitlab/-/issues/362353
/label ~"Accepting merge requests"

# https://gitlab.com/gitlab-org/gitlab/-/issues/359942
/label ~"Accepting merge requests"

# https://gitlab.com/gitlab-org/gitlab/-/issues/359349
/label ~"Accepting merge requests"

# https://gitlab.com/gitlab-org/gitlab/-/issues/332479
/label ~"Accepting merge requests"

See https://gitlab.com/gitlab-org/quality/triage-ops/-/tree/master/doc/scheduled#testing-with-a-dry-run on how to perform dry-runs.

Action items

Closes gitlab-org/gitlab#362353 (closed)

Edited by Rémy Coutable

Merge request reports