Porting logic of handling negative patterns for DownloadBuildArtifacts and DownloadPipelineArtifacts tasks #3664
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ported logic of pre-handling minimatch patterns from azure-pipelines-task-lib (PS version / TS version).
The logic allows to handle negative minimatch patterns correctly.
Also reporting of excluded items was moved from GetFilteredItems to GetArtifactItems.
Checked cases:
**
)**
) except 1or 2 file (like!**/file.1.nupkg
)**
) except group of files (like!**/file.*.nupkg
)**
) except directory (like!**/folder1/**
)**/folder1/**
) except 1 file (like!**/folder1/file.1.nupkg
)**/file.*.nupkg
) except 1 file (like!**/file.1.nupkg
)**
) except directory (like!**/folder1/**
) but with downloading 1 file from the directory (like!!**/folder1/file.1.nupkg
)#
) in patternChecklist:
There’s no risky dependency updates
Changes has been tested
Enough test coverage for changes, and current test coverage for task doesn't look poor
We understand how tasks is working, how changes affect task behavior
There is no breaking changes
There is no any other concerns
I have not discovered any new uncovered test/use cases