Skip to content

Commit

Permalink
Merge branch 'github-url-fix' of 'https://github.com/jjmerchante/grim…
Browse files Browse the repository at this point in the history
…oirelab-elk'

Merges #1160
Closes #1160
  • Loading branch information
sduenas authored Aug 6, 2024
2 parents 9a7a07e + 70ba478 commit a46cbe2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions grimoire_elk/raw/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def get_perceval_params_from_url(cls, url):
""" Get the perceval params given a URL for the data source """
params = []

url = url.rstrip('/')
owner = url.split('/')[-2]
repository = url.split('/')[-1]
params.append(owner)
Expand Down
7 changes: 7 additions & 0 deletions releases/unreleased/github-url-ending-with-slash-failed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: GitHub URL ending with slash failed
category: fixed
author: Jose Javier Merchante <[email protected]>
issue: 1159
notes: >
GrimoireLab failed to run with GitHub URLs ending in a slash
6 changes: 6 additions & 0 deletions tests/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ def test_perceval_params(self):
]
self.assertListEqual(GitHubOcean.get_perceval_params_from_url(url), expected_params)

url = "https://github.com/chaoss/grimoirelab-perceval/"
expected_params = [
'chaoss', 'grimoirelab-perceval'
]
self.assertListEqual(GitHubOcean.get_perceval_params_from_url(url), expected_params)

def test_demography_study(self):
""" Test that the demography study works correctly """

Expand Down

0 comments on commit a46cbe2

Please sign in to comment.