Save one of the last spots in our Shell + Git + GitLab introdoctury course on Friday and Monday next week. 👉 Register here.

Verified Commit 73095152 authored by Huste, Tobias (FWCC) - 111645's avatar Huste, Tobias (FWCC) - 111645
Browse files

api: do not use full project path for filename

parent 9df88451
Pipeline #8648 failed with stage
in 5 minutes and 39 seconds
...@@ -327,9 +327,10 @@ class GitLabRelease(object): ...@@ -327,9 +327,10 @@ class GitLabRelease(object):
def filename(self): def filename(self):
"""Extract files to download from the GitLab payload.""" """Extract files to download from the GitLab payload."""
tag_name = self.event.payload['ref'].split('refs/tags/')[1] tag_name = self.event.payload['ref'].split('refs/tags/')[1]
project_name = self.project['path_with_namespace'] # Only use project part of path for filename
project_name = self.project['path_with_namespace'].split['/'][-1]
filename = u'{name}-{tag}.tar.gz'.format( filename = u'{name}-{tag}.zip'.format(
name=project_name, tag=tag_name) name=project_name, tag=tag_name)
return filename return filename
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment