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 authored Aug 17, 2023
1 parent 3a3af4f commit 2c07204
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion grimoire_elk/raw/graal.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

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


Expand Down Expand Up @@ -63,11 +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 2c07204

Please sign in to comment.