mirror of
https://github.com/zulip/zulip.git
synced 2026-07-06 21:18:58 +08:00
Add support for issues events for Github integration
(imported from commit 6ae1013948626acdd161bd6f2648351201842658)
This commit is contained in:
parent
8a741ed3d4
commit
8010b49067
@ -1768,6 +1768,20 @@ def api_github_landing(request, user_profile, event=REQ,
|
||||
payload['before'], payload['after'],
|
||||
payload['compare'],
|
||||
payload['pusher']['name'])
|
||||
elif event == 'issues':
|
||||
if user_profile.realm.domain not in ('zulip.com', 'customer5.invalid'):
|
||||
return json_success()
|
||||
|
||||
issue = payload['issue']
|
||||
subject = "%s: issue %d %s" % (repository['name'], issue['number'], payload['action'])
|
||||
content = ("%s %s [issue %d](%s): %s\n\n> %s"
|
||||
% (issue['user']['login'],
|
||||
payload['action'],
|
||||
issue['number'],
|
||||
issue['html_url'],
|
||||
issue['title'],
|
||||
issue['body']))
|
||||
stream = 'issues'
|
||||
else:
|
||||
# We don't handle other events even though we get notified
|
||||
# about them
|
||||
|
||||
Loading…
Reference in New Issue
Block a user