mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
Use "synchronized" (past tense) in github webhook.
Normally github gives us a past tense version of the action, but not for "synchronize," so we fix up the tense. This also adds zerver.GithubHookTests.test_pull_request_synchronize (imported from commit ef69467ed4a02dbfa94c8215fb9043b668d1dec9)
This commit is contained in:
@@ -25,10 +25,14 @@ def github_generic_subject(noun, topic_focus, blob):
|
||||
return "%s: %s %d: %s" % (topic_focus, noun, blob['number'], blob['title'])
|
||||
|
||||
def github_generic_content(noun, payload, blob):
|
||||
action = payload['action']
|
||||
if action == 'synchronize':
|
||||
action = 'synchronized'
|
||||
|
||||
# issue and pull_request objects have the same fields we're interested in
|
||||
content = ("%s %s [%s %s](%s)"
|
||||
% (payload['sender']['login'],
|
||||
payload['action'],
|
||||
action,
|
||||
noun,
|
||||
blob['number'],
|
||||
blob['html_url']))
|
||||
|
||||
Reference in New Issue
Block a user