diff --git a/app/blueprints/github/__init__.py b/app/blueprints/github/__init__.py index 081ef9ee..46741707 100644 --- a/app/blueprints/github/__init__.py +++ b/app/blueprints/github/__init__.py @@ -146,4 +146,7 @@ def webhook(): # Perform release # + if package.releases.filter_by(commit_hash=ref).count() > 0: + return + return api_create_vcs_release(actual_token, package, title, ref, reason="Webhook") diff --git a/app/blueprints/gitlab/__init__.py b/app/blueprints/gitlab/__init__.py index bbe32192..990aee64 100644 --- a/app/blueprints/gitlab/__init__.py +++ b/app/blueprints/gitlab/__init__.py @@ -63,6 +63,9 @@ def webhook_impl(): # Perform release # + if package.releases.filter_by(commit_hash=ref).count() > 0: + return + return api_create_vcs_release(token, package, title, ref, reason="Webhook")