Skip to content

Commit

Permalink
Merge Android ignore pattern into a single (#2440)
Browse files Browse the repository at this point in the history
This wasn't working as intended as multiple

https://xkcd.com/1171/
  • Loading branch information
andrewpollock authored Aug 1, 2024
1 parent 111b6cf commit d66c268
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docker/importer/importer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,12 @@ def test_ignore(self, mock_publish): # pylint: disable=unused-argument
ignore_patterns=['(^(?!USN-).*$)'])
self.assertTrue(
source_repo_ignore_negative.ignore_file('/tmp/foo/CVE-2024-1234.json'))
source_repo_ignore_multiple = osv.SourceRepository(
ignore_patterns=['^(?!MAL-).*$', 'MAL-0000.*'])
self.assertTrue(
source_repo_ignore_multiple.ignore_file('/tmp/foo/CVE-2024-1234.json'))
self.assertTrue(
source_repo_ignore_multiple.ignore_file('/tmp/foo/MAL-0000-0001.json'))


@mock.patch('importer.utcnow', lambda: datetime.datetime(2021, 1, 1))
Expand Down
2 changes: 1 addition & 1 deletion source_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
- name: 'android'
versions_from_repo: False
type: 1
ignore_patterns: ['^(?!A-).*$', '^(?!ASB-A-).*$', '^(?!PUB-ASB-A-).*$']
ignore_patterns: ['^(?!(PUB-)?ASB-A-).*$']
detect_cherrypicks: False
extension: '.json'
bucket: 'android-osv-test'
Expand Down

0 comments on commit d66c268

Please sign in to comment.