Skip to content

Commit

Permalink
[graal] Anonymize repository urls
Browse files Browse the repository at this point in the history
Anonymize raw origin and tag url to make it more universal for
cocom\colic, etc. metrics and to make it compatible with non-public
repos.

Signed-off-by: GrayStranger <[email protected]>
  • Loading branch information
GrayStranger committed Aug 23, 2023
1 parent 2ae962a commit 5a0e38d
Showing 1 changed file with 7 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,7 +64,12 @@ 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):
params = []
Expand Down

0 comments on commit 5a0e38d

Please sign in to comment.