Skip to content

Allow defining conditions with labels over ranges

Description

We could define how we add missing missed-deliverable as:

resource_rules:
  issues:
    rules:
      - name: Label missed ~"missed\-deliverable" for `missed:xx.x`
        conditions:
          labels:
            - missed:{10..12}.{0..15}
          state: opened
        actions:
          labels:
            - missed-deliverable

Local dry-run

> time ruby -Ilib bin/gitlab-triage --dry-run --debug --token $API_TOKEN --project-id gitlab-org/gitlab-ce
Performing a dry run.

=========================== Processing rules for issues

Processing rule: Label missed ~"missed\-deliverable" for `missed:xx.x`

[DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.0&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.1&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.2&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.3&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.4&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.5&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.6&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.7&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.8&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.9&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.10&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.11&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.12&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.13&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.14&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:10.15&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.0&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.1&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.2&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.3&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.4&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.5&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.6&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.7&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.8&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.9&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.10&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.11&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.12&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.13&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.14&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:11.15&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.0&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.1&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.2&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.3&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.4&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.5&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.6&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.7&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.8&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.9&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.10&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.11&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.12&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.13&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.14&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources [DEBUG] get_url: https://gitlab.com/api/v4/projects/gitlab-org%2Fgitlab-ce/issues?per_page=100&labels=missed:12.15&state=opened .

Found 0 resources... Limiting resources... Total resource after limiting: 0 resources 0.84user 0.11system 0:46.85elapsed 2%CPU (0avgtext+0avgdata 31972maxresident)k 0inputs+0outputs (0major+5880minor)pagefaults 0swaps


Partially implements #62 (closed)

The other dynamic limiter: !45 (merged)

Edited by Lin Jen-Shin

Merge request reports