diff options
| author | 2019-11-01 17:58:07 +0000 | |
|---|---|---|
| committer | 2019-11-01 17:58:07 +0000 | |
| commit | 4826ac67f8b05554e7440d3a25439e3215979ace (patch) | |
| tree | 581444e95a7496de8885238a8c23d2430ddc6f0d | |
| parent | v1.14.0-rc1 release (diff) | |
| signature | ||
show "published" for "updated" releases - seems theres a bug that prevents the former
| -rw-r--r-- | modules/git_webhooks/gitea.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/git_webhooks/gitea.py b/modules/git_webhooks/gitea.py index 1a1074fe..296488ba 100644 --- a/modules/git_webhooks/gitea.py +++ b/modules/git_webhooks/gitea.py @@ -42,6 +42,11 @@ COMMENT_ACTIONS = { "edited": "edited a comment", "deleted": "deleted a comment" } +RELEASE_ACTIONS = { + "updated": "published", # there seems to be a bug that causes `updated` instead of `published` + "published": "published", + "deleted": "deleted" +} class Gitea(object): def is_private(self, data, headers): @@ -209,7 +214,7 @@ class Gitea(object): return [] def release(self, full_name, data): - action = data["action"] + action = RELEASE_ACTIONS[data["action"]] tag = data["release"]["tag_name"] name = data["release"]["name"] or "" if name: |
