mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
webhooks_gitea: Use the correct actor for pull_request actions
The user associated to a pull request is always its creator, however, when closing a pull request, this can be the wrong actor. The paylod contains the actor in the `sender` value, use this instead.
This commit is contained in:
@@ -22,7 +22,7 @@ def format_pull_request_event(payload: WildValue, include_title: bool = False) -
|
||||
user_name = payload["pull_request"]["merged_by"]["username"].tame(check_string)
|
||||
action = "merged"
|
||||
else:
|
||||
user_name = payload["pull_request"]["user"]["username"].tame(check_string)
|
||||
user_name = payload["sender"]["username"].tame(check_string)
|
||||
action = payload["action"].tame(check_string)
|
||||
|
||||
url = payload["pull_request"]["html_url"].tame(check_string)
|
||||
|
Reference in New Issue
Block a user