Skip to content

Commit

Permalink
fix: use strings as webhook secrets
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 3dbbeed commit 84a49fd
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 uuid.uuid4().hex
else:
# service-level config value will be used instead in this case
webhook_secret = None
Expand Down

0 comments on commit 84a49fd

Please sign in to comment.