Consumes a naive build notification (the default for now)
        basically, set POST variables to match commit object parameters:
        revision, revlink, comments, branch, who, files, links

        files, links and properties will be de-json'd, the rest are interpreted as strings

def getChanges(self, request):
        """
        Consumes a naive build notification (the default for now)
        basically, set POST variables to match commit object parameters:
        revision, revlink, comments, branch, who, files, links

        files, links and properties will be de-json'd, the rest are interpreted as strings
        """

        def firstOrNothing(value):
            """
            Small helper function to return the first value (if value is a list)
            or return the whole thing otherwise.

            Make sure to properly decode bytes to unicode strings.
            """
            if (isinstance(value, type([]))):
                value = value[0]
            return bytes2unicode(value)

        args = request.args
        # first, convert files, links and properties
        files = None
        if args.get(b'files'):
            files = json.loads(firstOrNothing(args.get(b'files')))
        else:
            files = []

        properties = None
        if args.get(b'properties'):
            properties = json.loads(firstOrNothing(args.get(b'properties')))
        else:
            properties = {}

        revision = firstOrNothing(args.get(b'revision'))
        when = firstOrNothing(args.get(b'when_timestamp'))
        if when is None:
            when = firstOrNothing(args.get(b'when'))
        if when is not None:
            when = float(when)
        author = firstOrNothing(args.get(b'author'))
        if not author:
            author = firstOrNothing(args.get(b'who'))
        comments = firstOrNothing(args.get(b'comments'))
        branch = firstOrNothing(args.get(b'branch'))
        category = firstOrNothing(args.get(b'category'))
        revlink = firstOrNothing(args.get(b'revlink'))
        repository = firstOrNothing(args.get(b'repository')) or ''
        project = firstOrNothing(args.get(b'project')) or ''
        codebase = firstOrNothing(args.get(b'codebase'))

        chdict = dict(author=author, files=files, comments=comments,
                      revision=revision, when_timestamp=when,
                      branch=branch, category=category, revlink=revlink,
                      properties=properties, repository=repository,
                      project=project, codebase=codebase)
        return ([chdict], None)