def createdReview(
            self, repo_name, branch_name, base_name, branch_url=None):

        message = """
created revision from:

**repository**: {repo_name}
**branch**: {branch_name}

if the revision is accepted then i will automatically try to land the
revision on {base_name}.

the commit message will be created from the title, summary, test plan and
other properties of this review page.

the author may change the properties of the review at any time by following
the 'edit revision' link at the top-right of the page.
        """.format(
            repo_name=phlcon_remarkup.monospaced(repo_name),
            branch_name=phlcon_remarkup.monospaced(branch_name),
            base_name=phlcon_remarkup.monospaced(base_name)).strip()

        if branch_url is not None:
            message += "\nyou can browse the branch here: {branch_url}".format(
                branch_url=phlcon_remarkup.link(branch_url))

        self._createComment(message, silent=True)
    def createdReview(self,
                      repo_name,
                      branch_hash,
                      branch_name,
                      base_name,
                      branch_url=None):

        message = """
created revision from:

**repository**: {repo_name}
**branch**: {branch_name}
**commit**: {branch_hash}

if the revision is accepted then i will automatically try to land the
revision on {base_name}.

the commit message will be created from the title, summary, test plan and
other properties of this review page.

the author may change the properties of the review at any time by following
the 'edit revision' link at the top-right of the page.
        """.format(repo_name=phlcon_remarkup.monospaced(repo_name),
                   branch_name=phlcon_remarkup.monospaced(branch_name),
                   branch_hash=phlcon_remarkup.monospaced(branch_hash),
                   base_name=phlcon_remarkup.monospaced(base_name)).strip()

        if branch_url is not None:
            message += "\n\n"
            message += "you can browse {name} here:\n{url}".format(
                name=phlcon_remarkup.monospaced(branch_name),
                url=phlcon_remarkup.link(branch_url))

        self._createComment(message, silent=True)
    def failedCreateReview(
            self, repo_name, branch_hash, branch_name, branch_url, exception):

        message = """
failed to create revision from:

**repository**: {repo_name}
**branch**: {branch_name}
**commit**: {branch_hash}
        """.format(
            repo_name=phlcon_remarkup.monospaced(repo_name),
            branch_name=phlcon_remarkup.monospaced(branch_name),
            branch_hash=phlcon_remarkup.monospaced(branch_hash)).strip()

        if branch_url is not None:
            message += "\n\n"
            message += "you can browse {name} here:\n{url}".format(
                name=phlcon_remarkup.monospaced(branch_name),
                url=phlcon_remarkup.link(branch_url))

        self._createComment(message)
        self.exception(exception)
    def failedCreateReview(self, repo_name, branch_hash, branch_name,
                           branch_url, exception):

        message = """
failed to create revision from:

**repository**: {repo_name}
**branch**: {branch_name}
**commit**: {branch_hash}
        """.format(
            repo_name=phlcon_remarkup.monospaced(repo_name),
            branch_name=phlcon_remarkup.monospaced(branch_name),
            branch_hash=phlcon_remarkup.monospaced(branch_hash)).strip()

        if branch_url is not None:
            message += "\n\n"
            message += "you can browse {name} here:\n{url}".format(
                name=phlcon_remarkup.monospaced(branch_name),
                url=phlcon_remarkup.link(branch_url))

        self._createComment(message)
        self.exception(exception)