Skip status checks for empty diff hashes
What does this MR do and why?
Skip status checks for empty diff hashes
-
There is no point in scheduling the worker for an empty
diff_head_sha -
fixes: #493205 (closed)
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.
How to set up and validate locally
- Setup an external status check: http://localhost:3000/flightjs/Flight/-/settings/merge_requests
Docs - Clear your sikekiq log
- Create a merge request
curl --request POST \
--header "PRIVATE-TOKEN: <gee_ell_pat-YOUR_TOKEN_GOES_HERE>" \
--header "Content-Type: application/json" \
--data '{
"source_branch": "foo",
"target_branch": "main",
"title": "Merge request with empty diff",
"description": "This is a merge request with an empty diff",
"allow_collaboration": true,
"squash": true
}' \
"http://localhost:3000/api/v4/projects/7/merge_requests"
- You should not see an invocation of
ComplianceManagement::PendingStatusCheckWorker