Closed christianbumann closed 4 months ago
I don't know how this could be done reliable
The question is - make it sense to compare the file link itself. there are other properties e.g. ProjectFileRelativePath or AffectedFileRelativePath which are also used for comparing the issue e.g. file renaming.
Mabye add another flag to make it possible for the issue comparer to ignore the FileLink field?
@christianbumann See #693 for an extension of the IIssueComparer
which allows to ignore any arbitrary properties.
Discussion point:
Having two issues and comparing them the commit hash/branch name in the FileLink should be ignored for the comparision. The comparision is done here https://github.com/cake-contrib/Cake.Issues/blob/2148529faf9770445f5b167ef73d31a894a20b90/src/Cake.Issues/IIssueComparer.cs#L65
How it can be reproduced Add a test following content to the https://github.com/pascalberger/Cake.Issues/blob/develop/src/Cake.Issues.Tests/IIssueComparerTests.cs
On Github the link is different as on AzureDevOps Server - maybe there are other patterns
Example Github:
https://github.com/cake-contrib/Cake.Issues/blob/2148529faf9770445f5b167ef73d31a894a20b90/src/Cake.Issues/IIssueComparer.cs#L65
orhttps://github.com/cake-contrib/Cake.Issues/blob/develope/src/Cake.Issues/IIssueComparer.cs#L65
Example Azure DevOps Server.
https://url/collection/project/_git/repo?version=main&path=path_to_file
orhttps://url/collection/project/_git/repo?version=GCf2037fe8ee543940c30190426eeae832f0da33af&path=path_to_file
Background: Create a Sarif Report would mark the issue as Updated, and not Unchanged