Skip to content

Correction in documentation for Skip job if the branch is empty

Nico Smeenk requested to merge nsmeenk/gitlab:nsmeenk-master-patch-14955 into master

What does this MR do and why?

The current documentation for "Skip job if the branch is empty" suggests using

        compare_to: 'refs/heads/main'
        paths:
          - '*'

to "matches and the job runs only when there are changes to the files in the branch". This is missleading since it only runs if files in the root folder of the project have changed. Any other change will not be recognized. To have the job run when there is a change in any file of the repository - '**/*' needs to be added to the paths.

see also #15170 (comment 1133365836)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

documentation

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
chrome_vH5Uoloyay chrome_Y94ACnbAHl

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

-> just a logic fix in the documentation .md

Merge request reports