Backend: Add support to rules:exists keyword to match multiple files (AND operation)

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Release notes

Problem to solve

Right now there is no way to trigger a job with rules:exists where multiple matches for files are required. An example of this is the nodejs-scan-sast job, which looks for package.json files; however package.json file is not enough for the NodeJsScan analyzer which requires *.js files to be present. We need rules:exists to match multiple files at the same time (logical AND operation).

Proposal

In rules:exists allow using AND keyword in each list element.

Example:

rules:
  exists:
    - <file1.extension> AND <file2.extension>

Intended users

Developer, DevOps Engineer

Feature Usage Metrics

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by 🤖 GitLab Bot 🤖