mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 14:02:24 +01:00
Prevent duplicate commit releases from webhooks
This commit is contained in:
parent
fb3b0be50e
commit
63204575eb
@ -146,4 +146,7 @@ def webhook():
|
|||||||
# Perform release
|
# 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")
|
return api_create_vcs_release(actual_token, package, title, ref, reason="Webhook")
|
||||||
|
@ -63,6 +63,9 @@ def webhook_impl():
|
|||||||
# Perform release
|
# Perform release
|
||||||
#
|
#
|
||||||
|
|
||||||
|
if package.releases.filter_by(commit_hash=ref).count() > 0:
|
||||||
|
return
|
||||||
|
|
||||||
return api_create_vcs_release(token, package, title, ref, reason="Webhook")
|
return api_create_vcs_release(token, package, title, ref, reason="Webhook")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user