aboutsummaryrefslogtreecommitdiffstats
path: root/local/handler/WikiHandler.py
blob: d04a5896e89055e0d0993b12252894d0f3586723 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from ..utility import *

def handle(data, theme):
    pageno = len(data['pages'])

    url = getShortURL("%s/wiki/_compare/%s" % ( data['repository']['html_url'], data['pages'][0]['sha'] ))

    if configValue("hidePush",None) is False:
        theme.wikiPush(
            actor = data['sender']['login'],
            count = pageno,
            url = url
        )

    pages = []
    for page in data['pages']:
        pages.append({
            'action': page['action'],
            'name'  : page['page_name'],
            'hash'  : page['sha'],
            'url'   : page['html_url']
        })

    # Unfortunately github doesn't support edit summaries :(
    theme.wikiPages(
        actor = data['sender']['login'],
        pages = pages,
        url = url
    )

© 2014-2024 Faster IT GmbH | imprint | privacy policy