Skip to content

Use Tooling::FindChanges for scripts/lint-doc.sh

What does this MR do and why?

Use Tooling::FindChanges for scripts/lint-doc.sh

The git approach causes some problems with wrong change detections. Switching the logic to use Tooling::FindChanges will detect the file changes with the API.

Screenshots or screen recordings

Demonstrated in a pipeline in gitlab-community/gitlab!12 (closed) (which targets this MR's branch):

Before After

How to set up and validate locally

  1. export CI_API_V4_URL=https://gitlab.com/api/v4
    export CI_MERGE_REQUEST_PROJECT_PATH=gitlab-org/gitlab
    export CI_MERGE_REQUEST_IID=134574
  2. scripts/lint-doc.sh
  3. Check that the script output says that only doc/api/pipelines.md and doc/ci/jobs/ci_job_token.md will be linted

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #424769 (closed)

Edited by Marcel Amirault

Merge request reports