Use Tooling::FindChanges for scripts/lint-doc.sh
requested to merge gitlab-community/gitlab:424769-refactor-scripts-lint-doc-sh-to-use-tooling-findchanges-with-api-instead-of-using-git into master
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
-
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
scripts/lint-doc.sh
- Check that the script output says that only
doc/api/pipelines.md
anddoc/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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #424769 (closed)
Edited by Marcel Amirault