ci: commit lint works for forks without merge trains enabled
Description
This MR fixes the commit-lint
job for forks that don't use merge result pipelines and merge trains.
If the script finds out that it runs as a part of a "detached" pipeline, it will change behaviour to change all commits that will be added by the MR.
The script also shows a warning because without merge trains, it can't guarantee that the commits have correct messages.
Related Issues
Related to #820 (closed)
Previous MR !1357 (merged)
How has this been tested?
- I created an MR in the renovate fork and it passes: gitlab-renovate-forks/gitlab-vscode-extension!1 (closed)
- I created an MR in my fork (with merge trains enabled) and I check that the linting still detects invalid commits: https://gitlab.com/viktomas/gitlab-vscode-extension/-/jobs/6070580132
Types of changes
-
Bug fix (non-breaking change which fixes an issue) -
New feature (non-breaking change which adds functionality) -
Breaking change (fix or feature that would cause existing functionality to change) -
Documentation -
Chore (Related to CI or Packaging to platforms) -
Test gap