Last active
August 29, 2015 14:01
-
-
Save pydanny/6345bb10e76a039e7172 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from djwebhooks.decorators import hook | |
# This assumes the project update was committed by user 'audreyr' | |
@hook(event="project.update") | |
def send_project_update(project, owner, identifier): | |
""" The following help in identifying the webhook | |
:event: i.e. GitHub commit.push. Not unique! | |
:owner: Who created a webhook. I.E. pydanny | |
:identifier: A owner or system defined key. Unique amongst pydanny's webhooks' | |
""" | |
# Add MOAR logic here as needed | |
return { | |
'title': project.title, | |
'description': project.description, | |
'owner': owner.username, | |
'created': project.created, | |
'modified': project.modified, | |
'action': "project.update" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment