Skip to content

Commit

Permalink
Merge branch 'GrayStranger-patch-rawurl-anonymize' of 'https://github…
Browse files Browse the repository at this point in the history
  • Loading branch information
sduenas authored Oct 10, 2023
2 parents cad8e92 + 7693537 commit 9369ce5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions grimoire_elk/raw/graal.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

from .elastic import ElasticOcean
from ..elastic_mapping import Mapping as BaseMapping
from ..identities.git import GitIdentities
from ..enriched.utils import anonymize_url


class Mapping(BaseMapping):
Expand Down Expand Up @@ -62,6 +64,11 @@ class GraalOcean(ElasticOcean):
"""Graal Ocean feeder"""

mapping = Mapping
identities = GitIdentities

def _fix_item(self, item):
item['origin'] = anonymize_url(item['origin'])
item['tag'] = anonymize_url(item['tag'])

@classmethod
def get_perceval_params_from_url(cls, url):
Expand Down
10 changes: 10 additions & 0 deletions releases/unreleased/graal-anonymize-repository-urls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Anonymize repository URLs in graal backend
category: added
author: GrayStranger <[email protected]>
issue: null
notes: >
The raw data generated by the graal backend had
non-anonymized URLs on the meta fields 'origin'
and 'tag'. This was necessary to generate enriched
data for non-public repositories.

0 comments on commit 9369ce5

Please sign in to comment.