This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
BadZipFile error #32
Comments
It doesn't look like the call to the gitlab api is working. Here is what I did for python3. elif hostflavour == 'gitlab':
# https://gitlab.com/jaymcconnell/gitlab-test-30/repository/archive.zip?ref=master
print(event['body-json']['project']['http_url'])
archive_root = event['body-json']['project']['http_url'].strip('.git')
project_id = event['body-json']['project_id']
branch = event['body-json']['ref'].replace('refs/heads/', '')
archive_url = f"https://gitlab.com/api/v4/projects/{project_id}/repository/archive.zip"
params = {'private_token': OAUTH_token, 'ref': 'branch'}
owner = event['body-json']['project']['namespace']
name = event['body-json']['project']['name'] r = requests.get(archive_url, verify=verify, headers=headers, params=params) |
Thanks for posting the fix @josjaf would you be willing to put in a pr ? Also happy to put it in the patch on your behalf if you'd prefer. |
I'll send over a PR at some point. 'branch' needs to be branch - variable instead of string params = {'private_token': OAUTH_token, 'sha': branch} ref is not longer used. |
In case somebody has Gitlab CE on his own servers and wants to use this quick start it is just needed to modify I am surprised that this is not parameterized already by AWS team... |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi I'm getting a badzipfile error. When i wget the file in the lambda logs that shows the zip file, it's definitely a zip. Also, is there a way to include the .git dir from the provider?
The text was updated successfully, but these errors were encountered: