Skip to content

Commit

Permalink
fix: use strings as webhook secrets (#66)
Browse files Browse the repository at this point in the history
Fix https://codecov.sentry.io/share/issue/ef92212e1461452c90a16ae188e9c00b/

We were creating UUID4 webhook secrets per repo for gitlab and gitlab-enterprise.
When logging the body of the request the json decoder would crash.
  • Loading branch information
giovanni-guidini committed Aug 16, 2023
1 parent bb7e0ee commit ad044e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ async def possibly_setup_webhooks(self, commit, repository_service):
try:
if repository_service.service in ["gitlab", "gitlab_enterprise"]:
# we use per-repo webhook secrets in this case
webhook_secret = repository.webhook_secret or uuid.uuid4()
webhook_secret = repository.webhook_secret or str(uuid.uuid4())
else:
# service-level config value will be used instead in this case
webhook_secret = None
Expand Down

0 comments on commit ad044e4

Please sign in to comment.