Extend ref extraction logic to support SHA256 commits
What does this MR do and why?
Contributes to #419905 (closed)
Problem
The regular expression used for commit hash detection supports only SHA1 format.
Solution
Adjust the regular expression to capture SHA256 commits too.
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.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Enable feature flag
Feature.enable(:support_sha256_repositories)
- Create a new project in SHA256 format
- Go to the new project page
- Copy the last commit id
- Insert this id into path like
http://gdk.test:3000/root/<project_name>/-/commits/<commit_id>
- You should see a 404 page
- Enable the feature flag
Feature.enable(:ref_extract_sha256)
- The page should load
Edited by Vasilii Iakliushin