The source project of this merge request has been removed.
Use commit date for cross-referenced system notes
What does this MR do?
This MR fixes #20153 (closed). Currently, GitLab does not respect the date of commits when creating cross-referenced system notes. That leads to incorrect order of notes when a push is made significantly later than commits. That is especially important when an existing Git repository is imported to GitLab.
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
The main risk - I only did end-to-end testing on our self-hosted server. I did not add the unit test to issuables_service_spec.rb
because I cannot run it locally without configuration of local environment. Basically, the test should look like that:
let(:commit) { project.commit }
system_note = service.cross_reference(commit)
expect(system_note.created_at)
.to eq(commit.created_at)
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team