Skip to content

New merge request approval policy grammatical bugs

Summary

There are several grammatical errors in initial Rules sentences:

Steps to reproduce

  1. Go into any project that has Sec Ultimate and create a new policy
  2. Select the Merge Request policy
  3. View the initial Rules sentence, then make changes and view the sentence grammar for each is incorrect.

Example Project

What is the current bug behavior?

Default/starting sentence:

CleanShot_2025-03-28_at_07.13.55_2x

Select "Security scan"/default

CleanShot 2025-03-28 at 07.29.34@2x.png

Select "License scan"

CleanShot 2025-03-28 at 09.37.33@2x.png

What is the expected correct behavior?

Grammar fix

Bug Correct

Nothing selected

Screenshot 2025-03-31 at 10.23.42.png

Default/Starting sentence should be something like: When [Select scan type] finds scanner-specific conditions in an open merge request that targets [All protected branches] with [No exceptions] and matches all the following criteria:

Select "Security scan":

Screenshot 2025-03-31 at 10.21.26.png

  • When a [security scan] with [all scanners] runs against [all protected branches] with [no exceptions] and finds [any] vulnerability type that matches all the following criteria:
  • When a [security scan] with [all scanners] runs against the [default branch] with [no exceptions] and finds [Any] vulnerability type that matches all the following criteria:
  • When a [security scan] with [all scanners] runs against [all protected branches] with [exceptions] on [choose exception branch] and finds [any] vulnerability type that matches all the following criteria:
  • When a [security scan] with [all scanners] runs against these [specific protected branches]:[select protected branches] with [exceptions] on the [choose exception branch] and finds [any] vulnerability type that matches all the following criteria:

Select "License scan":

Screenshot 2025-04-11 at 14.56.44.png

  • When a [license scan] runs in an open merge request that targets [all protected branches] with [no exceptions] and finds licenses that match all the following criteria:
  • When a [license scan] runs in an open merge request that targets [all protected branches] with [Exceptions] on the [Choose exception branch] and matches all the following criteria:
  • When a [license scan] runs in an open merge request that targets the [default branch] with [no exceptions] and finds licenses that match all of the following criteria:

Select "Any merge request"

Screenshot 2025-03-31 at 10.03.47.png

Screenshot 2025-03-31 at 10.07.26.png

Screenshot_2025-04-10_at_2.48.02_PM

On [any merge request], when [an unsigned commit] targets [all protected branches] with [no exceptions]

On [any merge request], when [any commit] that targets [all protected branches] with [exceptions] on [main]

On [any merge request], when [any commit] that targets [specific protected branches]: [main] with [no exceptions]

Cases

In a sentence, all selection should be lower case:

Screenshot 2025-04-01 at 11.23.47.png

Screenshot 2025-03-31 at 10.03.47.png

Screenshot 2025-03-31 at 10.08.34.png

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

       (For installations with omnibus-gitlab package run and paste the output of: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`sudo gitlab-rake gitlab:env:info\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`)  (For installations from source run and paste the output of: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`)        

Results of GitLab application Check

Expand for output related to the GitLab application check

      (For installations with omnibus-gitlab package run and paste the output of: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`sudo gitlab-rake gitlab:check SANITIZE=true\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`)  (For installations from source run and paste the output of: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`)  (we will only investigate if the tests are passing)       

Possible fixes

Edited by Ryan Lehmann